转个解决 MapredLocalTask的帖子
我的问题是目录没有其他用户读权限,所以报错
http://vase.iteye.com/blog/2090320
不知道是不是hive-0.12版增强了local mode的原因,在之前版本运行好好的Hive-QL在这个版本上错误频频,折磨一天多以后终于定位到原因,把在内部的总结在这再记录下,希望对遇到同样问题的筒子们有所帮助。
部分一 关于return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask
Hive升级到0.12版之后,若干原来在0.10上执行正常的SQL会在新版上报错误 “return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask”,查看hive执行日志,从中找到如下错误
- Total MapReduce jobs = 1
- java.io.IOException: Cannot run program "/data/opt/hadoop_cdh5/bin/hadoop" (in directory "/root"): error=13, 权限不够
- at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
- at java.lang.Runtime.exec(Runtime.java:617)
- at java.lang.Runtime.exec(Runtime.java:450)
- at org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask.execute(MapredLocalTask.java:253)
- at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:151)
- at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65)
- at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1485)
- at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1263)
- at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1091)
- at org.apache.hadoop.hive.ql.Driver.run(Driver.java:931)
- at org.apache.hadoop.hive.ql.Driver.run(Driver.java:921)
- at org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:198)
- at org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(ThriftHive.java:644)
- at org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(ThriftHive.java:628)
- at org.apache.thrift.Pr