简体   繁体   中英

Difference between Hadoop jar command and job command

What is difference between the two commands "jar" and "job".

*> Below is my understanding.

The command "jar"could be used to run MR jobs locally.

The "hadoop job" is deprecated and used to submit a job to the cluster. The alternative to that is the mapred command.

Also the jar command would run the MR job locally in the same node where we are executing the command and not anywhere else on the cluster. If we were to submit a job that would run on some non deterministic node on the cluster.*

Let me know if my understanding is correct and if not what exactly is the difference.

Thanks

They both are completely different and I don't think are comparable. Both co-exist and have separate functions and none is deprecated AFAIK.

job isn't used to submit a job to the cluster, rather it is used to get information on the jobs that have already been run or are running, also it is used to kill a running job or even kill a specific task.

While jar is simply used to execute the custom mapred jar, example:

$ bin/hadoop jar /usr/joe/wordcount.jar org.myorg.WordCount /usr/joe/wordcount/input /usr/joe/wordcount/output

hadoop 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 [mainClass] args...

hadoop job

Command to interact with Map Reduce Jobs.

*Usage: hadoop job [GENERIC_OPTIONS] [-submit ] | [-status ] | [-counter ] | [-kill ] | [-events <#-of-events>] | [-history [all] ] | [-list [all]] | [-kill-task ] | [-fail-task ] | [-set-priority ]*

For more info, read here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM