hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject [11/52] [abbrv] hadoop git commit: HDFS-7808. Remove obsolete -ns options in in DFSHAAdmin.java. Contributed by Arshad Mohammad.
Date Mon, 23 Feb 2015 19:36:59 GMT
HDFS-7808. Remove obsolete -ns options in in DFSHAAdmin.java. Contributed by Arshad Mohammad.


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

Branch: refs/heads/HDFS-7285
Commit: 9a3e29208740da94d0cca5bb1c8163bea60d1387
Parents: 2aa9979
Author: Haohui Mai <wheat9@apache.org>
Authored: Wed Feb 18 15:14:39 2015 -0800
Committer: Haohui Mai <wheat9@apache.org>
Committed: Wed Feb 18 15:15:08 2015 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt     |  3 +++
 .../apache/hadoop/hdfs/tools/DFSHAAdmin.java    | 20 --------------------
 .../hadoop/hdfs/tools/TestDFSHAAdmin.java       | 20 --------------------
 .../hdfs/tools/TestDFSHAAdminMiniCluster.java   |  3 ---
 4 files changed, 3 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9a3e2920/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 70eae1c..3735e90 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -982,6 +982,9 @@ Release 2.7.0 - UNRELEASED
     HDFS-6662. WebHDFS cannot open a file if its path contains "%".
     (Gerson Carlos via wheat9)
 
+    HDFS-7808. Remove obsolete -ns options in in DFSHAAdmin.java.
+    (Arshad Mohammad via wheat9)
+
     BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
 
       HDFS-7720. Quota by Storage Type API, tools and ClientNameNode

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9a3e2920/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
index 1ec6d35..6b6fb30 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
@@ -18,7 +18,6 @@
 package org.apache.hadoop.hdfs.tools;
 
 import java.io.PrintStream;
-import java.util.Arrays;
 import java.util.Collection;
 
 import org.apache.commons.logging.Log;
@@ -98,25 +97,6 @@ public class DFSHAAdmin extends HAAdmin {
       printUsage(errOut);
       return -1;
     }
-
-    int i = 0;
-    String cmd = argv[i++];
-
-    if ("-ns".equals(cmd)) {
-      if (i == argv.length) {
-        errOut.println("Missing nameservice ID");
-        printUsage(errOut);
-        return -1;
-      }
-      nameserviceId = argv[i++];
-      if (i >= argv.length) {
-        errOut.println("Missing command");
-        printUsage(errOut);
-        return -1;
-      }
-      argv = Arrays.copyOfRange(argv, i, argv.length);
-    }
-    
     return super.runCmd(argv);
   }
   

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9a3e2920/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java
index 33da4d4..8ecc71a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdmin.java
@@ -147,17 +147,6 @@ public class TestDFSHAAdmin {
   }
   
   @Test
-  public void testNameserviceOption() throws Exception {
-    assertEquals(-1, runTool("-ns"));
-    assertOutputContains("Missing nameservice ID");
-    assertEquals(-1, runTool("-ns", "ns1"));
-    assertOutputContains("Missing command");
-    // "ns1" isn't defined but we check this lazily and help doesn't use the ns
-    assertEquals(0, runTool("-ns", "ns1", "-help", "transitionToActive"));
-    assertOutputContains("Transitions the service into Active");
-  }
-
-  @Test
   public void testNamenodeResolution() throws Exception {
     Mockito.doReturn(STANDBY_READY_RESULT).when(mockProtocol).getServiceStatus();
     assertEquals(0, runTool("-getServiceState", "nn1"));
@@ -279,15 +268,6 @@ public class TestDFSHAAdmin {
   }
 
   @Test
-  public void testFailoverWithFencerAndNameservice() throws Exception {
-    Mockito.doReturn(STANDBY_READY_RESULT).when(mockProtocol).getServiceStatus();
-    HdfsConfiguration conf = getHAConf();
-    conf.set(DFSConfigKeys.DFS_HA_FENCE_METHODS_KEY, getFencerTrueCommand());
-    tool.setConf(conf);
-    assertEquals(0, runTool("-ns", "ns1", "-failover", "nn1", "nn2"));
-  }
-
-  @Test
   public void testFailoverWithFencerConfiguredAndForce() throws Exception {
     Mockito.doReturn(STANDBY_READY_RESULT).when(mockProtocol).getServiceStatus();
     HdfsConfiguration conf = getHAConf();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9a3e2920/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java
index ee1c184..b4d45c3 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSHAAdminMiniCluster.java
@@ -156,9 +156,6 @@ public class TestDFSHAAdminMiniCluster {
     assertEquals(0, runTool("-transitionToActive", "nn1"));
     assertEquals(0, runTool("-failover", "nn1", "nn2"));
     
-    // Test failover with fencer and nameservice
-    assertEquals(0, runTool("-ns", "minidfs-ns", "-failover", "nn2", "nn1"));
-
     // Fencer has not run yet, since none of the above required fencing 
     assertEquals("", Files.toString(tmpFile, Charsets.UTF_8));
 


Mime
View raw message