hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinayakum...@apache.org
Subject [1/2] hadoop git commit: HDFS-9151. Mover should print the exit status/reason on console like balancer tool. (Contributed by Surendra singh lilhore)
Date Mon, 05 Oct 2015 07:54:16 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 e6514c6a3 -> dc72ed721
  refs/heads/trunk 30e2f836a -> 0faa4efa3


HDFS-9151. Mover should print the exit status/reason on console like balancer tool. (Contributed
by Surendra singh lilhore)


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

Branch: refs/heads/trunk
Commit: 0faa4efa3dd74de9cc39584bf6e88cfbf3e9a045
Parents: 30e2f83
Author: Vinayakumar B <vinayakumarb@apache.org>
Authored: Mon Oct 5 13:22:44 2015 +0530
Committer: Vinayakumar B <vinayakumarb@apache.org>
Committed: Mon Oct 5 13:22:44 2015 +0530

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt              |  3 +++
 .../java/org/apache/hadoop/hdfs/server/mover/Mover.java  | 11 +++++++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/0faa4efa/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index ec7e084..bf4284a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1489,6 +1489,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-11098. [JDK8] Max Non Heap Memory default changed between JDK7
     and 8 (ozawa).
 
+    HDFS-9151. Mover should print the exit status/reason on console like
+    balancer tool. (Surendra singh lilhore via vinayakumarb)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/0faa4efa/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java
index 1e07cad..d9ac0ba 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java
@@ -592,12 +592,23 @@ public class Mover {
             IOUtils.cleanup(LOG, nnc);
             iter.remove();
           } else if (r != ExitStatus.IN_PROGRESS) {
+            if (r == ExitStatus.NO_MOVE_PROGRESS) {
+              System.err.println("Failed to move some blocks after "
+                  + m.retryMaxAttempts + " retries. Exiting...");
+            } else if (r == ExitStatus.NO_MOVE_BLOCK) {
+              System.err.println("Some blocks can't be moved. Exiting...");
+            } else {
+              System.err.println("Mover failed. Exiting with status " + r
+                  + "... ");
+            }
             // must be an error statue, return
             return r.getExitCode();
           }
         }
         Thread.sleep(sleeptime);
       }
+      System.out.println("Mover Successful: all blocks satisfy"
+          + " the specified storage policy. Exiting...");
       return ExitStatus.SUCCESS.getExitCode();
     } finally {
       for (NameNodeConnector nnc : connectors) {


Mime
View raw message