Skip to content

Commit

Permalink
The number of replicas for the command topic should be set by 'ksql.s… (
Browse files Browse the repository at this point in the history
#565)

* The number of replicas for the command topic should be set by 'ksql.sink.replicas'.

* Minor style change.
  • Loading branch information
hjafarpour authored Dec 20, 2017
1 parent 17d7d45 commit ef15dac
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import io.confluent.ksql.util.KafkaTopicClient;
import io.confluent.ksql.util.KafkaTopicClientImpl;
import io.confluent.ksql.util.KsqlConfig;
import io.confluent.ksql.util.KsqlConstants;
import io.confluent.ksql.util.Version;
import io.confluent.rest.Application;
import io.confluent.rest.validation.JacksonMessageBodyProvider;
Expand Down Expand Up @@ -244,9 +243,9 @@ public static KsqlRestApplication buildApplication(

try {
short replicationFactor = 1;
if(restConfig.getOriginals().containsKey(KsqlConstants.SINK_NUMBER_OF_REPLICAS)) {
if(restConfig.getOriginals().containsKey(KsqlConfig.SINK_NUMBER_OF_REPLICAS_PROPERTY)) {
replicationFactor = Short.parseShort(restConfig.getOriginals()
.get(KsqlConstants.SINK_NUMBER_OF_REPLICAS).toString());
.get(KsqlConfig.SINK_NUMBER_OF_REPLICAS_PROPERTY).toString());
}
client.createTopic(commandTopic, 1, replicationFactor);
} catch (KafkaTopicException e) {
Expand Down

0 comments on commit ef15dac

Please sign in to comment.