我正在使用hadoop 2.7.3在EMR上运行mapreduce / hadoop。 AWS的库存安装,并且该 jar 使用maven shade插件构建。等待ResourceManager时,它会无限卡住,但是我在日志文件或在线中绝对找不到任何东西。
在job.waitForCompletion
中,它包含以下内容:
020-01-25 05:52:41,346 INFO org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl (main): Timeline service address: http://ip-172-31-13-41.us-west-2.compute.internal:8188/ws/v1/timeline/
2020-01-25 05:52:41,356 INFO org.apache.hadoop.yarn.client.RMProxy (main): Connecting to ResourceManager at ip-172-31-13-41.us-west-2.compute.internal/172.31.13.41:8032
然后它就坐在那儿……永远都不会取得进展,因此必须关闭集群或手动终止任务。
有趣的是,通过运行
hadoop jar <arguments>
,我可以在本地重现此步骤,但是我不知道是什么原因引起的。25分钟左右后,在拆开 jar 时失败:
After 25 minutes or so, the job produces output of the form:
AM Container for appattempt_1580058321574_0005_000001 exited with exitCode: -1000
For more detailed output, check application tracking page:http://192.168.2.21:8088/cluster/app/application_1580058321574_0005Then, click on links to logs of each attempt.
Diagnostics: /Users/gbronner/hadoopdata/yarn/local/usercache/gbronner/appcache/application_1580058321574_0005/filecache/11_tmp/tmp_job.jar (Is a directory)
java.io.FileNotFoundException: /Users/gbronner/hadoopdata/yarn/local/usercache/gbronner/appcache/application_1580058321574_0005/filecache/11_tmp/tmp_job.jar (Is a directory)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:225)
at java.util.zip.ZipFile.<init>(ZipFile.java:155)
at java.util.jar.JarFile.<init>(JarFile.java:166)
at java.util.jar.JarFile.<init>(JarFile.java:130)
at org.apache.hadoop.util.RunJar.unJar(RunJar.java:94)
at org.apache.hadoop.yarn.util.FSDownload.unpack(FSDownload.java:297)
at org.apache.hadoop.yarn.util.FSDownload.call(FSDownload.java:364)
at org.apache.hadoop.yarn.util.FSDownload.call(FSDownload.java:62)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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)
Failing this attempt
这在AWS EMR和本地均会发生。从未见过此错误,并且直接使用EMR。
有什么想法为什么会发生这种情况?坏 jar ?可能与another unanswered question here相关
最佳答案
在详尽地尝试了数百个实验之后,看来违规行为是
job.setJar()。
为什么,我不知道。它在intellij下可以正常工作,但是在本地和intellij下都可以使用hadoop
命令可靠地崩溃。
关于java - EMR上的MapReduce无法联系RMProxy并陷入等待资源管理器的困境?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/59906835/