当我用这个命令运行map reduce时,它将成功。
hadoop jar /home/vagrant/reporter.jar ir.ac.sbu.data_mining.App
但是当我用资源管理器restapi运行它时,它说不是一个有效的jar。
Application application_1592576182542_0029 failed 2 times due to AM Container for appattempt_1592576182542_0029_000002 exited with exitCode: 255
For more detailed output, check application tracking page:http://master:8088/cluster/app/application_1592576182542_0029Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1592576182542_0029_02_000001
Exit code: 255
Exception message: Not a valid JAR: /home/vagrant/reporter.jar
Stack trace: ExitCodeException exitCode=255: Not a valid JAR: /home/vagrant/reporter.jar
at org.apache.hadoop.util.Shell.runCommand(Shell.java:585)
at org.apache.hadoop.util.Shell.run(Shell.java:482)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:776)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:212)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Container exited with a non-zero exit code 255
Failing this attempt. Failing the application.
这是我的请求主体:
'application-id': 'application_1592576182542_0029',
'application-type': 'MAPREDUCE',
'application-name': 'reporter',
'unmanaged-AM': false,
'max-app-attempts': 2,
'resources': {
'memory': 8192,
'vCores': 8,
},
'am-container-spec': {
'commands': {
'command': '/opt/hadoop/bin/hadoop jar /home/vagrant/reporter.jar ir.ac.sbu.data_mining.App',
},
}
hadoop版本是 2.7.7
操作系统是 Ubuntu 16.04
jdk版本是 1.8.0_192
暂无答案!
目前还没有任何答案,快来回答吧!