10

Find many option for run a map-reduce program. Can any one explain difference between theses below commands. And what impact on Map-reduce job if any.

     java -jar MyMapReduce.jar [args] 

     hadoop jar MyMapReduce.jar [args] 

     yarn jar MyMapReduce.jar [args] 

In these command which one best or other in any?

Can make configuration like display all information about job using Yarn and Job History (like as display Hadoop and yarn command) on Web service normal using port for web service 8088(YARN) on below command?

     java -jar MyMapReduce.jar [args] 

2 Answers 2

4

None of them is better than the other. When you execute the java -jar command, it is just the same as executing a non Hadoop application. If you use hadoop jar or yarn jar, it will use the /usr/bin/hadoop and /usr/bin/yarn scripts to set up the environment.

Unless you have modified any of the scripts to set up additional variables, the three of them should work the same.

1
  • When I run a map reduce job using "java -jar MyMapReduce.jar [args]" Not display job entry in YARN(WEB Service on port number 8088). But display all information about job in YARN service if run using YARN or HADOOP command
    – Tinku
    Aug 7, 2014 at 12:20
2

The options have its own specifications :

   java -jar MyMapReduce.jar [args] 

The above expects that all the hadoop jars are defined in class path of the jar .

in case of

   hadoop jar MyMapReduce.jar [args]  and 
   yarn jar MyMapReduce.jar [args] 

The above jars will run by fetching those jars predefined in $HADOOP_CLASSPATH.

3
  • When I run a map reduce job using "java -jar MyMapReduce.jar [args]" Not display job entry in YARN(WEB Service on port number 8088). But display all information about job in YARN service if run using YARN or HADOOP command
    – Tinku
    Aug 7, 2014 at 12:19
  • running using java -jar will spawn a java job , where as hadoop jar spawns a hadoop job , so its available in job tracker
    – K S Nidhin
    Aug 7, 2014 at 12:49
  • 1
    If a cluster have three node, And I run a map reduce job using java. It run on a single machine or using all node in cluster?
    – Tinku
    Aug 7, 2014 at 12:54

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.