org.apache.hadoop.util.Shell$ExitCodeException
2016-04-27 20:25
447 查看
spark,hadoop交流群,QQ群号:521066396,欢迎加入共同学习,一起进步~
问题:在集群上跑程序遇到如下错误:
如果在本地跑就不会出现上述问题。
将程序打成jar包在集群上跑,出现上述问题。
解决方法:
Configuration config = new Configuration();
config.set(“tmpjars”, jarPath);
其中,jarPath为程序中用到的jar包所在路径(无需包含Hadoop运行所需要的jar包)
通过 “conf.set(“tmpjars”, jars);” 可以设置第三方jar。
问题:在集群上跑程序遇到如下错误:
16/04/27 19:59:37 INFO mapreduce.Job: map 0% reduce 0% 16/04/27 19:59:37 INFO mapreduce.Job: Job job_1461208377524_0545 failed with state FAILED due to: Application application_1461208377524_0545 failed 2 times due to AM Container for appattempt_1461208377524_0545_000002 exited with exitCode: 1 due to: Exception from container-launch: org.apache.hadoop.util.Shell$ExitCodeException: org.apache.hadoop.util.Shell$ExitCodeException: at org.apache.hadoop.util.Shell.runCommand(Shell.java:505) at org.apache.hadoop.util.Shell.run(Shell.java:418) at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:650) at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:195) at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:300) at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:81) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Container exited with a non-zero exit code 1
如果在本地跑就不会出现上述问题。
将程序打成jar包在集群上跑,出现上述问题。
解决方法:
Configuration config = new Configuration();
config.set(“tmpjars”, jarPath);
其中,jarPath为程序中用到的jar包所在路径(无需包含Hadoop运行所需要的jar包)
通过 “conf.set(“tmpjars”, jars);” 可以设置第三方jar。
相关文章推荐
- bash快捷键
- Shell 脚本知识回顾 (四) —— Shell 命令及Shell 相关语句
- 常用的shell命令
- Shell在编程方面比Windows批处理强大很多,无论是在循环、运算。
- adb shell查看sqlite数据库
- 在linux下用shell将tomcat做成服务
- bash配置文件了解
- Shell之Mac下配置iTerm2 + zsh +tmux
- Shell教程
- Android adb shell启动应用程序的方法
- BASH SHELL下两个用于检查端口情况的脚本
- shell-awk高级应用
- 让shell脚本在后台运行的两种方法
- 使用sed替换替换指定行的日期部分
- Shell 更好看的回显
- 使用shell脚本显示出当前路径或者去掉目录路径
- 用shell脚本挂载linux主机拷贝相应文件copy.sh
- 用shell脚本挂载linux主机拷贝相应文件copy.sh
- 用shell脚本挂载linux主机拷贝相应文件copy.sh
- 用shell脚本挂载linux主机拷贝相应文件