Ver código fonte

HDFS-11405. Rename "erasurecode" CLI subcommand to "ec". Contributed by Manoj Govindassamy.

Andrew Wang 8 anos atrás
pai
commit
fc9ad3ce3a

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs

@@ -41,7 +41,7 @@ function hadoop_usage
   hadoop_add_subcommand "dfsadmin" "run a DFS admin client"
   hadoop_add_subcommand "diskbalancer" "Distributes data evenly among disks on a given node"
   hadoop_add_subcommand "envvars" "display computed Hadoop environment variables"
-  hadoop_add_subcommand "erasurecode" "run a HDFS ErasureCoding CLI"
+  hadoop_add_subcommand "ec" "run a HDFS ErasureCoding CLI"
   hadoop_add_subcommand "fetchdt" "fetch a delegation token from the NameNode"
   hadoop_add_subcommand "fsck" "run a DFS filesystem checking utility"
   hadoop_add_subcommand "getconf" "get config values from configuration"
@@ -129,7 +129,7 @@ function hdfscmd_case
       echo "HADOOP_TOOLS_LIB_JARS_DIR='${HADOOP_TOOLS_LIB_JARS_DIR}'"
       exit 0
     ;;
-    erasurecode)
+    ec)
       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.erasurecode.ECCli
     ;;
     fetchdt)

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/erasurecode/ECCli.java

@@ -32,7 +32,7 @@ import java.io.IOException;
 public class ECCli extends FsShell {
 
   private final static String usagePrefix =
-      "Usage: hdfs erasurecode [generic options]";
+      "Usage: hdfs ec [generic options]";
 
   @Override
   protected String getUsagePrefix() {

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md

@@ -431,11 +431,11 @@ Usage:
 
 Runs the diskbalancer CLI. See [HDFS Diskbalancer](./HDFSDiskbalancer.html) for more information on this command.
 
-### `erasurecode`
+### `ec`
 
 Usage:
 
-       hdfs erasurecode [generic options]
+       hdfs ec [generic options]
          [-setPolicy [-p <policyName>] <path>]
          [-getPolicy <path>]
          [-listPolicies]

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSErasureCoding.md

@@ -116,9 +116,9 @@ Deployment
 
 ### Administrative commands
 
-  HDFS provides an `erasurecode` subcommand to perform administrative commands related to erasure coding.
+  HDFS provides an `ec` subcommand to perform administrative commands related to erasure coding.
 
-       hdfs erasurecode [generic options]
+       hdfs ec [generic options]
          [-setPolicy [-p <policyName>] <path>]
          [-getPolicy <path>]
          [-unsetPolicy <path>]

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml

@@ -58,7 +58,7 @@
       <comparators>
         <comparator>
           <type>SubstringComparator</type>
-          <expected-output>Usage: hdfs erasurecode [generic options]</expected-output>
+          <expected-output>Usage: hdfs ec [generic options]</expected-output>
         </comparator>
       </comparators>
     </test>