java.io.IOException:作业失败! 当使用 hadoop-0.19.1 在我的 osx 上运行示例应用程序时
bash-3.2$ echo $JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home bash-3.2$ bin/hadoop dfs -copyFromLocal conf /user/yokkom/input2 bash-3.2$ bin/hadoop jar hadoop-*-examples.jar grep input2 output 'dfs[a-z.]+' 09/04/17 10:09:32 INFO mapred.FileInputFormat: Total input paths to process : 10 09/04/17 10:09:33 INFO mapred.JobClient: Running job: job_200904171309_0001 java.io.IOException: Job failed! at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1232) at org.apache.hadoop.examples.Grep.run(Grep.java:69) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.examples.Grep.main(Grep.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68) at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:141) at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:165) at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79) at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
有谁知道为什么会发生这种情况? 同样的工作在 Linux 机器上运行得很好。 并且,发生“作业失败”后,整个 Hadoop 集群停止响应。
我的 MacOS 版本是 10.5.6。
编辑 hadoop-0.20.1 的结果相同
bash-3.2$ echo $JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home bash-3.2$ bin/hadoop dfs -copyFromLocal conf /user/yokkom/input2 bash-3.2$ bin/hadoop jar hadoop-*-examples.jar grep input2 output 'dfs[a-z.]+' 09/04/17 10:09:32 INFO mapred.FileInputFormat: Total input paths to process : 10 09/04/17 10:09:33 INFO mapred.JobClient: Running job: job_200904171309_0001 java.io.IOException: Job failed! at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1232) at org.apache.hadoop.examples.Grep.run(Grep.java:69) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.examples.Grep.main(Grep.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68) at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:141) at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:165) at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79) at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
Do anyone have any idea why this happens? The same job runs perfectly well on linux machines. And, after "Job failed" happens, the whole Hadoop cluster stops responding.
My MacOS version is 10.5.6.
EDIT The same result for hadoop-0.20.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我用谷歌搜索它,之前也发生过同样的错误(在完全相同的行)。 请阅读此处和此处。
第二个链接建议如下:
I googled for it and the same error (at the exact same line) has happened before. Read about it here and here.
The second link suggests the following:
是的,grep 会占用内存,尤其是在大型数据集上。 你的输入有多大? 顺便说一句,还有 Perm 内存。
http://java.sun.com/javase/technologies/hotspot/vmoptions。 jsp
有一些有趣的开关可以在 OutOfMemory 上执行自定义行为,但是我怀疑 jobRunner 只是在到达 VM 之前捕获所有内容。 您可能需要另一种方法来调试它。
Yeah grep can suck up memory, especially on large data sets. How big is your input? BTW, there's also Perm memory.
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
There's a few interesting switches to perform custom behaviour on OutOfMemory however I suspect the jobRunner is just catching everything before it gets to the VM. You may need another way to debug it.