hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject git commit: HDFS-7154. Fix returning value of starting reconfiguration task (Lei Xu via Colin P. McCabe) (cherry picked from commit 7aab5fa1bd9386b036af45cd8206622a4555d74a) (cherry picked from commit 8c3b007236e01c7ad4922d1bf611e68d09adcfa8)
Date Tue, 21 Oct 2014 22:42:51 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.6 8727f9e1b -> 1ec2dbf09


HDFS-7154. Fix returning value of starting reconfiguration task (Lei Xu via Colin P. McCabe)
(cherry picked from commit 7aab5fa1bd9386b036af45cd8206622a4555d74a)
(cherry picked from commit 8c3b007236e01c7ad4922d1bf611e68d09adcfa8)


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

Branch: refs/heads/branch-2.6
Commit: 1ec2dbf09308bfefe10fc6764afceec3d73352b1
Parents: 8727f9e
Author: Colin Patrick Mccabe <cmccabe@cloudera.com>
Authored: Mon Oct 20 18:33:11 2014 -0700
Committer: Colin Patrick Mccabe <cmccabe@cloudera.com>
Committed: Tue Oct 21 15:42:39 2014 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                   | 3 +++
 .../src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java  | 7 ++++---
 .../test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java  | 3 +--
 3 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1ec2dbf0/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 327e3e5..22c6852 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -908,6 +908,9 @@ Release 2.6.0 - UNRELEASED
 
     HDFS-7167. NPE while running Mover if the given path is for a file. (jing9)
 
+    HDFS-7154. Fix returning value of starting reconfiguration task (Lei Xu via
+    Colin P. McCabe)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1ec2dbf0/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
index 298564e..041bc3d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
@@ -1396,11 +1396,12 @@ public class DFSAdmin extends FsShell {
       ClientDatanodeProtocol dnProxy = getDataNodeProxy(address);
       dnProxy.startReconfiguration();
       System.out.println("Started reconfiguration task on DataNode " + address);
+      return 0;
     } else {
       System.err.println("Node type " + nodeType +
           " does not support reconfiguration.");
+      return 1;
     }
-    return -1;
   }
 
   int getReconfigurationStatus(String nodeType, String address,
@@ -1438,11 +1439,11 @@ public class DFSAdmin extends FsShell {
         }
       } catch (IOException e) {
         err.println("DataNode reloading configuration: " + e + ".");
-        return -1;
+        return 1;
       }
     } else {
       err.println("Node type " + nodeType + " does not support reconfiguration.");
-      return -1;
+      return 1;
     }
     return 0;
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1ec2dbf0/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
index 35c61f0..9758955 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
@@ -35,7 +35,6 @@ import java.io.File;
 import java.io.IOException;
 import java.io.PrintStream;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Scanner;
 
@@ -109,7 +108,7 @@ public class TestDFSAdmin {
     final int port = datanode.getIpcPort();
     final String address = "localhost:" + port;
 
-    admin.startReconfiguration("datanode", address);
+    assertThat(admin.startReconfiguration("datanode", address), is(0));
 
     List<String> outputs = null;
     int count = 100;


Mime
View raw message