hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [26/50] [abbrv] hadoop git commit: HDFS-9097. Erasure coding: update EC command "-s" flag to "-p" when specifying policy. Contributed by Zhe Zhang.
Date Wed, 30 Sep 2015 15:42:26 GMT
HDFS-9097. Erasure coding: update EC command "-s" flag to "-p" when specifying policy. Contributed
by Zhe Zhang.

Change-Id: I82919e55c4a0d8646d25a53aac757098a56b3029


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

Branch: refs/heads/trunk
Commit: 607bda2a21aebca7b363d57ddece8ce8b5db6c63
Parents: e36129b
Author: Zhe Zhang <zhezhang@cloudera.com>
Authored: Thu Sep 17 14:52:37 2015 -0700
Committer: Zhe Zhang <zhezhang@cloudera.com>
Committed: Thu Sep 17 14:52:37 2015 -0700

----------------------------------------------------------------------
 .../hadoop-hdfs/CHANGES-HDFS-EC-7285.txt              |  3 +++
 .../hadoop/hdfs/tools/erasurecode/ECCommand.java      |  6 +++---
 .../src/site/markdown/HDFSErasureCoding.md            |  4 ++--
 .../src/test/resources/testErasureCodingConf.xml      | 14 +++++++-------
 4 files changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/607bda2a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt
index 0345a54..3a29db1 100755
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt
@@ -429,3 +429,6 @@
     (Rakesh R via zhz)
 
     HDFS-9088. Cleanup erasure coding documentation. (wang via zhz)
+
+    HDFS-9097. Erasure coding: update EC command "-s" flag to "-p" when 
+    specifying policy. (zhz)

http://git-wip-us.apache.org/repos/asf/hadoop/blob/607bda2a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/erasurecode/ECCommand.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/erasurecode/ECCommand.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/erasurecode/ECCommand.java
index b857d3e..978fe47 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/erasurecode/ECCommand.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/erasurecode/ECCommand.java
@@ -80,11 +80,11 @@ public abstract class ECCommand extends Command {
    */
   static class SetECPolicyCommand extends ECCommand {
     public static final String NAME = "setPolicy";
-    public static final String USAGE = "[-s <policyName>] <path>";
+    public static final String USAGE = "[-p <policyName>] <path>";
     public static final String DESCRIPTION = 
         "Set a specified erasure coding policy to a directory\n"
         + "Options :\n"
-        + "  -s <policyName> : erasure coding policy name to encode files. "
+        + "  -p <policyName> : erasure coding policy name to encode files. "
         + "If not passed the default policy will be used\n"
         + "  <path>  : Path to a directory. Under this directory "
         + "files will be encoded using specified erasure coding policy";
@@ -93,7 +93,7 @@ public abstract class ECCommand extends Command {
 
     @Override
     protected void processOptions(LinkedList<String> args) throws IOException {
-      ecPolicyName = StringUtils.popOptionWithArgument("-s", args);
+      ecPolicyName = StringUtils.popOptionWithArgument("-p", args);
       if (args.isEmpty()) {
         throw new HadoopIllegalArgumentException("<path> is missing");
       }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/607bda2a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSErasureCoding.md
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSErasureCoding.md b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSErasureCoding.md
index 3040bf5..2323a6d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSErasureCoding.md
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSErasureCoding.md
@@ -110,7 +110,7 @@ Deployment
   HDFS provides an `erasurecode` subcommand to perform administrative commands related to
erasure coding.
 
        hdfs erasurecode [generic options]
-         [-setPolicy [-s <policyName>] <path>]
+         [-setPolicy [-p <policyName>] <path>]
          [-getPolicy <path>]
          [-listPolicies]
          [-usage [cmd ...]]
@@ -118,7 +118,7 @@ Deployment
 
 Below are the details about each command.
 
- *  `[-setPolicy [-s <policyName>] <path>]`
+ *  `[-setPolicy [-p <policyName>] <path>]`
 
     Sets an ErasureCoding policy on a directory at the specified path.
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/607bda2a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml
b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml
index 3a10a50..e72d862 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml
@@ -61,7 +61,7 @@
         </comparator>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^-setPolicy \[-s &lt;policyName&gt;\] &lt;path&gt;(.)*</expected-output>
+          <expected-output>^-setPolicy \[-p &lt;policyName&gt;\] &lt;path&gt;(.)*</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -109,7 +109,7 @@
       <description>setPolicy : set erasure coding policy on a directory to encode files</description>
       <test-commands>
         <command>-fs NAMENODE -mkdir /ecdir</command>
-        <ec-admin-command>-fs NAMENODE -setPolicy -s RS-6-3-64k /ecdir</ec-admin-command>
+        <ec-admin-command>-fs NAMENODE -setPolicy -p RS-6-3-64k /ecdir</ec-admin-command>
       </test-commands>
       <cleanup-commands>
         <command>-fs NAMENODE -rmdir /ecdir</command>
@@ -179,7 +179,7 @@
       <description>getPolicy : get EC policy information at specified path, which doesn't
have an EC policy</description>
       <test-commands>
         <command>-fs NAMENODE -mkdir /ecdir</command>
-        <ec-admin-command>-fs NAMENODE -setPolicy -s RS-6-3-64k /ecdir</ec-admin-command>
+        <ec-admin-command>-fs NAMENODE -setPolicy -p RS-6-3-64k /ecdir</ec-admin-command>
         <ec-admin-command>-fs NAMENODE -getPolicy /ecdir</ec-admin-command>
       </test-commands>
       <cleanup-commands>
@@ -197,7 +197,7 @@
       <description>getPolicy : get EC policy information at specified path, which doesn't
have an EC policy</description>
       <test-commands>
         <command>-fs NAMENODE -mkdir /ecdir</command>
-        <ec-admin-command>-fs NAMENODE -setPolicy -s RS-6-3-64k /ecdir</ec-admin-command>
+        <ec-admin-command>-fs NAMENODE -setPolicy -p RS-6-3-64k /ecdir</ec-admin-command>
         <command>-fs NAMENODE -touchz /ecdir/ecfile</command>
         <ec-admin-command>-fs NAMENODE -getPolicy /ecdir/ecfile</ec-admin-command>
       </test-commands>
@@ -250,7 +250,7 @@
       <description>setPolicy : illegal parameters - policy name is missing</description>
       <test-commands>
         <command>-fs NAMENODE -mkdir /ecdir</command>
-        <ec-admin-command>-fs NAMENODE -setPolicy -s</ec-admin-command>
+        <ec-admin-command>-fs NAMENODE -setPolicy -p</ec-admin-command>
       </test-commands>
       <cleanup-commands>
         <command>-fs NAMENODE -rmdir /ecdir</command>
@@ -258,7 +258,7 @@
       <comparators>
         <comparator>
           <type>RegexpComparator</type>
-          <expected-output>^-setPolicy: option -s requires 1 argument(.)*</expected-output>
+          <expected-output>^-setPolicy: option -p requires 1 argument(.)*</expected-output>
         </comparator>
       </comparators>
     </test>
@@ -284,7 +284,7 @@
       <description>setPolicy : illegal parameters - invalidpolicy</description>
       <test-commands>
         <command>-fs NAMENODE -mkdir /ecdir</command>
-        <ec-admin-command>-fs NAMENODE -setPolicy -s invalidpolicy /ecdir</ec-admin-command>
+        <ec-admin-command>-fs NAMENODE -setPolicy -p invalidpolicy /ecdir</ec-admin-command>
       </test-commands>
       <cleanup-commands>
         <command>-fs NAMENODE -rmdir /ecdir</command>


Mime
View raw message