kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: KAFKA-3058; remove the usage of deprecated config properties
Date Tue, 05 Jan 2016 20:04:59 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk c44c898ec -> b098f677a


KAFKA-3058; remove the usage of deprecated config properties

Author: Konrad <konkalita@gmail.com>
Author: konradkalita <konkalita@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Jun Rao <junrao@gmail.com>

Closes #732 from konradkalita/Kafka-3058


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/b098f677
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/b098f677
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/b098f677

Branch: refs/heads/trunk
Commit: b098f677aec998600f42529b0755b8fd39e777ff
Parents: c44c898
Author: Konrad <konkalita@gmail.com>
Authored: Tue Jan 5 12:04:55 2016 -0800
Committer: Jun Rao <junrao@gmail.com>
Committed: Tue Jan 5 12:04:55 2016 -0800

----------------------------------------------------------------------
 core/src/main/scala/kafka/tools/EndToEndLatency.scala     | 2 +-
 core/src/main/scala/kafka/tools/MirrorMaker.scala         | 4 ++--
 core/src/main/scala/kafka/tools/ProducerPerformance.scala | 4 +---
 3 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/b098f677/core/src/main/scala/kafka/tools/EndToEndLatency.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/tools/EndToEndLatency.scala b/core/src/main/scala/kafka/tools/EndToEndLatency.scala
index e457c82..e670d82 100755
--- a/core/src/main/scala/kafka/tools/EndToEndLatency.scala
+++ b/core/src/main/scala/kafka/tools/EndToEndLatency.scala
@@ -71,7 +71,7 @@ object EndToEndLatency {
     val producerProps = if (sslPropsFile.equals("")) new Properties() else Utils.loadProps(sslPropsFile)
     producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, brokerList)
     producerProps.put(ProducerConfig.LINGER_MS_CONFIG, "0") //ensure writes are synchronous
-    producerProps.put(ProducerConfig.BLOCK_ON_BUFFER_FULL_CONFIG, "true")
+    producerProps.put(ProducerConfig.MAX_BLOCK_MS_CONFIG, Long.MaxValue.toString)
     producerProps.put(ProducerConfig.ACKS_CONFIG, producerAcks.toString)
     producerProps.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.ByteArraySerializer")
     producerProps.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.ByteArraySerializer")

http://git-wip-us.apache.org/repos/asf/kafka/blob/b098f677/core/src/main/scala/kafka/tools/MirrorMaker.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/tools/MirrorMaker.scala b/core/src/main/scala/kafka/tools/MirrorMaker.scala
index d271c7c..f1d56b5 100755
--- a/core/src/main/scala/kafka/tools/MirrorMaker.scala
+++ b/core/src/main/scala/kafka/tools/MirrorMaker.scala
@@ -54,7 +54,7 @@ import scala.util.control.ControlThrowable
  *       1. use new producer with following settings
  *            acks=all
  *            retries=max integer
- *            block.on.buffer.full=true
+ *            max.block.ms=max long
  *            max.in.flight.requests.per.connection=1
  *       2. Consumer Settings
  *            auto.commit.enable=false
@@ -192,7 +192,7 @@ object MirrorMaker extends Logging with KafkaMetricsGroup {
       val producerProps = Utils.loadProps(options.valueOf(producerConfigOpt))
       // Defaults to no data loss settings.
       maybeSetDefaultProperty(producerProps, ProducerConfig.RETRIES_CONFIG, Int.MaxValue.toString)
-      maybeSetDefaultProperty(producerProps, ProducerConfig.BLOCK_ON_BUFFER_FULL_CONFIG,
"true")
+      maybeSetDefaultProperty(producerProps, ProducerConfig.MAX_BLOCK_MS_CONFIG, Long.MaxValue.toString)
       maybeSetDefaultProperty(producerProps, ProducerConfig.ACKS_CONFIG, "all")
       maybeSetDefaultProperty(producerProps, ProducerConfig.MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION,
"1")
       // Always set producer key and value serializer to ByteArraySerializer.

http://git-wip-us.apache.org/repos/asf/kafka/blob/b098f677/core/src/main/scala/kafka/tools/ProducerPerformance.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/tools/ProducerPerformance.scala b/core/src/main/scala/kafka/tools/ProducerPerformance.scala
index 7fab9d0..cf2000b 100644
--- a/core/src/main/scala/kafka/tools/ProducerPerformance.scala
+++ b/core/src/main/scala/kafka/tools/ProducerPerformance.scala
@@ -34,10 +34,8 @@ import org.apache.log4j.Logger
 
 /**
  * Load test for the producer
- *
- * @note This class will be replaced by org.apache.kafka.tools.ProducerPerformance after
the old producer client is removed
  */
-@deprecated
+@deprecated("This class will be replaced by org.apache.kafka.tools.ProducerPerformance after
the old producer client is removed", "0.9.0.0")
 object ProducerPerformance extends Logging {
 
   def main(args: Array[String]) {


Mime
View raw message