Source:
public KafkaSystemAdmin(String systemName, Config config, Consumer metadataConsumer) { this.systemName = systemName; this.config = config; if (metadataConsumer == null) { throw new SamzaException( "Cannot construct KafkaSystemAdmin for system " + systemName + " with null metadataConsumer"); } this.threadSafeKafkaConsumer = new ThreadSafeKafkaConsumer(metadataConsumer); this.kafkaStartpointToOffsetResolver = new KafkaStartpointToOffsetResolver(threadSafeKafkaConsumer); Properties props = createAdminClientProperties(); LOG.info("New admin client with props:" + props); adminClient = AdminClient.create(props); StreamConfig streamConfig = new StreamConfig(config); KafkaConfig kafkaConfig = new KafkaConfig(streamConfig); coordinatorStreamReplicationFactor = Integer.valueOf(kafkaConfig.getCoordinatorReplicationFactor()); coordinatorStreamProperties = getCoordinatorStreamProperties(kafkaConfig); Map<String, String> storeToChangelog = kafkaConfig.getKafkaChangelogEnabledStores(); changelogTopicMetaInformation = new HashMap<>(); for (Map.Entry<String, String> e : storeToChangelog.entrySet()) { String storeName = e.getKey(); String topicName = e.getValue(); String replicationFactorStr = kafkaConfig.getChangelogStreamReplicationFactor(storeName); int replicationFactor = StringUtils.isEmpty(replicationFactorStr) ? DEFAULT_REPL_FACTOR : Integer.valueOf(replicationFactorStr); ChangelogInfo changelogInfo = new ChangelogInfo(replicationFactor, kafkaConfig.getChangelogKafkaProperties(storeName)); LOG.info(String.format("Creating topic meta information for topic: %s with replication factor: %s", topicName, replicationFactor)); changelogTopicMetaInformation.put(topicName, changelogInfo); } SystemConfig systemConfig = new SystemConfig(config); this.deleteCommittedMessages = systemConfig.deleteCommittedMessages(systemName); intermediateStreamProperties = getIntermediateStreamProperties(config); LOG.info(String.format("Created KafkaSystemAdmin for system %s", systemName)); }

Target:
public KafkaSystemAdmin(String systemName, Config config, Consumer metadataConsumer) { this.systemName = systemName; this.config = config; if (metadataConsumer == null) { throw new SamzaException( "Cannot construct KafkaSystemAdmin for system " + systemName + " with null metadataConsumer"); } this.threadSafeKafkaConsumer = new ThreadSafeKafkaConsumer(metadataConsumer); this.kafkaStartpointToOffsetResolver = new KafkaStartpointToOffsetResolver(threadSafeKafkaConsumer); Properties props = createAdminClientProperties(); LOG.info("New admin client with props:" + props); adminClient = AdminClient.create(props); StreamConfig streamConfig = new StreamConfig(config); KafkaConfig kafkaConfig = new KafkaConfig(config); coordinatorStreamReplicationFactor = Integer.valueOf(kafkaConfig.getCoordinatorReplicationFactor()); coordinatorStreamProperties = getCoordinatorStreamProperties(kafkaConfig); Map<String, String> storeToChangelog = kafkaConfig.getKafkaChangelogEnabledStores(); changelogTopicMetaInformation = new HashMap<>(); for (Map.Entry<String, String> e : storeToChangelog.entrySet()) { String storeName = e.getKey(); String topicName = e.getValue(); String replicationFactorStr = kafkaConfig.getChangelogStreamReplicationFactor(storeName); int replicationFactor = StringUtils.isEmpty(replicationFactorStr) ? DEFAULT_REPL_FACTOR : Integer.valueOf(replicationFactorStr); ChangelogInfo changelogInfo = new ChangelogInfo(replicationFactor, kafkaConfig.getChangelogKafkaProperties(storeName)); LOG.info(String.format("Creating topic meta information for topic: %s with replication factor: %s", topicName, replicationFactor)); changelogTopicMetaInformation.put(topicName, changelogInfo); } SystemConfig systemConfig = new SystemConfig(config); this.deleteCommittedMessages = systemConfig.deleteCommittedMessages(systemName); intermediateStreamProperties = getIntermediateStreamProperties(config); LOG.info(String.format("Created KafkaSystemAdmin for system %s", systemName)); }