You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ew...@apache.org on 2016/02/04 23:34:35 UTC

kafka git commit: MINOR: log connect reconfiguration error only if there was an error

Repository: kafka
Updated Branches:
  refs/heads/trunk 0a7b20e28 -> 9b47f9a7f


MINOR: log connect reconfiguration error only if there was an error

Author: Gwen Shapira <cs...@gmail.com>

Reviewers: Ewen Cheslack-Postava <ew...@confluent.io>

Closes #871 from gwenshap/fix-cc-log


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

Branch: refs/heads/trunk
Commit: 9b47f9a7f631ad4c84ab305126e71d74968cc967
Parents: 0a7b20e
Author: Gwen Shapira <cs...@gmail.com>
Authored: Thu Feb 4 14:34:29 2016 -0800
Committer: Ewen Cheslack-Postava <me...@ewencp.org>
Committed: Thu Feb 4 14:34:29 2016 -0800

----------------------------------------------------------------------
 .../kafka/connect/runtime/distributed/DistributedHerder.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/9b47f9a7/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java
----------------------------------------------------------------------
diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java
index a9e8dd5..8b0525b 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java
@@ -455,8 +455,10 @@ public class DistributedHerder implements Herder, Runnable {
                 new Callback<Void>() {
                     @Override
                     public void onCompletion(Throwable error, Void result) {
-                        log.error("Unexpected error during task reconfiguration: ", error);
-                        log.error("Task reconfiguration for {} failed unexpectedly, this connector will not be properly reconfigured unless manually triggered.", connName);
+                        if (error != null) {
+                            log.error("Unexpected error during task reconfiguration: ", error);
+                            log.error("Task reconfiguration for {} failed unexpectedly, this connector will not be properly reconfigured unless manually triggered.", connName);
+                        }
                     }
                 }
         );