简体   繁体   English

使用hadoop和java命令执行map-reduce作业之间有什么区别

[英]what difference between execute a map-reduce job using hadoop and java command

Find many option for run a map-reduce program. 找到许多运行map-reduce程序的选项。 Can any one explain difference between theses below commands. 任何人都可以解释以下命令之间的差异。 And what impact on Map-reduce job if any. 如果有的话,会对Map减少工作产生什么影响。

     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? 可以使用下面的命令使用Web服务8088(YARN)的端口在Web服务正常上使用Yarn和Job History(如显示Hadoop和yarn命令)显示有关作业的所有信息的配置?

     java -jar MyMapReduce.jar [args] 

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. 执行java -jar命令时,它与执行非Hadoop应用程序相同。 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. 如果您使用hadoop jaryarn jar ,它将使用/usr/bin/hadoop/usr/bin/yarn脚本来设置环境。

Unless you have modified any of the scripts to set up additional variables, the three of them should work the same. 除非您修改了任何脚本以设置其他变量,否则它们中的三个应该相同。

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 . 以上期望所有hadoop jar都在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. 上面的jar将通过获取$ HADOOP_CLASSPATH中预定义的jar来运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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