apache giraph无法在cdh4.4.0上运行

tjrkku2a  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(368)

我尝试运行最新版本的apachegiraph示例,请在快速启动页面上进行描述(http://giraph.apache.org/quick_start.html). 我使用cdh4.4.0(hadoop的cloudera发行版)构建了giraph,并将依赖项更新为cdh4.4.0。一切顺利
当我运行这些示例时,我得到了以下输出

-bash-4.1$ hadoop jar /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0-     SNAPSHOT-for-hadoop-2.0.0-cdh4.4.0-jar-with-dependencies.jar 
    org.apache.giraph.GiraphRunner  
    org.apache.giraph.examples.SimpleShortestPathsComputation 
    -vif org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat 
    -vip /user/hdfs/input/tiny_graph.txt 
    -vof org.apache.giraph.io.formats.IdWithValueTextOutputFormat 
    -op /user/hdfs/output/shortestpaths -w 1

13/10/02 18:31:58 INFO utils.ConfigurationUtils: No edge input format specified. Ensure your InputFormat does not require one.
13/10/02 18:31:58 INFO utils.ConfigurationUtils: No edge output format specified.    Ensure your OutputFormat does not require one.
13/10/02 18:31:58 INFO job.GiraphJob: run: Since checkpointing is disabled (default), do not allow any task retries (setting mapred.map.max.attempts = 0, old value = 4)
13/10/02 18:31:58 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
13/10/02 18:32:00 INFO job.GiraphJob: run: Tracking URL: http://hadoop57:50030/jobdetails.jsp?jobid=job_201310021452_0015
13/10/02 18:32:22 INFO mapred.JobClient: Running job: job_201310021452_0015
13/10/02 18:32:22 INFO mapred.JobClient: Job complete: job_201310021452_0015
13/10/02 18:32:22 INFO mapred.JobClient: Counters: 6
13/10/02 18:32:22 INFO mapred.JobClient:   Job Counters
13/10/02 18:32:22 INFO mapred.JobClient:     Failed map tasks=1
13/10/02 18:32:22 INFO mapred.JobClient:     Launched map tasks=2
13/10/02 18:32:22 INFO mapred.JobClient:     Total time spent by all maps in occupied slots (ms)=29054
13/10/02 18:32:22 INFO mapred.JobClient:     Total time spent by all reduces in occupied slots (ms)=0
13/10/02 18:32:22 INFO mapred.JobClient:     Total time spent by all maps waiting after reserving slots (ms)=0
13/10/02 18:32:22 INFO mapred.JobClient:     Total time spent by all reduces waiting after reserving slots (ms)=0

作业日志显示异常:

java.lang.IllegalStateException: run: Caught an unrecoverable exception     
java.io.FileNotFoundException: File 
_bsp/_defaultZkManagerDir/job_201310021452_0015/_zkServer does not exist.
        at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:101)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:672)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:330)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
        at org.apache.hadoop.mapred.Child.main(Child.java:262)
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: File 
_bsp/_defaultZkManagerDir/job_201310021452_0015/_zkServer does not exist.
    at org.apache.giraph.zk.ZooKeeperManager.onlineZooKeeperServers(ZooKeeperManager.java:792)
    at org.apache.giraph.graph.GraphTaskManager.startZooKeeperManager(GraphTaskManager.java

文件 _bsp/_defaultZkManagerDir/job_201310021452_0015/_zkServer 有时会被创造,有时不会。
你能告诉我从哪里开始寻找这个问题吗。
布拉康拉德

nwwlzxa7

nwwlzxa71#

看来吉拉夫要开始自己的Zookeeper课程了。只需尝试将以下内容作为vm参数传递给giraphrunner。

-Dgiraph.zkList=<zookeeper server address>:<port>

例如

-Dgiraph.zkList=localhost:2181

您的命令如下所示:

-bash-4.1$ hadoop jar /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0-     SNAPSHOT-for-hadoop-2.0.0-cdh4.4.0-jar-with-dependencies.jar 
org.apache.giraph.GiraphRunner  
org.apache.giraph.examples.SimpleShortestPathsComputation
-Dgiraph.zkList=localhost:2181 
-vif org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat 
-vip /user/hdfs/input/tiny_graph.txt 
-vof org.apache.giraph.io.formats.IdWithValueTextOutputFormat 
-op /user/hdfs/output/shortestpaths -w 1

祝你好运。。!!

相关问题