jar
Runs a jar file. Users can bundle their Map Reduce code in a jar file and execute it using this command.
Usage:
hadoop jar <jar> [mainClass] args...
jar
is the command. hadoop*examples*.jar
is the jar file. WordCount
is the main class. The rest are arguments passed to the WordCount.main()
function:
public static void main(String[] args) throws Exception {
int res = ToolRunner.run(new Configuration(), new WordCount(), args);
System.exit(res);
}