Browse Source

HADOOP-13883. Addendum patch to correct the message and alphabetized with the earlier patch. Contributed by Yiqun Lin.

Brahma Reddy Battula 8 years ago
parent
commit
b8be8f0d4f

+ 8 - 5
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java

@@ -209,10 +209,11 @@ public class GenericOptionsParser {
    */
   @SuppressWarnings("static-access")
   private static synchronized Options buildGeneralOptions(Options opts) {
-    Option fs = OptionBuilder.withArgName("local|namenode:port")
-    .hasArg()
-    .withDescription("specify a namenode")
-    .create("fs");
+    Option fs = OptionBuilder.withArgName("file:///|hdfs://namenode:port")
+        .hasArg()
+        .withDescription("specify default filesystem URL to use, "
+        + "overrides 'fs.defaultFS' property from configurations.")
+        .create("fs");
     Option jt = OptionBuilder.withArgName("local|resourcemanager:port")
     .hasArg()
     .withDescription("specify a ResourceManager")
@@ -503,7 +504,9 @@ public class GenericOptionsParser {
     out.println("Generic options supported are");
     out.println("-conf <configuration file>     specify an application configuration file");
     out.println("-D <property=value>            use value for given property");
-    out.println("-fs <local|namenode:port>      specify a namenode");
+    out.println("-fs <file:///|hdfs://namenode:port> "
+        + "specify default filesystem URL to use, overrides "
+        + "'fs.defaultFS' property from configurations.");
     out.println("-jt <local|resourcemanager:port>    specify a ResourceManager");
     out.println("-files <comma separated list of files>    " + 
       "specify comma separated files to be copied to the map reduce cluster");

+ 1 - 1
hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md

@@ -39,11 +39,11 @@ Many subcommands honor a common set of configuration options to alter their beha
 
 | GENERIC\_OPTION | Description |
 |:---- |:---- |
-| `-fs <local> or <namenode:port>` | Specify a NameNode. |
 | `-archives <comma separated list of archives> ` | Specify comma separated archives to be unarchived on the compute machines. Applies only to job. |
 | `-conf <configuration file> ` | Specify an application configuration file. |
 | `-D <property>=<value> ` | Use value for given property. |
 | `-files <comma separated list of files> ` | Specify comma separated files to be copied to the map reduce cluster. Applies only to job. |
+| `-fs <file:///> or <hdfs://namenode:port>` | Specify default filesystem URL to use. Overrides 'fs.defaultFS' property from configurations. |
 | `-jt <local> or <resourcemanager:port>` | Specify a ResourceManager. Applies only to job. |
 | `-libjars <comma seperated list of jars> ` | Specify comma separated jar files to include in the classpath. Applies only to job. |
 

+ 3 - 1
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/pipes/TestPipeApplication.java

@@ -306,7 +306,9 @@ public class TestPipeApplication {
       assertTrue(out.toString().contains(
               "-D <property=value>            use value for given property"));
       assertTrue(out.toString().contains(
-              "-fs <local|namenode:port>      specify a namenode"));
+          "-fs <file:///|hdfs://namenode:port> "
+          + "specify default filesystem URL to use, overrides "
+          + "'fs.defaultFS' property from configurations."));
       assertTrue(out.toString().contains(
               "-jt <local|resourcemanager:port>    specify a ResourceManager"));
       assertTrue(out