hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1237534 - in /hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main: bin/hadoop java/org/apache/hadoop/ha/HAAdmin.java
Date Mon, 30 Jan 2012 02:52:27 GMT
Author: atm
Date: Mon Jan 30 02:52:27 2012
New Revision: 1237534

URL: http://svn.apache.org/viewvc?rev=1237534&view=rev
Log:
HDFS-2841. HAAdmin does not work if security is enabled. Contributed by Aaron T. Myers.

Modified:
    hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/bin/hadoop
    hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java

Modified: hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/bin/hadoop
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/bin/hadoop?rev=1237534&r1=1237533&r2=1237534&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/bin/hadoop
(original)
+++ hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/bin/hadoop
Mon Jan 30 02:52:27 2012
@@ -36,7 +36,6 @@ function print_usage(){
   echo "  classpath            prints the class path needed to get the"
   echo "                       Hadoop jar and the required libraries"
   echo "  daemonlog            get/set the log level for each daemon"
-  echo "  haadmin              run a HA admin client"
   echo " or"
   echo "  CLASSNAME            run the class named CLASSNAME"
   echo ""
@@ -112,10 +111,6 @@ case $COMMAND in
       CLASS=org.apache.hadoop.tools.HadoopArchives
       CLASSPATH=${CLASSPATH}:${TOOL_PATH}
       HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
-    elif [ "$COMMAND" = "haadmin" ] ; then
-      CLASS=org.apache.hadoop.ha.HAAdmin
-      CLASSPATH=${CLASSPATH}:${TOOL_PATH}
-      HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
     elif [[ "$COMMAND" = -*  ]] ; then
         # class and package names cannot begin with a -
         echo "Error: No command named \`$COMMAND' was found. Perhaps you meant \`hadoop ${COMMAND#-}'"

Modified: hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java?rev=1237534&r1=1237533&r2=1237534&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java
(original)
+++ hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java
Mon Jan 30 02:52:27 2012
@@ -37,7 +37,7 @@ import com.google.common.collect.Immutab
  * mode, or to trigger a health-check.
  */
 @InterfaceAudience.Private
-public class HAAdmin extends Configured implements Tool {
+public abstract class HAAdmin extends Configured implements Tool {
   
   private static Map<String, UsageInfo> USAGE =
     ImmutableMap.<String, UsageInfo>builder()
@@ -171,7 +171,6 @@ public class HAAdmin extends Configured 
           addr, getConf());
   }
 
-      
   @Override
   public int run(String[] argv) throws Exception {
     if (argv.length < 1) {
@@ -226,12 +225,6 @@ public class HAAdmin extends Configured 
     errOut.println(cmd + " [" + usageInfo.args + "]: " + usageInfo.help);
     return 1;
   }
-
-  public static void main(String[] argv) throws Exception {
-    int res = ToolRunner.run(new HAAdmin(), argv);
-    System.exit(res);
-  }
-  
   
   private static class UsageInfo {
     private final String args;



Mime
View raw message