Skip to content

Commit

Permalink
Removed dqrun dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA committed Nov 29, 2024
1 parent b577317 commit 1112835
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion ydb/core/fq/libs/init/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ void Init(
CreatePqNativeGateway(pqServices),
appData->Mon);
actorRegistrator(NFq::RowDispatcherServiceActorId(), rowDispatcher.release());
actorRegistrator(NFq::PurecalcCompileServiceActorId(), NRowDispatcher::CreatePurecalcCompileService());
}

auto s3ActorsFactory = NYql::NDq::CreateS3ActorsFactory();
Expand Down
5 changes: 0 additions & 5 deletions ydb/core/fq/libs/row_dispatcher/events/data_plane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,4 @@ NActors::TActorId RowDispatcherServiceActorId() {
return NActors::TActorId(0, name);
}

NActors::TActorId PurecalcCompileServiceActorId() {
constexpr TStringBuf name = "PC_COMPL_DP";
return NActors::TActorId(0, name);
}

} // namespace NFq
1 change: 0 additions & 1 deletion ydb/core/fq/libs/row_dispatcher/events/data_plane.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace NFq {

NActors::TActorId RowDispatcherServiceActorId();
NActors::TActorId PurecalcCompileServiceActorId();

struct TPurecalcCompileSettings {
bool EnabledLLVM = false;
Expand Down
13 changes: 10 additions & 3 deletions ydb/core/fq/libs/row_dispatcher/row_dispatcher.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include "row_dispatcher.h"

#include "actors_factory.h"
#include "common.h"
#include "coordinator.h"
#include "leader_election.h"

#include <ydb/library/actors/core/actorid.h>
#include <ydb/library/actors/core/actor_bootstrapped.h>
Expand All @@ -14,10 +17,9 @@
#include <ydb/core/fq/libs/events/events.h>
#include <ydb/core/mon/mon.h>

#include <ydb/core/fq/libs/row_dispatcher/actors_factory.h>
#include <ydb/core/fq/libs/row_dispatcher/events/data_plane.h>
#include <ydb/core/fq/libs/row_dispatcher/leader_election.h>
#include <ydb/core/fq/libs/row_dispatcher/protos/events.pb.h>
#include <ydb/core/fq/libs/row_dispatcher/purecalc_compilation/compile_service.h>

#include <util/generic/queue.h>
#include <util/stream/format.h>
Expand Down Expand Up @@ -248,6 +250,7 @@ class TRowDispatcher : public TActorBootstrapped<TRowDispatcher> {
NConfig::TRowDispatcherConfig Config;
NKikimr::TYdbCredentialsProviderFactory CredentialsProviderFactory;
TYqSharedResources::TPtr YqSharedResources;
TActorId CompileServiceActorId;
TMaybe<TActorId> CoordinatorActorId;
ui64 CoordinatorGeneration = 0;
TSet<TActorId> CoordinatorChangedSubscribers;
Expand Down Expand Up @@ -435,9 +438,13 @@ void TRowDispatcher::Bootstrap() {
const auto& config = Config.GetCoordinator();
auto coordinatorId = Register(NewCoordinator(SelfId(), config, YqSharedResources, Tenant, Counters).release());
Register(NewLeaderElection(SelfId(), coordinatorId, config, CredentialsProviderFactory, YqSharedResources, Tenant, Counters).release());

CompileServiceActorId = Register(NRowDispatcher::CreatePurecalcCompileService());

Schedule(TDuration::Seconds(CoordinatorPingPeriodSec), new TEvPrivate::TEvCoordinatorPing());
Schedule(TDuration::Seconds(UpdateMetricsPeriodSec), new NFq::TEvPrivate::TEvUpdateMetrics());
Schedule(TDuration::Seconds(PrintStateToLogPeriodSec), new NFq::TEvPrivate::TEvPrintStateToLog());

if (Monitoring) {
::NMonitoring::TIndexMonPage* actorsMonPage = Monitoring->RegisterIndexPage("actors", "Actors");
Monitoring->RegisterActorPage(actorsMonPage, "row_dispatcher", "Row Dispatcher", false,
Expand Down Expand Up @@ -744,7 +751,7 @@ void TRowDispatcher::Handle(NFq::TEvRowDispatcher::TEvStartSession::TPtr& ev) {
source.GetDatabase(),
Config,
SelfId(),
PurecalcCompileServiceActorId(),
CompileServiceActorId,
ev->Get()->Record.GetPartitionId(),
YqSharedResources->UserSpaceYdbDriver,
CreateCredentialsProviderFactoryForStructuredToken(
Expand Down
5 changes: 0 additions & 5 deletions ydb/library/yql/tools/dqrun/dqrun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
#include <ydb/core/fq/libs/db_id_async_resolver_impl/mdb_endpoint_generator.h>
#include <ydb/core/fq/libs/init/init.h>
#include <ydb/core/fq/libs/row_dispatcher/row_dispatcher_service.h>
#include <ydb/core/fq/libs/row_dispatcher/purecalc_compilation/compile_service.h>

#include <ydb/core/util/pb.h>

Expand Down Expand Up @@ -521,10 +520,6 @@ void InitFq(const NFq::NConfig::TConfig& fqConfig, IPqGateway::TPtr pqGateway, T
additionalLocalServices.emplace_back(
NFq::RowDispatcherServiceActorId(),
TActorSetupCmd(rowDispatcher.release(), TMailboxType::Simple, 0));

additionalLocalServices.emplace_back(
NFq::PurecalcCompileServiceActorId(),
TActorSetupCmd(NFq::NRowDispatcher::CreatePurecalcCompileService(), TMailboxType::Simple, 0));
}
}

Expand Down

0 comments on commit 1112835

Please sign in to comment.