java.io.IOException:作业失败! 当使用 hadoop-0.19.1 在我的 osx 上运行示例应用程序时

发布于 2024-07-16 16:49:32 字数 2080 浏览 7 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

强者自强 2024-07-23 16:49:32

我用谷歌搜索它,之前也发生过同样的错误(在完全相同的行)。 请阅读此处此处

第二个链接建议如下:

  • 删除conf/log4j.properties以查看详细报告
  • 尝试增加堆内存(使用-Xms和-Xmx开关)

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:

  • Delete conf/log4j.properties to see a detailed report
  • Try to increase heap memory (using -Xms and -Xmx switches)
笙痞 2024-07-23 16:49:32

是的,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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文