NewTopic newTopic = new NewTopic(topicName, kSpec.getPartitionCount(), (short) kSpec.getReplicationFactor());
/** * Make a copy of the spec with new properties * @param properties properties of the Kafka stream * @return new instance of {@link KafkaStreamSpec} */ public KafkaStreamSpec copyWithProperties(Properties properties) { return new KafkaStreamSpec(getId(), getPhysicalName(), getSystemName(), getPartitionCount(), getReplicationFactor(), properties); }
public KafkaStreamSpec copyWithReplicationFactor(int replicationFactor) { return new KafkaStreamSpec(getId(), getPhysicalName(), getSystemName(), getPartitionCount(), replicationFactor, getProperties()); }
/** * Make a copy of the spec with new properties * @param properties properties of the Kafka stream * @return new instance of {@link KafkaStreamSpec} */ public KafkaStreamSpec copyWithProperties(Properties properties) { return new KafkaStreamSpec(getId(), getPhysicalName(), getSystemName(), getPartitionCount(), getReplicationFactor(), properties); }
/** * Make a copy of the spec with new properties * @param properties properties of the Kafka stream * @return new instance of {@link KafkaStreamSpec} */ public KafkaStreamSpec copyWithProperties(Properties properties) { return new KafkaStreamSpec(getId(), getPhysicalName(), getSystemName(), getPartitionCount(), getReplicationFactor(), properties); }
public KafkaStreamSpec copyWithReplicationFactor(int replicationFactor) { return new KafkaStreamSpec(getId(), getPhysicalName(), getSystemName(), getPartitionCount(), replicationFactor, getProperties()); }
public KafkaStreamSpec copyWithReplicationFactor(int replicationFactor) { return new KafkaStreamSpec(getId(), getPhysicalName(), getSystemName(), getPartitionCount(), replicationFactor, getProperties()); }
Assert.assertEquals(topicName, kafkaSpec.getPhysicalName()); Assert.assertEquals(SYSTEM(), kafkaSpec.getSystemName()); Assert.assertEquals(defaultPartitionCount, kafkaSpec.getPartitionCount()); Assert.assertEquals("v2", kafkaSpec.getProperties().getProperty("p2")); Assert.assertEquals("123", kafkaSpec.getProperties().getProperty("retention.ms")); Assert.assertEquals(defaultPartitionCount, kafkaSpec.getPartitionCount());