使用giraph需要hadoop吗

e37o9pze  于 2021-05-29  发布在  Hadoop
关注(0)|答案(2)|浏览(405)

我想使用giraph作为我的工作图形处理工具。我熟悉mahout,我知道我可以使用mahout的一些部分,比如推荐系统,而不用hadoop。但是,我不知道这是否与giraph相同,也不知道我是否可以不用hadoop来使用它。

ibps3vxo

ibps3vxo1#

您需要hadoop依赖,但不需要hadoop集群,甚至不需要伪分布式集群。这本书的第5章用ApacheGiraph演示了一个例子——github上提供了源代码。
需要以下依赖项:
org.apache。giraph:giraph-core:1.1.0
org.apache。hadoop:hadoop-core:1.2.1
将计算实现为 BasicComputation 按以下步骤运行:

String[] graphSeed = new String[] { "seed\t0" }

GiraphConfiguration conf = new GiraphConfiguration();
conf.setComputationClass(GenerateTwitterParallel.class);
conf.setVertexInputFormatClass(
    TextDoubleDoubleAdjacencyListVertexInputFormat.class);
conf.setVertexOutputFormatClass(
    AdjacencyListTextVertexOutputFormat.class);
Iterable<String> results =
    InternalVertexRunner.run(conf, graphSeed);
b91juud3

b91juud32#

您需要hadoop来运行giraph,因为单个任务(主任务和辅助任务)在内部是作为map-only作业执行的。或者,也可以将giraph作为应用程序运行。
看看giraph快速入门指南,如果遇到麻烦,可以搜索邮件列表。

相关问题