MAPREDUCE-5945. Update the description of GenericOptionsParser -jt option (Akira AJISAKA via aw)

This commit is contained in:
Allen Wittenauer 2014-09-26 14:25:49 -07:00
parent b40f433cf8
commit c7c8e388a9
4 changed files with 19 additions and 16 deletions

View File

@ -49,9 +49,9 @@
* <code>GenericOptionsParser</code> is a utility to parse command line * <code>GenericOptionsParser</code> is a utility to parse command line
* arguments generic to the Hadoop framework. * arguments generic to the Hadoop framework.
* *
* <code>GenericOptionsParser</code> recognizes several standarad command * <code>GenericOptionsParser</code> recognizes several standard command
* line arguments, enabling applications to easily specify a namenode, a * line arguments, enabling applications to easily specify a namenode, a
* jobtracker, additional configuration resources etc. * ResourceManager, additional configuration resources etc.
* *
* <h4 id="GenericOptions">Generic Options</h4> * <h4 id="GenericOptions">Generic Options</h4>
* *
@ -60,7 +60,7 @@
* -conf &lt;configuration file&gt; specify a configuration file * -conf &lt;configuration file&gt; specify a configuration file
* -D &lt;property=value&gt; use value for given property * -D &lt;property=value&gt; use value for given property
* -fs &lt;local|namenode:port&gt; specify a namenode * -fs &lt;local|namenode:port&gt; specify a namenode
* -jt &lt;local|jobtracker:port&gt; specify a job tracker * -jt &lt;local|resourcemanager:port&gt; specify a ResourceManager
* -files &lt;comma separated list of files&gt; specify comma separated * -files &lt;comma separated list of files&gt; specify comma separated
* files to be copied to the map reduce cluster * files to be copied to the map reduce cluster
* -libjars &lt;comma separated list of jars&gt; specify comma separated * -libjars &lt;comma separated list of jars&gt; specify comma separated
@ -90,13 +90,13 @@
* *
* $ bin/hadoop dfs -conf core-site.xml -conf hdfs-site.xml -ls /data * $ bin/hadoop dfs -conf core-site.xml -conf hdfs-site.xml -ls /data
* list /data directory in dfs with multiple conf files specified. * list /data directory in dfs with multiple conf files specified.
* *
* $ bin/hadoop job -D mapred.job.tracker=darwin:50020 -submit job.xml * $ bin/hadoop job -D yarn.resourcemanager.address=darwin:8032 -submit job.xml
* submit a job to job tracker darwin:50020 * submit a job to ResourceManager darwin:8032
* *
* $ bin/hadoop job -jt darwin:50020 -submit job.xml * $ bin/hadoop job -jt darwin:8032 -submit job.xml
* submit a job to job tracker darwin:50020 * submit a job to ResourceManager darwin:8032
* *
* $ bin/hadoop job -jt local -submit job.xml * $ bin/hadoop job -jt local -submit job.xml
* submit a job to local runner * submit a job to local runner
* *
@ -213,9 +213,9 @@ private static Options buildGeneralOptions(Options opts) {
.hasArg() .hasArg()
.withDescription("specify a namenode") .withDescription("specify a namenode")
.create("fs"); .create("fs");
Option jt = OptionBuilder.withArgName("local|jobtracker:port") Option jt = OptionBuilder.withArgName("local|resourcemanager:port")
.hasArg() .hasArg()
.withDescription("specify a job tracker") .withDescription("specify a ResourceManager")
.create("jt"); .create("jt");
Option oconf = OptionBuilder.withArgName("configuration file") Option oconf = OptionBuilder.withArgName("configuration file")
.hasArg() .hasArg()
@ -408,7 +408,7 @@ private String validateFiles(String files, Configuration conf)
else { else {
// check if the file exists in this file system // check if the file exists in this file system
// we need to recreate this filesystem object to copy // we need to recreate this filesystem object to copy
// these files to the file system jobtracker is running // these files to the file system ResourceManager is running
// on. // on.
FileSystem fs = path.getFileSystem(conf); FileSystem fs = path.getFileSystem(conf);
if (!fs.exists(path)) { if (!fs.exists(path)) {
@ -502,7 +502,7 @@ public static void printGenericCommandUsage(PrintStream out) {
out.println("-conf <configuration file> specify an application configuration file"); out.println("-conf <configuration file> specify an application configuration file");
out.println("-D <property=value> use value for given property"); out.println("-D <property=value> use value for given property");
out.println("-fs <local|namenode:port> specify a namenode"); out.println("-fs <local|namenode:port> specify a namenode");
out.println("-jt <local|jobtracker:port> specify a job tracker"); out.println("-jt <local|resourcemanager:port> specify a ResourceManager");
out.println("-files <comma separated list of files> " + out.println("-files <comma separated list of files> " +
"specify comma separated files to be copied to the map reduce cluster"); "specify comma separated files to be copied to the map reduce cluster");
out.println("-libjars <comma separated list of jars> " + out.println("-libjars <comma separated list of jars> " +

View File

@ -56,7 +56,7 @@ Generic Options
*------------------------------------------------+-----------------------------+ *------------------------------------------------+-----------------------------+
|<<<-D \<property\>=\<value\> >>> | Use value for given property. |<<<-D \<property\>=\<value\> >>> | Use value for given property.
*------------------------------------------------+-----------------------------+ *------------------------------------------------+-----------------------------+
|<<<-jt \<local\> or \<jobtracker:port\> >>> | Specify a job tracker. |<<<-jt \<local\> or \<resourcemanager:port\>>>> | Specify a ResourceManager.
| Applies only to job. | Applies only to job.
*------------------------------------------------+-----------------------------+ *------------------------------------------------+-----------------------------+
|<<<-files \<comma separated list of files\> >>> | Specify comma separated files |<<<-files \<comma separated list of files\> >>> | Specify comma separated files

View File

@ -387,6 +387,9 @@ Release 2.6.0 - UNRELEASED
MAPREDUCE-5796. Use current version of the archive name in MAPREDUCE-5796. Use current version of the archive name in
DistributedCacheDeploy document (Akira AJISAKA via aw) DistributedCacheDeploy document (Akira AJISAKA via aw)
MAPREDUCE-5945. Update the description of GenericOptionsParser -jt
option (Akira AJISAKA via aw)
Release 2.5.1 - 2014-09-05 Release 2.5.1 - 2014-09-05
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -308,7 +308,7 @@ public void testSubmitter() throws Exception {
assertTrue(out.toString().contains( assertTrue(out.toString().contains(
"-fs <local|namenode:port> specify a namenode")); "-fs <local|namenode:port> specify a namenode"));
assertTrue(out.toString().contains( assertTrue(out.toString().contains(
"-jt <local|jobtracker:port> specify a job tracker")); "-jt <local|ResourceManager:port> specify a ResourceManager"));
assertTrue(out assertTrue(out
.toString() .toString()
.contains( .contains(