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

發現可以工作了。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章