运行mapreduce时出现的错误:
1:org.apache.hadoop.mapreduce.lib.input.InvalidInputException: **Input path does not exist: hdfs://Master:9000/user/hadoop/inputpath**
org.apache.hadoop.mapreduce.lib.input.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:323)
出错原因:目录不存在
解决办法:
分布式环境中创建input目录
hdfs dfs -mkdir -p /user/hadoop
hdfs dfs -mkdir input
hdfs dfs -put ./*.xml input
hadoop jar ...........
-------------------------------------------------------------------------------------------------------------------------------
2:14/04/29 02:45:07 INFO mapreduce.Job: Job job_1398704073313_0021 failed with state FAILED due to: Application application_1398704073313_0021 failed 2 times due to Error launching appattempt_1398704073313_0021_000002. Got exception: org.apache.hadoop.yarn.exceptions.YarnException: Unauthorized request to start container.
This token is expired. current time is 1398762692768 found 1398711306590
出错的原因: namenode,datanode时间同步问题
解决办法:
多个datanode与namenode进行时间同步,在每台服务器执行如下两个命令进行同步
1)输入“cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime”
2)输入“ntpdate pool.ntp.org”
原文:https://www.cnblogs.com/hello-glory/p/11563776.html