首页 > 其他 > 详细

Hadoop

时间:2019-09-21 17:39:19      阅读:100      评论:0      收藏:0      [点我收藏+]

运行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”

Hadoop

原文:https://www.cnblogs.com/hello-glory/p/11563776.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!