更新时间:2024-05-28 GMT+08:00
查看调测结果
操作场景
MapReduce应用程序运行完成后,可通过如下方式查看应用程序的运行情况。
- 在IntelliJ IDEA中查看应用程序运行情况。
- 通过MapReduce日志获取应用程序运行情况。
- 登录MapReduce WebUI查看应用程序运行情况。
- 登录Yarn WebUI查看应用程序运行情况。
请联系管理员获取具有访问WebUI权限的业务账号及其密码。
操作步骤
- 查看运行结果获取应用运行情况
如下所示,通过控制台输出结果查看应用运行情况。
3614 [main] INFO org.apache.hadoop.hdfs.PeerCache - SocketCache disabled. 10159 [main] INFO org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input files to process : 2 11378 [main] INFO org.apache.hadoop.mapreduce.JobSubmitter - number of splits:2 12707 [main] INFO org.apache.hadoop.mapreduce.JobSubmitter - Submitting tokens for job: job_1468241424339_0002 16434 [main] INFO org.apache.hadoop.yarn.client.api.impl.YarnClientImpl - Submitted application application_1468241424339_0002 16656 [main] INFO org.apache.hadoop.mapreduce.Job - The url to track the job: http://10-120-180-170:8088/proxy/application_1468241424339_0002/ 16657 [main] INFO org.apache.hadoop.mapreduce.Job - Running job: job_1468241424339_0002 31177 [main] INFO org.apache.hadoop.mapreduce.Job - Job job_1468241424339_0002 running in uber mode : false 31200 [main] INFO org.apache.hadoop.mapreduce.Job - map 0% reduce 0% 45893 [main] INFO org.apache.hadoop.mapreduce.Job - map 100% reduce 0% 57172 [main] INFO org.apache.hadoop.mapreduce.Job - map 100% reduce 100% 58554 [main] INFO org.apache.hadoop.mapreduce.Job - Job job_1468241424339_0002 completed successfully 58908 [main] INFO org.apache.hadoop.mapreduce.Job - Counters: 49 File System Counters FILE: Number of bytes read=75 FILE: Number of bytes written=436979 FILE: Number of read operations=0 FILE: Number of large read operations=0 FILE: Number of write operations=0 HDFS: Number of bytes read=674 HDFS: Number of bytes written=23 HDFS: Number of read operations=9 HDFS: Number of large read operations=0 HDFS: Number of write operations=2 Job Counters Launched map tasks=2 Launched reduce tasks=1 Data-local map tasks=2 Total time spent by all maps in occupied slots (ms)=206088 Total time spent by all reduces in occupied slots (ms)=73824 Total time spent by all map tasks (ms)=25761 Total time spent by all reduce tasks (ms)=9228 Total vcore-seconds taken by all map tasks=25761 Total vcore-seconds taken by all reduce tasks=9228 Total megabyte-seconds taken by all map tasks=105517056 Total megabyte-seconds taken by all reduce tasks=37797888 Map-Reduce Framework Map input records=26 Map output records=16 Map output bytes=186 Map output materialized bytes=114 Input split bytes=230 Combine input records=16 Combine output records=6 Reduce input groups=3 Reduce shuffle bytes=114 Reduce input records=6 Reduce output records=2 Spilled Records=12 Shuffled Maps =2 Failed Shuffles=0 Merged Map outputs=2 GC time elapsed (ms)=356 CPU time spent (ms)=2860 Physical memory (bytes) snapshot=1601576960 Virtual memory (bytes) snapshot=12999819264 Total committed heap usage (bytes)=2403336192 Shuffle Errors BAD_ID=0 CONNECTION=0 IO_ERROR=0 WRONG_LENGTH=0 WRONG_MAP=0 WRONG_REDUCE=0 File Input Format Counters Bytes Read=444 File Output Format Counters Bytes Written=23
在Windows环境运行样例代码时会出现下面的异常,但是不影响业务:
java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
- 通过MapReduce服务的WebUI进行查看
使用具有任务查看权限的用户登录FusionInsight Manager,单击“集群 > 待操作集群的名称 > 服务 > Mapreduce > JobHistoryServer”进入Web界面后查看任务执行状态。
图1 JobHistory Web UI界面
- 通过YARN服务的WebUI进行查看
使用具有任务查看权限的用户登录FusionInsight Manager,单击“集群 > 待操作集群的名称 > 服务 > Yarn > ResourceManager(主)”进入Web界面后查看任务执行状态。图2 ResourceManager Web UI页面
- 查看MapReduce日志获取应用运行情况
您可以查看MapReduce日志了解应用运行情况,并根据日志信息调整应用程序。
父主题: 在Windows环境中调测程序