You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cl...@apache.org on 2019/09/26 22:48:42 UTC
[hadoop] branch trunk updated: HDFS-14785. [SBN read] Change client
logging to be less aggressive. Contributed by Chen Liang.
This is an automated email from the ASF dual-hosted git repository.
cliang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 2adcc3c HDFS-14785. [SBN read] Change client logging to be less aggressive. Contributed by Chen Liang.
2adcc3c is described below
commit 2adcc3c932fd4f39a42724390ba81b2d431d7782
Author: Chen Liang <cl...@apache.org>
AuthorDate: Thu Sep 26 14:07:32 2019 -0700
HDFS-14785. [SBN read] Change client logging to be less aggressive. Contributed by Chen Liang.
---
.../namenode/ha/ObserverReadProxyProvider.java | 26 ++++++++++++++++------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java
index 5780ce3..67c34fe 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java
@@ -286,8 +286,10 @@ public class ObserverReadProxyProvider<T>
} catch (IOException e) {
ioe = e;
}
- LOG.warn("Failed to connect to {} while fetching HAServiceState",
- proxyInfo.getAddress(), ioe);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Failed to connect to {} while fetching HAServiceState",
+ proxyInfo.getAddress(), ioe);
+ }
return null;
}
@@ -435,11 +437,21 @@ public class ObserverReadProxyProvider<T>
}
}
- // If we get here, it means all observers have failed.
- LOG.warn("{} observers have failed for read request {}; also found {} "
- + "standby, {} active, and {} unreachable. Falling back to active.",
- failedObserverCount, method.getName(), standbyCount, activeCount,
- unreachableCount);
+ // Only log message if there are actual observer failures.
+ // Getting here with failedObserverCount = 0 could
+ // be that there is simply no Observer node running at all.
+ if (failedObserverCount > 0) {
+ // If we get here, it means all observers have failed.
+ LOG.warn("{} observers have failed for read request {}; "
+ + "also found {} standby, {} active, and {} unreachable. "
+ + "Falling back to active.", failedObserverCount,
+ method.getName(), standbyCount, activeCount, unreachableCount);
+ } else {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Read falling back to active without observer read "
+ + "fail, is there no observer node running?");
+ }
+ }
}
// Either all observers have failed, observer reads are disabled,
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org