@Inject MessagingMetadataPublisher(CConfiguration cConf, MessagingService messagingService) { this.topic = NamespaceId.SYSTEM.topic(cConf.get(Constants.Metadata.MESSAGING_TOPIC)); this.messagingService = messagingService; this.retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.metadata."); }
@Inject ProvisionerNotifier(CConfiguration cConf, MessagingService messagingService) { this.topic = NamespaceId.SYSTEM.topic(cConf.get(Constants.AppFabric.PROGRAM_STATUS_EVENT_TOPIC)); this.retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.program.state."); this.messagingService = messagingService; }
@Inject MessagingUsageWriter(CConfiguration cConf, MessagingService messagingService) { this.topic = NamespaceId.SYSTEM.topic(cConf.get(Constants.Metadata.MESSAGING_TOPIC)); this.messagingService = messagingService; this.retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.metadata."); }
@Inject MessagingLineageWriter(CConfiguration cConf, MessagingService messagingService) { this.topic = NamespaceId.SYSTEM.topic(cConf.get(Constants.Metadata.MESSAGING_TOPIC)); this.messagingService = messagingService; this.retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.metadata."); }
@Inject ProvisionerNotifier(CConfiguration cConf, MessagingService messagingService) { this.topic = NamespaceId.SYSTEM.topic(cConf.get(Constants.AppFabric.PROGRAM_STATUS_EVENT_TOPIC)); this.retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.program.state."); this.messagingService = messagingService; }
@Inject MessagingWorkflowStateWriter(CConfiguration cConf, MessagingService messagingService) { this.topic = NamespaceId.SYSTEM.topic(cConf.get(Constants.Metadata.MESSAGING_TOPIC)); this.messagingService = messagingService; this.retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.metadata."); }
@Inject MessagingMetadataPublisher(CConfiguration cConf, MessagingService messagingService) { this.topic = NamespaceId.SYSTEM.topic(cConf.get(Constants.Metadata.MESSAGING_TOPIC)); this.messagingService = messagingService; this.retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.metadata."); }
@Inject MessagingLineageWriter(CConfiguration cConf, MessagingService messagingService) { this.topic = NamespaceId.SYSTEM.topic(cConf.get(Constants.Metadata.MESSAGING_TOPIC)); this.messagingService = messagingService; this.retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.metadata."); }
@Inject MessagingWorkflowStateWriter(CConfiguration cConf, MessagingService messagingService) { this.topic = NamespaceId.SYSTEM.topic(cConf.get(Constants.Metadata.MESSAGING_TOPIC)); this.messagingService = messagingService; this.retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.metadata."); }
@Inject MessagingUsageWriter(CConfiguration cConf, MessagingService messagingService) { this.topic = NamespaceId.SYSTEM.topic(cConf.get(Constants.Metadata.MESSAGING_TOPIC)); this.messagingService = messagingService; this.retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.metadata."); }
@Inject public MessagingProgramStateWriter(CConfiguration cConf, MessagingService messagingService) { this.programStatePublisher = new MessagingProgramStatePublisher(messagingService, NamespaceId.SYSTEM.topic(cConf.get( Constants.AppFabric.PROGRAM_STATUS_EVENT_TOPIC)), RetryStrategies.fromConfiguration(cConf, "system.program.state.")); }
@Inject public MessagingProgramStateWriter(CConfiguration cConf, MessagingService messagingService) { this.programStatePublisher = new MessagingProgramStatePublisher(messagingService, NamespaceId.SYSTEM.topic(cConf.get( Constants.AppFabric.PROGRAM_STATUS_EVENT_TOPIC)), RetryStrategies.fromConfiguration(cConf, "system.program.state.")); }
@Inject MessagingMetricsCollectionService(CConfiguration cConf, MessagingService messagingService, DatumWriter<MetricValues> recordWriter) { String topicPrefix = cConf.get(Constants.Metrics.TOPIC_PREFIX); int totalTopicNum = cConf.getInt(Constants.Metrics.MESSAGING_TOPIC_NUM); Preconditions.checkArgument(totalTopicNum > 0, "Constants.Metrics.MESSAGING_TOPIC_NUM must be a positive integer"); this.messagingService = messagingService; this.recordWriter = recordWriter; // Parent guarantees the publish method would not get called concurrently, hence safe to reuse the same instances. this.encoderOutputStream = new ByteArrayOutputStream(1024); this.encoder = new BinaryEncoder(encoderOutputStream); RetryStrategy retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.metrics."); this.topicPayloads = new LinkedHashMap<>(totalTopicNum); for (int i = 0; i < totalTopicNum; i++) { topicPayloads.put(i, new TopicPayload(NamespaceId.SYSTEM.topic(topicPrefix + i), retryStrategy)); } }
private KafkaLogPublisher(CConfiguration cConf) { super(QUEUE_SIZE, RetryStrategies.fromConfiguration(cConf, "system.log.process.")); this.cConf = cConf; this.topic = cConf.get(Constants.Logging.KAFKA_TOPIC); this.loggingEventSerializer = new LoggingEventSerializer(); this.logPartitionType = LogPartitionType.valueOf(cConf.get(Constants.Logging.LOG_PUBLISH_PARTITION_KEY).toUpperCase()); }
@Inject MessagingMetricsCollectionService(CConfiguration cConf, MessagingService messagingService, DatumWriter<MetricValues> recordWriter) { super(TimeUnit.SECONDS.toMillis(cConf.getInt(Constants.Metrics.METRICS_MINIMUM_RESOLUTION_SECONDS))); String topicPrefix = cConf.get(Constants.Metrics.TOPIC_PREFIX); int totalTopicNum = cConf.getInt(Constants.Metrics.MESSAGING_TOPIC_NUM); Preconditions.checkArgument(totalTopicNum > 0, "Constants.Metrics.MESSAGING_TOPIC_NUM must be a positive integer"); this.messagingService = messagingService; this.recordWriter = recordWriter; // Parent guarantees the publish method would not get called concurrently, hence safe to reuse the same instances. this.encoderOutputStream = new ByteArrayOutputStream(1024); this.encoder = new BinaryEncoder(encoderOutputStream); RetryStrategy retryStrategy = RetryStrategies.fromConfiguration(cConf, "system.metrics."); this.topicPayloads = new LinkedHashMap<>(totalTopicNum); for (int i = 0; i < totalTopicNum; i++) { topicPayloads.put(i, new TopicPayload(NamespaceId.SYSTEM.topic(topicPrefix + i), retryStrategy)); } }
private KafkaLogPublisher(CConfiguration cConf) { super(QUEUE_SIZE, RetryStrategies.fromConfiguration(cConf, "system.log.process.")); this.cConf = cConf; this.topic = cConf.get(Constants.Logging.KAFKA_TOPIC); this.loggingEventSerializer = new LoggingEventSerializer(); this.logPartitionType = LogPartitionType.valueOf(cConf.get(Constants.Logging.LOG_PUBLISH_PARTITION_KEY).toUpperCase()); }
public ProgramStateWriterWithHeartBeat(ProgramRunId programRunId, ProgramStateWriter programStateWriter, MessagingService messagingService, CConfiguration cConf) { this(programRunId, programStateWriter, cConf.getLong(Constants.ProgramHeartbeat.HEARTBEAT_INTERVAL_SECONDS), new MessagingProgramStatePublisher(messagingService, NamespaceId.SYSTEM.topic(cConf.get( Constants.AppFabric.PROGRAM_STATUS_EVENT_TOPIC)), RetryStrategies.fromConfiguration(cConf, "system.program.state."))); }
public ProgramStateWriterWithHeartBeat(ProgramRunId programRunId, ProgramStateWriter programStateWriter, MessagingService messagingService, CConfiguration cConf) { this(programRunId, programStateWriter, cConf.getLong(Constants.ProgramHeartbeat.HEARTBEAT_INTERVAL_SECONDS), new MessagingProgramStatePublisher(messagingService, NamespaceId.SYSTEM.topic(cConf.get( Constants.AppFabric.PROGRAM_STATUS_EVENT_TOPIC)), RetryStrategies.fromConfiguration(cConf, "system.program.state."))); }
private TMSLogPublisher(CConfiguration cConf, MessagingService messagingService, int queueSize) { super(queueSize, RetryStrategies.fromConfiguration(cConf, "system.log.process.")); this.topicPrefix = cConf.get(Constants.Logging.TMS_TOPIC_PREFIX); this.numPartitions = cConf.getInt(Constants.Logging.NUM_PARTITIONS); this.loggingEventSerializer = new LoggingEventSerializer(); this.logPartitionType = LogPartitionType.valueOf(cConf.get(Constants.Logging.LOG_PUBLISH_PARTITION_KEY).toUpperCase()); this.messagingContext = new MultiThreadMessagingContext(messagingService); }
private TMSLogPublisher(CConfiguration cConf, MessagingService messagingService, int queueSize) { super(queueSize, RetryStrategies.fromConfiguration(cConf, "system.log.process.")); this.topicPrefix = cConf.get(Constants.Logging.TMS_TOPIC_PREFIX); this.numPartitions = cConf.getInt(Constants.Logging.NUM_PARTITIONS); this.loggingEventSerializer = new LoggingEventSerializer(); this.logPartitionType = LogPartitionType.valueOf(cConf.get(Constants.Logging.LOG_PUBLISH_PARTITION_KEY).toUpperCase()); this.messagingContext = new MultiThreadMessagingContext(messagingService); }