Giraph 运行常见错误

1. Could not find or load main class org.apache.giraph.yarn.GiraphApplicationMaster

16/08/30 08:45:13 ERROR yarn.GiraphYarnClient: Giraph: org.apache.giraph.examples.SimpleShortestPathsComputation reports FAILED state, diagnostics show: Application application_1472465026418_0008 failed 2 times due to AM Container for appattempt_1472465026418_0008_000002 exited with  exitCode: 1 due to: Exception from container-launch: ExitCodeException exitCode=1: 

ExitCodeException exitCode=1: 

at org.apache.hadoop.util.Shell.runCommand(Shell.java:538)

at org.apache.hadoop.util.Shell.run(Shell.java:455)

at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:702)

at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:195)

at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:300)

at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:81)

at java.util.concurrent.FutureTask.run(FutureTask.java:262)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:745)

Container exited with a non-zero exit code 1.Failing this attempt.. Failing the application.

出现该错误时在命令行运行的命令为:

  1. $> hadoop jar /home/giraph/giraph-examples/target/giraph-examples-1.2.0-SNAPSHOT-for-hadoop-2.5.2-jar-with-dependencies.jar
  2. org.apache.giraph.GiraphRunner
  3. org.apache.giraph.examples.SimpleShortestPathsComputation -vif
  4. org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat
  5. -vip /user/input/tiny_graph.txt -vof
  6. org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op
  7. /user/giraph_output/shortestpaths -w 4 -yj
  8. /home/giraph/giraph-examples/target/giraph-examples-1.2.0-SNAPSHOT-for-hadoop-2.5.2-jar-with-dependencies.jar

在网上查到说好像是绝对路径的问题,于是创建软链接试试:

  1. ln -s /home/giraph/giraph-examples/target/giraph-examples-1.2.0-SNAPSHOT-for-hadoop-2.5.2-jar-with-dependencies.jar

然后重新运行命令行:

  1. $> hadoop jar giraph-examples-1.2.0-SNAPSHOT-for-hadoop-2.5.2-jar-with-dependencies.jar
  2. org.apache.giraph.GiraphRunner
  3. org.apache.giraph.examples.SimpleShortestPathsComputation -vif
  4. org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat
  5. -vip /user/input/tiny_graph.txt -vof
  6. org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op
  7. /user/giraph_output/shortestpaths -w 4 -yj
  8. giraph-examples-1.2.0-SNAPSHOT-for-hadoop-2.5.2-jar-with-dependencies.jar

发现可以工作了。


阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yafeichang/article/details/52366354
文章标签: giraph class
个人分类: giraph
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

Giraph 运行常见错误

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭