10
10
#include < ydb/library/yql/providers/dq/counters/counters.h>
11
11
#include < yql/essentials/public/purecalc/common/interface.h>
12
12
13
- #include < ydb/core/base/appdata_fwd.h>
14
13
#include < ydb/core/fq/libs/actors/logging/log.h>
15
14
#include < ydb/core/fq/libs/events/events.h>
16
15
#include < ydb/core/mon/mon.h>
@@ -261,6 +260,7 @@ class TRowDispatcher : public TActorBootstrapped<TRowDispatcher> {
261
260
const ::NMonitoring::TDynamicCounterPtr Counters;
262
261
TRowDispatcherMetrics Metrics;
263
262
NYql::IPqGateway::TPtr PqGateway;
263
+ NActors::TMon* Monitoring;
264
264
TNodesTracker NodesTracker;
265
265
TAggregatedStats AggrStats;
266
266
@@ -329,7 +329,8 @@ class TRowDispatcher : public TActorBootstrapped<TRowDispatcher> {
329
329
const TString& tenant,
330
330
const NFq::NRowDispatcher::IActorFactory::TPtr& actorFactory,
331
331
const ::NMonitoring::TDynamicCounterPtr& counters,
332
- const NYql::IPqGateway::TPtr& pqGateway);
332
+ const NYql::IPqGateway::TPtr& pqGateway,
333
+ NActors::TMon* monitoring = nullptr );
333
334
334
335
void Bootstrap ();
335
336
@@ -401,7 +402,8 @@ TRowDispatcher::TRowDispatcher(
401
402
const TString& tenant,
402
403
const NFq::NRowDispatcher::IActorFactory::TPtr& actorFactory,
403
404
const ::NMonitoring::TDynamicCounterPtr& counters,
404
- const NYql::IPqGateway::TPtr& pqGateway)
405
+ const NYql::IPqGateway::TPtr& pqGateway,
406
+ NActors::TMon* monitoring)
405
407
: Config(config)
406
408
, CredentialsProviderFactory(credentialsProviderFactory)
407
409
, PureCalcProgramFactory(CreatePureCalcProgramFactory())
@@ -412,7 +414,9 @@ TRowDispatcher::TRowDispatcher(
412
414
, ActorFactory(actorFactory)
413
415
, Counters(counters)
414
416
, Metrics(counters)
415
- , PqGateway(pqGateway) {
417
+ , PqGateway(pqGateway)
418
+ , Monitoring(monitoring)
419
+ {
416
420
}
417
421
418
422
void TRowDispatcher::Bootstrap () {
@@ -425,11 +429,9 @@ void TRowDispatcher::Bootstrap() {
425
429
Schedule (TDuration::Seconds (CoordinatorPingPeriodSec), new TEvPrivate::TEvCoordinatorPing ());
426
430
Schedule (TDuration::Seconds (UpdateMetricsPeriodSec), new NFq::TEvPrivate::TEvUpdateMetrics ());
427
431
Schedule (TDuration::Seconds (PrintStateToLogPeriodSec), new NFq::TEvPrivate::TEvPrintStateToLog ());
428
-
429
- NActors::TMon* mon = NKikimr::AppData ()->Mon ;
430
- if (mon) {
431
- ::NMonitoring::TIndexMonPage* actorsMonPage = mon->RegisterIndexPage (" actors" , " Actors" );
432
- mon->RegisterActorPage (actorsMonPage, " row_dispatcher" , " Row Dispatcher" , false ,
432
+ if (Monitoring) {
433
+ ::NMonitoring::TIndexMonPage* actorsMonPage = Monitoring->RegisterIndexPage (" actors" , " Actors" );
434
+ Monitoring->RegisterActorPage (actorsMonPage, " row_dispatcher" , " Row Dispatcher" , false ,
433
435
TlsActivationContext->ExecutorThread .ActorSystem , SelfId ());
434
436
}
435
437
NodesTracker.Init (SelfId ());
@@ -964,7 +966,8 @@ std::unique_ptr<NActors::IActor> NewRowDispatcher(
964
966
const TString& tenant,
965
967
const NFq::NRowDispatcher::IActorFactory::TPtr& actorFactory,
966
968
const ::NMonitoring::TDynamicCounterPtr& counters,
967
- const NYql::IPqGateway::TPtr& pqGateway)
969
+ const NYql::IPqGateway::TPtr& pqGateway,
970
+ NActors::TMon* monitoring)
968
971
{
969
972
return std::unique_ptr<NActors::IActor>(new TRowDispatcher (
970
973
config,
@@ -974,7 +977,8 @@ std::unique_ptr<NActors::IActor> NewRowDispatcher(
974
977
tenant,
975
978
actorFactory,
976
979
counters,
977
- pqGateway));
980
+ pqGateway,
981
+ monitoring));
978
982
}
979
983
980
984
} // namespace NFq
0 commit comments