当遇到job错误时,可以打开job,查看错误再解决
21/01/03 10:24:54 INFO mapreduce.Job: map 100% reduce 0%
21/01/03 10:24:55 INFO mapreduce.Job: map 100% reduce 100%
21/01/03 10:24:58 INFO mapreduce.Job: Job job_1609687269347_0001 failed with state FAILED due to: Task failed task_1609687269347_0001_m_000002
Job failed as tasks failed. failedMaps:1 failedReduces:0
21/01/03 10:24:58 INFO mapreduce.Job: Counters: 41
File System Counters
FILE: Number of bytes read=0
FILE: Number of bytes written=417171
FILE: Number of read operations=0
FILE: Number of large read operations=0
FILE: Number of write operations=0
HDFS: Number of bytes read=257
HDFS: Number of bytes written=0
HDFS: Number of read operations=6
HDFS: Number of large read operations=0
HDFS: Number of write operations=0
使用命令查看:
[hadoop@localhost hadoop]$ yarn logs -applicationId application_1609687269347_0001
其中application_1523430872525_0002是任务的编号。