You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by kk...@apache.org on 2020/04/30 05:56:53 UTC

[kafka] branch 2.4 updated: MINOR: Fix unused arguments used in formatted string and log messages (#8036)

This is an automated email from the ASF dual-hosted git repository.

kkarantasis pushed a commit to branch 2.4
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.4 by this push:
     new d76883c  MINOR: Fix unused arguments used in formatted string and log messages (#8036)
d76883c is described below

commit d76883c066cbd43c10fd2b18709a8f374fdcf5b0
Author: Chia-Ping Tsai <ch...@gmail.com>
AuthorDate: Thu Apr 30 13:37:05 2020 +0800

    MINOR: Fix unused arguments used in formatted string and log messages (#8036)
    
    Reviewers: Ron Dagostino <rd...@confluent.io>, Ismael Juma <is...@juma.me.uk>, Konstantine Karantasis <ko...@confluent.io>
---
 .../main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java  | 2 +-
 .../src/main/java/org/apache/kafka/connect/runtime/Worker.java      | 2 +-
 .../src/main/java/org/apache/kafka/connect/util/TopicAdmin.java     | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java b/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
index c201fe6..1da0e66 100644
--- a/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
+++ b/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
@@ -2809,7 +2809,7 @@ public class KafkaAdminClient extends AdminClient {
                     context.getFuture().complete(consumerGroupDescription);
                 } else {
                     context.getFuture().completeExceptionally(new IllegalArgumentException(
-                        String.format("GroupId {} is not a consumer group ({}).",
+                        String.format("GroupId %s is not a consumer group (%s).",
                             context.getGroupId(), protocolType)));
                 }
             }
diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java
index e496d41..3c4ece7 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java
@@ -537,7 +537,7 @@ public class Worker {
                                       valueConverter, headerConverter, transformationChain, consumer, loader, time,
                                       retryWithToleranceOperator);
         } else {
-            log.error("Tasks must be a subclass of either SourceTask or SinkTask", task);
+            log.error("Tasks must be a subclass of either SourceTask or SinkTask and current is {}", task);
             throw new ConnectException("Tasks must be a subclass of either SourceTask or SinkTask");
         }
     }
diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/util/TopicAdmin.java b/connect/runtime/src/main/java/org/apache/kafka/connect/util/TopicAdmin.java
index 1fa04de..e644e80 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/util/TopicAdmin.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/util/TopicAdmin.java
@@ -236,19 +236,19 @@ public class TopicAdmin implements AutoCloseable {
                     continue;
                 }
                 if (cause instanceof UnsupportedVersionException) {
-                    log.debug("Unable to create topic(s) '{}' since the brokers at {} do not support the CreateTopics API.",
+                    log.debug("Unable to create topic(s) '{}' since the brokers at {} do not support the CreateTopics API." +
                             " Falling back to assume topic(s) exist or will be auto-created by the broker.",
                             topicNameList, bootstrapServers);
                     return Collections.emptySet();
                 }
                 if (cause instanceof ClusterAuthorizationException) {
-                    log.debug("Not authorized to create topic(s) '{}'." +
+                    log.debug("Not authorized to create topic(s) '{}' upon the brokers {}." +
                             " Falling back to assume topic(s) exist or will be auto-created by the broker.",
                             topicNameList, bootstrapServers);
                     return Collections.emptySet();
                 }
                 if (cause instanceof TopicAuthorizationException) {
-                    log.debug("Not authorized to create topic(s) '{}'." +
+                    log.debug("Not authorized to create topic(s) '{}' upon the brokers {}." +
                                     " Falling back to assume topic(s) exist or will be auto-created by the broker.",
                             topicNameList, bootstrapServers);
                     return Collections.emptySet();