You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ij...@apache.org on 2017/10/12 09:12:50 UTC

kafka git commit: MINOR: Fix log message in AbstractFetcherThread

Repository: kafka
Updated Branches:
  refs/heads/trunk bfa82fc0b -> 57839e17c


MINOR: Fix log message in AbstractFetcherThread

Use Scala string templates instead of format

Author: Mickael Maison <mi...@gmail.com>

Reviewers: Ismael Juma <is...@juma.me.uk>

Closes #4058 from mimaison/minor_AFT_logging


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

Branch: refs/heads/trunk
Commit: 57839e17cf6ea287e5e16a5fa22b077e0d01854e
Parents: bfa82fc
Author: Mickael Maison <mi...@gmail.com>
Authored: Thu Oct 12 10:12:46 2017 +0100
Committer: Ismael Juma <is...@juma.me.uk>
Committed: Thu Oct 12 10:12:46 2017 +0100

----------------------------------------------------------------------
 core/src/main/scala/kafka/server/AbstractFetcherThread.scala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/57839e17/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/AbstractFetcherThread.scala b/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
index d6b9f1b..ddf6855 100755
--- a/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
+++ b/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
@@ -103,7 +103,7 @@ abstract class AbstractFetcherThread(name: String,
     val fetchRequest = inLock(partitionMapLock) {
       val ResultWithPartitions(fetchRequest, partitionsWithError) = buildFetchRequest(states)
       if (fetchRequest.isEmpty) {
-        trace("There are no active partitions. Back off for %d ms before sending a fetch request".format(fetchBackOffMs))
+        trace(s"There are no active partitions. Back off for $fetchBackOffMs ms before sending a fetch request")
         partitionMapCond.await(fetchBackOffMs, TimeUnit.MILLISECONDS)
       }
       handlePartitionsWithErrors(partitionsWithError)
@@ -217,7 +217,7 @@ abstract class AbstractFetcherThread(name: String,
                   }
                 case _ =>
                   if (isRunning.get) {
-                    error(s"Error for partition $topicPartition to broker %${sourceBroker.id}:${partitionData.exception.get}")
+                    error(s"Error for partition $topicPartition to broker ${sourceBroker.id}:${partitionData.exception.get}")
                     partitionsWithError += topicPartition
                   }
               }
@@ -227,7 +227,7 @@ abstract class AbstractFetcherThread(name: String,
     }
 
     if (partitionsWithError.nonEmpty)
-      debug("handling partitions with error for %s".format(partitionsWithError))
+      debug(s"handling partitions with error for $partitionsWithError")
     handlePartitionsWithErrors(partitionsWithError)
   }