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 ww...@apache.org on 2017/09/28 06:48:48 UTC

hadoop git commit: HDFS-12540. Ozone: node status text reported by SCM is a bit confusing. Contributed by Weiwei Yang.

Repository: hadoop
Updated Branches:
  refs/heads/HDFS-7240 7213e9a6f -> 5519edce5


HDFS-12540. Ozone: node status text reported by SCM is a bit confusing. Contributed by Weiwei Yang.


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

Branch: refs/heads/HDFS-7240
Commit: 5519edce58ac0541c4c8424d286d92ef450557a4
Parents: 7213e9a
Author: Weiwei Yang <ww...@apache.org>
Authored: Thu Sep 28 14:32:43 2017 +0800
Committer: Weiwei Yang <ww...@apache.org>
Committed: Thu Sep 28 14:32:43 2017 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/ozone/scm/node/SCMNodeManager.java  | 10 +++++-----
 .../org/apache/hadoop/ozone/scm/node/TestNodeManager.java |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/5519edce/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodeManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodeManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodeManager.java
index 6e2805a..9f73606 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodeManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/node/SCMNodeManager.java
@@ -320,7 +320,7 @@ public class SCMNodeManager
     if (isOutOfNodeChillMode()) {
       return "Out of chill mode." + getNodeStatus();
     } else {
-      return "Still in chill mode. Waiting on nodes to report in."
+      return "Still in chill mode, waiting on nodes to report in."
           + getNodeStatus();
     }
   }
@@ -330,10 +330,10 @@ public class SCMNodeManager
    * @return - String
    */
   private String getNodeStatus() {
-    final String chillModeStatus = " %d of out of total "
-        + "%d nodes have reported in.";
-    return String.format(chillModeStatus, totalNodes.get(),
-        getMinimumChillModeNodes());
+    return isOutOfNodeChillMode() ?
+        String.format(" %d nodes have reported in.", totalNodes.get()) :
+        String.format(" %d nodes reported, minimal %d nodes required.",
+            totalNodes.get(), getMinimumChillModeNodes());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5519edce/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/node/TestNodeManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/node/TestNodeManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/node/TestNodeManager.java
index c296169..e8bf0ad 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/node/TestNodeManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/node/TestNodeManager.java
@@ -896,7 +896,7 @@ public class TestNodeManager {
       nodeManager.sendHeartbeat(datanodeID, null);
       String status = nodeManager.getChillModeStatus();
       Assert.assertThat(status, CoreMatchers.containsString("Still in chill " +
-          "mode. Waiting on nodes to report in."));
+          "mode, waiting on nodes to report in."));
 
       // Should not exit chill mode since 10 nodes have not heartbeat yet.
       assertFalse(nodeManager.isOutOfNodeChillMode());


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