Generic CLI options

The command-line options allow you to define files, archives, and additional libraries, which can then be used by tasks during job execution. There are also options for modifying configuration properties from the command-line.

The supported command-line options are described in the table.
Table 1.
Option Description

-D property=value

Sets a configuration property to a given value.
-conf file.xml Loads the set of configuration properties defined in the specified XML file.
-files file1,file2 Copies the specified files to a job-unique shared directory, making them visible for map/reduce tasks.
-archives archive1,archive2 Copies the specified archives to a job-unique shared directory and unarchives them, making them visible for map/reduce tasks. (Supported archive types are: zip, tar, tgz, tar.gz.)
-libjars jar1,jar2 Copies the specified JAR files to a job-unique shared directory and adds them to the CLASSPATH for job and map/reduce tasks.

The map/reduce application implements the Tool interface to support generic command-line options. The application then delegates the handling of standard command-line options to GenericOptionsParser via ToolRunner.run(Tool, String[]) and only handle its custom arguments.