hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From varunsax...@apache.org
Subject [32/50] [abbrv] hadoop git commit: HADOOP-11088. Quash unnecessary safemode WARN message during NameNode startup. Contributed by Yiqun Lin.
Date Sun, 06 Nov 2016 09:58:18 GMT
HADOOP-11088. Quash unnecessary safemode WARN message during NameNode startup. Contributed
by Yiqun Lin.


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

Branch: refs/heads/YARN-5355
Commit: 5cad93d5c753112931ce97dba966d1ce6b53724b
Parents: 7534aee
Author: Andrew Wang <wang@apache.org>
Authored: Thu Nov 3 15:30:57 2016 -0700
Committer: Andrew Wang <wang@apache.org>
Committed: Thu Nov 3 15:31:07 2016 -0700

----------------------------------------------------------------------
 .../hdfs/server/blockmanagement/BlockManagerSafeMode.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/5cad93d5/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManagerSafeMode.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManagerSafeMode.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManagerSafeMode.java
index a0017a1..ed304f2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManagerSafeMode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManagerSafeMode.java
@@ -36,6 +36,7 @@ import org.apache.hadoop.net.NetworkTopology;
 import org.apache.hadoop.util.Daemon;
 
 import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -127,8 +128,8 @@ class BlockManagerSafeMode {
     this.threshold = conf.getFloat(DFS_NAMENODE_SAFEMODE_THRESHOLD_PCT_KEY,
         DFS_NAMENODE_SAFEMODE_THRESHOLD_PCT_DEFAULT);
     if (this.threshold > 1.0) {
-      LOG.warn("The threshold value should't be greater than 1, threshold: {}",
-          threshold);
+      LOG.warn("The threshold value shouldn't be greater than 1, " +
+          "threshold: {}", threshold);
     }
     this.datanodeThreshold = conf.getInt(
         DFS_NAMENODE_SAFEMODE_MIN_DATANODES_KEY,
@@ -171,7 +172,8 @@ class BlockManagerSafeMode {
     startTime = monotonicNow();
     setBlockTotal(total);
     if (areThresholdsMet()) {
-      leaveSafeMode(true);
+      boolean exitResult = leaveSafeMode(false);
+      Preconditions.checkState(exitResult, "Failed to leave safe mode.");
     } else {
       // enter safe mode
       status = BMSafeModeStatus.PENDING_THRESHOLD;


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message