您的位置:首页 > 运维架构 > Apache

hadoop执行jar包时报 org.apache.hadoop.mapred.InvalidInputException: Input path does not exis

2012-03-09 14:22 786 查看
执行hadoop jar MaxTemperature.jar sample.txt output会报Exception in thread "main" org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://localhost:9000/user/root/sample.txt

原因是没有将文件上传到hdfs,因此需要上传到hdfs

上传时,需要在hdfs建好目录 hadoop fs -mkdir /test/ch02

然后上传hadoop fs -put sample.txt /user/root/test/

最后执行hadoop jar MaxTemperature.jar /user/root/test/sample.txt output

执行完毕后hadoop fs -ls /user/root/output

hadoop fs -cat /user/root/output/part-00000 就可以看到运行结果了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐