使用 hadoop 和 java 命令执行 map-reduce 作业有什么区别 [英] what difference between execute a map-reduce job using hadoop and java command
问题描述
找到许多运行 map-reduce 程序的选项.任何人都可以解释以下命令之间的区别.以及对 Map-reduce 工作的影响(如果有).
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?
可以使用以下命令中的 Web 服务端口 8088(YARN) 在 Web 服务上正常使用 Yarn 和 Job History(如显示 Hadoop 和 yarn 命令)显示有关作业的所有信息进行配置吗?
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]
推荐答案
没有一个比另一个更好.当你执行 java -jar
命令时,它和执行一个非 Hadoop 应用程序是一样的.如果您使用 hadoop jar
或 yarn jar
,它将使用 /usr/bin/hadoop
和 /usr/bin/yarn
脚本来设置环境.
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.
这篇关于使用 hadoop 和 java 命令执行 map-reduce 作业有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!