当我使用以下命令在hadoop-mapreduce-examples中执行wordcount程序时
hadoop jar /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.8.5.jar wordcount /wordcount/input/test_input.txt /wordcount/output
它让我跟随异常
Exception from container-launch.
Countainer id: countainer_1540539176003_003_01_000002
Exit code: 1
Stack trace: ExitCodeException exitCode 1;
at org.apache.hadoop.util.Sgell.runCommand(Shell.java:972)
at org.apache.hadoop.util.Sgell.run(Shell.java:869)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.javaL1170)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExcutor.java:235)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:299)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:83)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurreunt.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurreunt.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
at java.lang.Thread.run(Thread.java:748)
Container exited with a non-zero exit code 1
如何解决?
对不起,我是新来的。
这是否意味着存在一些内存问题?
答案 0 :(得分:0)
您需要先获取正确的日志。
在url to track the job
中找到YARN UI的地址。
如果该地址不可用,则可以将完整的应用程序ID复制到logs命令
yarn logs -applicationId application_1540...
从那里,您可以搜索由代码生成的堆栈跟踪。
如果您刚刚设置了Hadoop,我猜想hdfs dfs -ls /wordcount_input/
会引发一些关于不存在或权限被拒绝的错误