【发布时间】:2017-02-14 18:28:30
【问题描述】:
我在单节点集群中的 Hadoop 2.7.3 中运行 MapReduce 作业。如何计算这个job的map和reduce任务所花费的时间?
已解决 如果它可以帮助任何查看此问题或面临类似问题的人。 感谢@Shubham 的回答和我所做的一些研究:
- 已在 hadoop 2 中删除作业跟踪器。它已分为资源管理器和应用程序主控器。
- 要访问资源管理器,请在浏览器中输入 URL“http://localhost:8088”
- 要访问作业历史服务器(查看有关已完成的应用程序和作业的统计信息),请在浏览器中输入 URL“http://localhost:19888”
您在尝试访问 Job History Server 时可能会遇到错误。它可能表明该应用程序没有历史记录。在这种情况下,请按照以下步骤操作:
- 更改 bashrc 文件
步骤:
i. In your terminal, type "nano ~/.bashrc"
ii. Now in this file, where the other hadoop variables are written add the line
export HADOOP_CONFIG_DIR=/usr/local/hadoop/etc/hadoop
iii. Exit out of nano and save the file.
iv. Run the command "source ~/.bashrc"
1。启动作业历史服务器
步骤:
i. Run the command in your terminal
$HADOOP_HOME/sbin/mr-jobhistory-daemon.sh --config $HADOOP_CONFIG_DIR start historyserver
ii. Then run the command
jps
You should be able to see the "JobHistoryServer" in the list
iii. Now run the command
netstat -ntlp | grep 19888
【问题讨论】: