[hotfix] Only log retrying exception on debug in RetryingRegistration

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

Branch: refs/heads/master
Commit: ca9ee35c12e902c58d5d5d8077da258663386487
Parents: 24c2429
Author: Till Rohrmann <[email protected]>
Authored: Thu Feb 8 10:27:27 2018 +0100
Committer: Till Rohrmann <[email protected]>
Committed: Sun Feb 18 10:12:53 2018 +0100

----------------------------------------------------------------------
 .../runtime/registration/RetryingRegistration.java | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/ca9ee35c/flink-runtime/src/main/java/org/apache/flink/runtime/registration/RetryingRegistration.java
----------------------------------------------------------------------
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/registration/RetryingRegistration.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/registration/RetryingRegistration.java
index 279714b..6959729 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/registration/RetryingRegistration.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/registration/RetryingRegistration.java
@@ -207,7 +207,22 @@ public abstract class RetryingRegistration<F extends 
Serializable, G extends Rpc
                        resourceManagerAcceptFuture.whenCompleteAsync(
                                (Void v, Throwable failure) -> {
                                        if (failure != null && !canceled) {
-                                               log.warn("Could not resolve {} 
address {}, retrying in {} ms", targetName, targetAddress, delayOnError, 
failure);
+                                               final Throwable strippedFailure 
= ExceptionUtils.stripCompletionException(failure);
+                                               if (log.isDebugEnabled()) {
+                                                       log.debug(
+                                                               "Could not 
resolve {} address {}, retrying in {} ms.",
+                                                               targetName,
+                                                               targetAddress,
+                                                               delayOnError,
+                                                               
strippedFailure);
+                                               } else {
+                                                       log.info(
+                                                               "Could not 
resolve {} address {}, retrying in {} ms: {}.",
+                                                               targetName,
+                                                               targetAddress,
+                                                               delayOnError,
+                                                               
strippedFailure.getMessage());
+                                               }
 
                                                
startRegistrationLater(delayOnError);
                                        }

Reply via email to