From b8be8f0d4f06c4ee29187cd81c2982ec8d4c408e Mon Sep 17 00:00:00 2001 From: Brahma Reddy Battula Date: Sat, 31 Dec 2016 16:27:17 +0530 Subject: [PATCH] HADOOP-13883. Addendum patch to correct the message and alphabetized with the earlier patch. Contributed by Yiqun Lin. --- .../apache/hadoop/util/GenericOptionsParser.java | 13 ++++++++----- .../src/site/markdown/CommandsManual.md | 2 +- .../hadoop/mapred/pipes/TestPipeApplication.java | 4 +++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java index cdc7b594b7e..0fc3bedb241 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/GenericOptionsParser.java +++ b/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 specify an application configuration file"); out.println("-D use value for given property"); - out.println("-fs specify a namenode"); + out.println("-fs " + + "specify default filesystem URL to use, overrides " + + "'fs.defaultFS' property from configurations."); out.println("-jt specify a ResourceManager"); out.println("-files " + "specify comma separated files to be copied to the map reduce cluster"); diff --git a/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md b/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md index fc5b9fe44cd..86f1837d92e 100644 --- a/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md +++ b/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 or ` | Specify a NameNode. | | `-archives ` | Specify comma separated archives to be unarchived on the compute machines. Applies only to job. | | `-conf ` | Specify an application configuration file. | | `-D = ` | Use value for given property. | | `-files ` | Specify comma separated files to be copied to the map reduce cluster. Applies only to job. | +| `-fs or ` | Specify default filesystem URL to use. Overrides 'fs.defaultFS' property from configurations. | | `-jt or ` | Specify a ResourceManager. Applies only to job. | | `-libjars ` | Specify comma separated jar files to include in the classpath. Applies only to job. | diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/pipes/TestPipeApplication.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/pipes/TestPipeApplication.java index 64fdf415013..28f41860900 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/pipes/TestPipeApplication.java +++ b/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 use value for given property")); assertTrue(out.toString().contains( - "-fs specify a namenode")); + "-fs " + + "specify default filesystem URL to use, overrides " + + "'fs.defaultFS' property from configurations.")); assertTrue(out.toString().contains( "-jt specify a ResourceManager")); assertTrue(out