From 39a1c42dfc78b1a55df1312c66daec4a491f0708 Mon Sep 17 00:00:00 2001 From: Qian Zheng <00117553@zte.intra> Date: Wed, 16 Nov 2016 11:36:05 -0800 Subject: [PATCH] MINOR: add a space to separate two words MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I think we should add a space here, otherwise the two words will join together. And replace the host string with a constant, otherwise when I need to modify the host, I need to modify several files. Author: 郑谦00117553 <00117553@zte.intra> Reviewers: Guozhang Wang Closes #2132 from ZhengQian1/trunk --- core/src/main/scala/kafka/server/KafkaConfig.scala | 2 +- examples/src/main/java/kafka/examples/Consumer.java | 2 +- examples/src/main/java/kafka/examples/Producer.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/kafka/server/KafkaConfig.scala b/core/src/main/scala/kafka/server/KafkaConfig.scala index c30e291b6d5..80568b3b2ba 100755 --- a/core/src/main/scala/kafka/server/KafkaConfig.scala +++ b/core/src/main/scala/kafka/server/KafkaConfig.scala @@ -368,7 +368,7 @@ object KafkaConfig { val BrokerIdGenerationEnableDoc = s"Enable automatic broker id generation on the server. When enabled the value configured for $MaxReservedBrokerIdProp should be reviewed." val MaxReservedBrokerIdDoc = "Max number that can be used for a broker.id" val BrokerIdDoc = "The broker id for this server. If unset, a unique broker id will be generated." + - "To avoid conflicts between zookeeper generated broker id's and user configured broker id's, generated broker ids" + + "To avoid conflicts between zookeeper generated broker id's and user configured broker id's, generated broker ids " + "start from " + MaxReservedBrokerIdProp + " + 1." val MessageMaxBytesDoc = "The maximum size of message that the server can receive" val NumNetworkThreadsDoc = "the number of network threads that the server uses for handling network requests" diff --git a/examples/src/main/java/kafka/examples/Consumer.java b/examples/src/main/java/kafka/examples/Consumer.java index 2a0c59a9c87..f9a9c0f5fb4 100644 --- a/examples/src/main/java/kafka/examples/Consumer.java +++ b/examples/src/main/java/kafka/examples/Consumer.java @@ -32,7 +32,7 @@ public class Consumer extends ShutdownableThread { public Consumer(String topic) { super("KafkaConsumerExample", false); Properties props = new Properties(); - props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092"); + props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, KafkaProperties.KAFKA_SERVER_URL + ":" + KafkaProperties.KAFKA_SERVER_PORT); props.put(ConsumerConfig.GROUP_ID_CONFIG, "DemoConsumer"); props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "true"); props.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, "1000"); diff --git a/examples/src/main/java/kafka/examples/Producer.java b/examples/src/main/java/kafka/examples/Producer.java index b83c0294617..ee2a59cd219 100644 --- a/examples/src/main/java/kafka/examples/Producer.java +++ b/examples/src/main/java/kafka/examples/Producer.java @@ -31,7 +31,7 @@ public class Producer extends Thread { public Producer(String topic, Boolean isAsync) { Properties props = new Properties(); - props.put("bootstrap.servers", "localhost:9092"); + props.put("bootstrap.servers", KafkaProperties.KAFKA_SERVER_URL + ":" + KafkaProperties.KAFKA_SERVER_PORT); props.put("client.id", "DemoProducer"); props.put("key.serializer", "org.apache.kafka.common.serialization.IntegerSerializer"); props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");