@Inject public CloudWatchScanCountListener(AmazonCloudWatch cloudWatch, List<Dimension> dimensions, LifeCycleRegistry lifecycle) { _cloudWatch = cloudWatch; _dimensions = dimensions; lifecycle.manage(new ManagedGuavaService(this)); }
@Inject public DefaultReplicationManager(LifeCycleRegistry lifeCycle, FanoutManager fanoutManager, DataCenters dataCenters, Client jerseyClient, @ReplicationEnabled ValueStore<Boolean> replicationEnabled, @ReplicationKey String replicationApiKey, MetricRegistry metrics) { _fanoutManager = checkNotNull(fanoutManager, "fanoutManager"); _dataCenters = checkNotNull(dataCenters, "dataCenters"); _jerseyClient = checkNotNull(jerseyClient, "jerseyClient"); _replicationEnabled = checkNotNull(replicationEnabled, "replicationEnabled"); _replicationApiKey = checkNotNull(replicationApiKey, "replicationApiKey"); _metrics = checkNotNull(metrics, "metrics"); _healthCheckExecutor = defaultScheduledExecutor(lifeCycle, "Databus Replication HealthCheck"); lifeCycle.manage(new ManagedGuavaService(this)); }
@Inject public DefaultReplicationManager(LifeCycleRegistry lifeCycle, FanoutManager fanoutManager, DataCenters dataCenters, Client jerseyClient, @ReplicationEnabled ValueStore<Boolean> replicationEnabled, @ReplicationKey String replicationApiKey, MetricRegistry metrics) { _fanoutManager = checkNotNull(fanoutManager, "fanoutManager"); _dataCenters = checkNotNull(dataCenters, "dataCenters"); _jerseyClient = checkNotNull(jerseyClient, "jerseyClient"); _replicationEnabled = checkNotNull(replicationEnabled, "replicationEnabled"); _replicationApiKey = checkNotNull(replicationApiKey, "replicationApiKey"); _metrics = checkNotNull(metrics, "metrics"); _healthCheckExecutor = defaultScheduledExecutor(lifeCycle, "Databus Replication HealthCheck"); lifeCycle.manage(new ManagedGuavaService(this)); }
@Inject public FanoutLagMonitor(LifeCycleRegistry lifeCycle, MetricRegistry metricRegistry) { _metricRegistry = checkNotNull(metricRegistry, "metricRegistry"); _gauges = new MetricsGroup(metricRegistry); _lagTable = HashBasedTable.create(); lifeCycle.manage(new ManagedGuavaService(this)); }
@Inject public FanoutLagMonitor(LifeCycleRegistry lifeCycle, MetricRegistry metricRegistry) { _metricRegistry = checkNotNull(metricRegistry, "metricRegistry"); _gauges = new MetricsGroup(metricRegistry); _lagTable = HashBasedTable.create(); lifeCycle.manage(new ManagedGuavaService(this)); }
@Inject public MinSplitSizeCleanupMonitor(@DataStoreZooKeeper CuratorFramework curator, @SelfHostAndPort HostAndPort selfHostAndPort, LeaderServiceTask leaderServiceTask, LifeCycleRegistry lifecycle, @MinSplitSizeMap MapStore<DataStoreMinSplitSize> minSplitSizeMap, Clock clock) { super(curator, LEADER_DIR, selfHostAndPort.toString(), SERVICE_NAME, 1, TimeUnit.MINUTES, () -> new MigratorCleanupService(minSplitSizeMap, clock)); leaderServiceTask.register(SERVICE_NAME, this); lifecycle.manage(new ManagedGuavaService(this)); }
@Inject public MinSplitSizeCleanupMonitor(@DataStoreZooKeeper CuratorFramework curator, @SelfHostAndPort HostAndPort selfHostAndPort, LeaderServiceTask leaderServiceTask, LifeCycleRegistry lifecycle, @MinSplitSizeMap MapStore<DataStoreMinSplitSize> minSplitSizeMap, Clock clock) { super(curator, LEADER_DIR, selfHostAndPort.toString(), SERVICE_NAME, 1, TimeUnit.MINUTES, () -> new MigratorCleanupService(minSplitSizeMap, clock)); leaderServiceTask.register(SERVICE_NAME, this); lifecycle.manage(new ManagedGuavaService(this)); }
@Inject public ScanUploadSchedulingService(@ScannerZooKeeper CuratorFramework curator, @SelfHostAndPort HostAndPort selfHostAndPort, final ScanUploader scanUploader, final List<ScheduledDailyScanUpload> scheduledScans, final ScanCountListener scanCountListener, final StashRequestManager stashRequestManager, LifeCycleRegistry lifecycle, LeaderServiceTask leaderServiceTask, final MetricRegistry metricRegistry, final Clock clock) { super(curator, LEADER_DIR, selfHostAndPort.toString(), SERVICE_NAME, 1, TimeUnit.MINUTES, new Supplier<Service>() { @Override public Service get() { return new DelegateSchedulingService(scanUploader, stashRequestManager, scheduledScans, scanCountListener, clock); } }); ServiceFailureListener.listenTo(this, metricRegistry); leaderServiceTask.register(SERVICE_NAME, this); lifecycle.manage(new ManagedGuavaService(this)); }
@Inject public MigratorMonitor(@ScannerZooKeeper CuratorFramework curator, @SelfHostAndPort HostAndPort selfHostAndPort, final ScanWorkflow workflow, final MigratorStatusDAO statusDAO, final DataTools dataTools, LifeCycleRegistry lifecycle, LeaderServiceTask leaderServiceTask, MetricRegistry metricRegistry) { super(curator, LEADER_DIR, selfHostAndPort.toString(), SERVICE_NAME, 1, TimeUnit.MINUTES, new Supplier<Service>() { @Override public Service get() { return new LocalMigratorMonitor(workflow, statusDAO, dataTools); } }); ServiceFailureListener.listenTo(this, metricRegistry); leaderServiceTask.register(SERVICE_NAME, this); lifecycle.manage(new ManagedGuavaService(this)); } }
@Inject public ScanUploadMonitor(@ScannerZooKeeper CuratorFramework curator, @SelfHostAndPort HostAndPort selfHostAndPort, final ScanWorkflow scanWorkflow, final ScanStatusDAO scanStatusDAO, final ScanWriterGenerator scanWriterGenerator, final StashStateListener stashStateListener, final ScanCountListener scanCountListener, final DataTools dataTools, LifeCycleRegistry lifecycle, LeaderServiceTask leaderServiceTask, MetricRegistry metricRegistry, @DelegateCompactionControl CompactionControlSource compactionControlSource, DataCenters dataCenters) { super(curator, LEADER_DIR, selfHostAndPort.toString(), SERVICE_NAME, 1, TimeUnit.MINUTES, new Supplier<Service>() { @Override public Service get() { return new LocalScanUploadMonitor(scanWorkflow, scanStatusDAO, scanWriterGenerator, stashStateListener, scanCountListener, dataTools, compactionControlSource, dataCenters); } }); ServiceFailureListener.listenTo(this, metricRegistry); leaderServiceTask.register(SERVICE_NAME, this); lifecycle.manage(new ManagedGuavaService(this)); } }
@Inject CompactionControlMonitorManager(LifeCycleRegistry lifeCycle, @LocalCompactionControl CompactionControlSource compactionControlSource, @GlobalFullConsistencyZooKeeper CuratorFramework curator, @SelfHostAndPort HostAndPort self, Clock clock, LeaderServiceTask dropwizardTask, final MetricRegistry metricRegistry) { LeaderService leaderService = new LeaderService( curator, "/leader/compaction-control-monitor", self.toString(), "Leader-CompactionControlMonitor", 30, TimeUnit.MINUTES, () -> new CompactionControlMonitor(compactionControlSource, clock, metricRegistry) ); ServiceFailureListener.listenTo(leaderService, metricRegistry); dropwizardTask.register("stash-runtime-monitor", leaderService); lifeCycle.manage(new ManagedGuavaService(leaderService)); } }
@Inject SystemQueueMonitorManager(LifeCycleRegistry lifeCycle, final DatabusEventStore eventStore, final DataCenters dataCenters, @DatabusClusterInfo final Collection<ClusterInfo> clusterInfo, @DatabusZooKeeper CuratorFramework curator, @SelfHostAndPort HostAndPort self, @MasterFanoutPartitions int masterFanoutPartitions, @DataCenterFanoutPartitions int dataCenterFanoutPartitions, LeaderServiceTask dropwizardTask, final MetricRegistry metricRegistry) { LeaderService leaderService = new LeaderService( curator, "/leader/queue-monitor", self.toString(), "Leader-QueueMonitor", 1, TimeUnit.MINUTES, new Supplier<Service>() { @Override public Service get() { return new SystemQueueMonitor(eventStore, dataCenters, clusterInfo, masterFanoutPartitions, dataCenterFanoutPartitions, metricRegistry); } }); ServiceFailureListener.listenTo(leaderService, metricRegistry); dropwizardTask.register("queue-monitor", leaderService); lifeCycle.manage(new ManagedGuavaService(leaderService)); } }
@Inject SystemQueueMonitorManager(LifeCycleRegistry lifeCycle, final DatabusEventStore eventStore, final DataCenters dataCenters, @DatabusClusterInfo final Collection<ClusterInfo> clusterInfo, @DatabusZooKeeper CuratorFramework curator, @SelfHostAndPort HostAndPort self, @MasterFanoutPartitions int masterFanoutPartitions, @DataCenterFanoutPartitions int dataCenterFanoutPartitions, LeaderServiceTask dropwizardTask, final MetricRegistry metricRegistry) { LeaderService leaderService = new LeaderService( curator, "/leader/queue-monitor", self.toString(), "Leader-QueueMonitor", 1, TimeUnit.MINUTES, new Supplier<Service>() { @Override public Service get() { return new SystemQueueMonitor(eventStore, dataCenters, clusterInfo, masterFanoutPartitions, dataCenterFanoutPartitions, metricRegistry); } }); ServiceFailureListener.listenTo(leaderService, metricRegistry); dropwizardTask.register("queue-monitor", leaderService); lifeCycle.manage(new ManagedGuavaService(leaderService)); } }