【大数据开发】hadoop2.x调试出现的问题2
1 单词统计 2 INFO - Connecting to ResourceManager at node-11/202.96.64.121:8032 3 WARN - Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this. 4 INFO - Total input paths to process : 1 5 INFO - number of splits:1 6 INFO - Submitting tokens for job: job_1520294752500_0010 7 INFO - Submitted application application_1520294752500_0010 8 INFO - The url to track the job: http://node-11:8088/proxy/application_1520294752500_0010/ 9 INFO - Running job: job_1520294752500_0010 10 INFO - Job job_1520294752500_0010 running in uber mode : false 11 INFO - map 0% reduce 0% 12 INFO - Job job_1520294752500_0010 failed with state FAILED due to: Application application_1520294752500_0010 failed 2 times due to AM Container for appattempt_1520294752500_0010_000002 exited with exitCode: 1 13 For more detailed output, check application tracking page:http://node-11:8088/cluster/app/application_1520294752500_0010Then, click on links to logs of each attempt. 14 Diagnostics: Exception from container-launch. 15 Container id: container_1520294752500_0010_02_000001 16 Exit code: 1 17 Exception message: /bin/bash: line 0: fg: no job control 18 19 Stack trace: ExitCodeException exitCode=1: /bin/bash: line 0: fg: no job control 20 21 at org.apache.hadoop.util.Shell.runCommand(Shell.java:585) 22 at org.apache.hadoop.util.Shell.run(Shell.java:482) 23 at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:776) 24 at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:212) 25 at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302) 26 at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82) 27 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 28 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 29 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 30 at java.lang.Thread.run(Thread.java:745) 31 32 33 Container exited with a non-zero exit code 1 34 Failing this attempt. Failing the application. 35 INFO - Counters: 0
解决方法:
第一种方法
1 conf.set("mapreduce.app-submission.cross-platform", "true");
第二种方法
1 在项目的core-site.xml添加: 2 3 <property> 4 <name>mapreduce.app-submission.cross-platform</name> 5 <value>true</value> 6 </property>