コード例 #1
0
 public RtqElasticsearchOffsetStorage(IRtqElasticsearchClient elasticsearchClient,
                                      RtqEventLogOffsetInterpreter offsetInterpreter,
                                      [NotNull] string bladeKey)
 {
     this.elasticsearchClient = elasticsearchClient;
     this.offsetInterpreter   = offsetInterpreter;
     this.bladeKey            = bladeKey;
 }
コード例 #2
0
 public MonitoringService(IRtqTaskCounterEventFeeder taskCounterEventFeeder,
                          IRtqMonitoringEventFeeder monitoringEventFeeder,
                          RtqElasticsearchSchema rtqElasticsearchSchema,
                          IRtqElasticsearchClient elasticClient)
 {
     this.taskCounterEventFeeder = (RtqTaskCounterEventFeeder)taskCounterEventFeeder;
     this.monitoringEventFeeder  = (RtqMonitoringEventFeeder)monitoringEventFeeder;
     this.rtqElasticsearchSchema = rtqElasticsearchSchema;
     this.elasticClient          = elasticClient;
 }
コード例 #3
0
        public RtqMonitoringEventBulkIndexer(ILog logger,
                                             RtqElasticsearchIndexerSettings indexerSettings,
                                             IRtqElasticsearchClient elasticsearchClient,
                                             RemoteTaskQueue remoteTaskQueue,
                                             IStatsDClient statsDClient)
        {
            this.indexerSettings = indexerSettings;
            eventSource          = new RtqEventSource(remoteTaskQueue.EventLogRepository);
            offsetInterpreter    = new RtqEventLogOffsetInterpreter();
            var perfGraphiteReporter = new RtqMonitoringPerfGraphiteReporter(statsDClient,
                                                                             graphitePathPrefix: $"{indexerSettings.RtqGraphitePathPrefix}.ElasticsearchBulkIndexer.Perf");

            this.logger       = logger.ForContext("CassandraDistributedTaskQueue").ForContext(nameof(RtqMonitoringEventBulkIndexer));
            taskMetaProcessor = new TaskMetaProcessor(this.logger, indexerSettings, elasticsearchClient, remoteTaskQueue, perfGraphiteReporter);
        }
        public RtqMonitoringEventFeeder(ILog logger,
                                        RtqElasticsearchIndexerSettings indexerSettings,
                                        IRtqElasticsearchClient elasticsearchClient,
                                        IGraphiteClient graphiteClient,
                                        IStatsDClient statsDClient,
                                        IRtqPeriodicJobRunner rtqPeriodicJobRunner,
                                        RemoteTaskQueue remoteTaskQueue)
        {
            this.logger              = logger.ForContext("CassandraDistributedTaskQueue").ForContext(nameof(RtqMonitoringEventFeeder));
            this.indexerSettings     = indexerSettings;
            this.elasticsearchClient = elasticsearchClient;
            GlobalTime  = remoteTaskQueue.GlobalTime;
            eventSource = new RtqEventSource(remoteTaskQueue.EventLogRepository);
            var eventFeedPeriodicJobRunner = new RtqEventFeedPeriodicJobRunner(rtqPeriodicJobRunner, graphiteClient, indexerSettings.EventFeedGraphitePathPrefix);

            eventFeedFactory = new EventFeedFactory(new RtqEventFeedGlobalTimeProvider(GlobalTime), eventFeedPeriodicJobRunner);
            var perfGraphiteReporter = new RtqMonitoringPerfGraphiteReporter(statsDClient, indexerSettings.PerfGraphitePathPrefix);
            var taskMetaProcessor    = new TaskMetaProcessor(this.logger, indexerSettings, elasticsearchClient, remoteTaskQueue, perfGraphiteReporter);

            eventConsumer = new RtqMonitoringEventConsumer(indexerSettings, taskMetaProcessor);
        }
コード例 #5
0
 public TaskMetaProcessor(ILog logger,
                          RtqElasticsearchIndexerSettings settings,
                          IRtqElasticsearchClient elasticClient,
                          RemoteTaskQueue remoteTaskQueue,
                          RtqMonitoringPerfGraphiteReporter perfGraphiteReporter)
 {
     this.logger              = logger.ForContext(nameof(TaskMetaProcessor));
     this.settings            = settings;
     handleTasksMetaStorage   = remoteTaskQueue.HandleTasksMetaStorage;
     taskDataRegistry         = remoteTaskQueue.TaskDataRegistry;
     taskDataStorage          = remoteTaskQueue.TaskDataStorage;
     taskExceptionInfoStorage = remoteTaskQueue.TaskExceptionInfoStorage;
     serializer = remoteTaskQueue.Serializer;
     this.perfGraphiteReporter = perfGraphiteReporter;
     this.elasticClient        = elasticClient;
     bulkRequestTimeout        = new BulkRequestParameters
     {
         Timeout = this.settings.BulkIndexRequestTimeout,
         RequestConfiguration = new RequestConfiguration {
             RequestTimeout = this.settings.BulkIndexRequestTimeout
         }
     };
 }
 public ElasticAvailabilityChecker(IRtqElasticsearchClient elasticClient, ILog logger)
 {
     this.elasticClient = elasticClient;
     this.logger        = logger.ForContext("CassandraDistributedTaskQueue").ForContext(nameof(ElasticAvailabilityChecker));
 }
コード例 #7
0
 public TaskSearchClient(IRtqElasticsearchClient elasticClient)
 {
     this.elasticClient = elasticClient;
 }
コード例 #8
0
 public RtqElasticsearchSchema(IRtqElasticsearchClient elasticClient)
 {
     this.elasticClient = elasticClient;
 }