把mapreduce运行在远程集群上遇到的问题

Exception in thread "main" java.io.IOException: The ownership on the staging directory /tmp/hadoop-yarn/staging/hadoop/.staging is not as expected. It is owned by Administrators. The directory must be owned by the submitter hadoop or by hadoop

这里可以改一下Administrators为hadoop,如果注销重启后并不能生效就把tmp/hadoop-yarn/staging/hadoop/.staging整个目录删了,当然如果你的并不是Administrator这时候就把你对应的用户名改成hadoop.此处的hadoop就是你的集群名称

重新运行程序若出现

job.splitmetainfo does not exist 

不必惊慌在你的程序中添加 conf.set("fs.default.name", "hdfs://192.168.199.132:9000");改成自己的ip地址就解决了

猜你喜欢

转载自blog.csdn.net/qq_42039996/article/details/83416957