【问题标题】:Giraph tutorial ShortestPath example job failingGiraph 教程 ShortestPath 示例作业失败
【发布时间】:2015-02-17 04:28:14
【问题描述】:

我正在学习 Apache Giraph 快速入门教程:http://giraph.apache.org/quick_start.html,并已成功设置伪分布式 hadoop 集群并成功运行示例 mapreduce 作业。

但是,当转到 Giraph 部分时,我使用 maven 安装了 Giraph,但由于某种原因,我无法运行最简单的 Giraph 作业。

我已将 tiny_graph 添加到我的 hdfs,但运行他们的示例命令:

hduser@fonz-VirtualBox:~/Giraph$ $HADOOP_HOME/bin/hadoop jar /usr/local/giraph/giraph-examples/target/giraph-examples-1.2.0-SNAPSHOT-for-hadoop-1.2.1-jar-with-dependencies.jar org.apache.giraph.GiraphRunner org.apache.giraph.examples.SimpleShortestPathsComputation -vif org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat -vip /user/hduser/input/tiny_graph.txt -vof org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op /user/hduser/output/shortestpaths -w 1

给我:

14/12/18 11:19:27 INFO utils.ConfigurationUtils: No edge input format specified. Ensure your InputFormat does not require one.
14/12/18 11:19:27 INFO utils.ConfigurationUtils: No edge output format specified. Ensure your OutputFormat does not require one.
14/12/18 11:19:28 INFO job.GiraphJob: run: Since checkpointing is disabled (default), do not allow any task retries (setting mapred.map.max.attempts = 1, old value = 4)
14/12/18 11:19:31 INFO job.GiraphJob: Tracking URL: http://hdnode01:50030/jobdetails.jsp?jobid=job_201412171202_0010
14/12/18 11:19:31 INFO job.GiraphJob: Waiting for resources... Job will start only when it gets all 2 mappers
14/12/18 11:20:59 INFO job.HaltApplicationUtils$DefaultHaltInstructionsWriter: writeHaltInstructions: To halt after next superstep execute: 'bin/halt-application --zkServer fonz-virtualbox:22181 --zkNode /_hadoopBsp/job_201412171202_0010/_haltComputation'
14/12/18 11:20:59 INFO mapred.JobClient: Running job: job_201412171202_0010
14/12/18 11:21:00 INFO mapred.JobClient:  map 100% reduce 0%
14/12/18 11:30:16 INFO mapred.JobClient:  map 50% reduce 0%
14/12/18 11:30:24 INFO mapred.JobClient: Job complete: job_201412171202_0010
14/12/18 11:30:24 INFO mapred.JobClient: Counters: 6
14/12/18 11:30:24 INFO mapred.JobClient:   Job Counters 
14/12/18 11:30:24 INFO mapred.JobClient:     SLOTS_MILLIS_MAPS=1244789
14/12/18 11:30:24 INFO mapred.JobClient:     Total time spent by all reduces waiting after reserving slots (ms)=0
14/12/18 11:30:24 INFO mapred.JobClient:     Total time spent by all maps waiting after reserving slots (ms)=0
14/12/18 11:30:24 INFO mapred.JobClient:     Launched map tasks=2
14/12/18 11:30:24 INFO mapred.JobClient:     SLOTS_MILLIS_REDUCES=0
14/12/18 11:30:24 INFO mapred.JobClient:     Failed map tasks=1

任何关于为什么失败的想法将不胜感激!

非常感谢。

【问题讨论】:

    标签: shortest-path giraph


    【解决方案1】:

    最短路径示例没有 main 方法,它使用硬编码的源 ID 为 1 来启动算法。因此,在 100% Map 之后没有投票停止。转到https://www.youtube.com/watch?v=yEHeJhMXJy0,更新 sssp.java 文件并将其导出到新 Jar。然后运行它。我遇到了同样的问题,它解决了。

    【讨论】:

    • 嗨,Rishabh,感谢您的回复和链接。按照视频概述的内容,即将下一条评论中的代码添加到 SimpleShortestPathsVertex.java 文件,然后重建所有内容,但我仍然遇到同样的错误!
    • public class SimpleShortestPathsComputation extends BasicComputation { private static long startVertexId; public static void main(String[] args) { startVertexId = Long.valueOf(args[0]); } /** 最短路径id / public static final LongConfOption SOURCE_ID = new LongConfOption("SimpleShortestPathsVertex.sourceId", startVertexId, "最短路径id"); /* 类记录器 */ private static final Logger LOG = Logger.getLogger(SimpleShortestPathsComputation.class);
    • 我认为你必须使用工具运行器来运行 Giraph 代码。但这也应该有效。即使在实现 main 方法之后,您的系统是否仍然挂起。
    • @Rishabh Wadhawan 你能帮我解决这个问题吗:stackoverflow.com/questions/29106353/…
    • 你能否给我看一下你在终端上得到的任何东西的完整截图,因为我看到的是没有错误,但信息基本上就像警告一样。请告诉我你到底在终端上得到了什么。展示全部内容。
    【解决方案2】:

    下载 Hadoop 时,下载 hadoop-0.20.205.0.tar.gz 而不是 hadoop-0.20.203.0rc1.tar.gz 以避免 Failed map tasks=1 错误。

    【讨论】:

      猜你喜欢
      • 2018-02-22
      • 1970-01-01
      • 2017-05-03
      • 1970-01-01
      • 1970-01-01
      • 2018-02-25
      • 2016-03-01
      • 1970-01-01
      • 2012-02-01
      相关资源
      最近更新 更多