flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject [4/9] flink git commit: [hotfix] Only log retrying exception on debug in RetryingRegistration
Date Sun, 18 Feb 2018 09:13:57 GMT
[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 <trohrmann@apache.org>
Authored: Thu Feb 8 10:27:27 2018 +0100
Committer: Till Rohrmann <trohrmann@apache.org>
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);
 					}


Mime
View raw message