简体   繁体   English

Apache Giraph的数组顶点值

[英]Array vertex values for Apache Giraph

I need to process a graph which has arrays (double) for their vertex value rather than a single double. 我需要处理一个图,该图的顶点值具有数组(双精度),而不是单个双精度。 So the input format would be vertex_Id(string)\\t vertex_value (array)\\t neighbors. 因此,输入格式为vertex_Id(string)\\ t vertex_value(数组)\\ t neighbors。 Looking at the documentation, it seems that there is no class that supports such a format. 查看文档,似乎没有支持这种格式的类。 What options do I have to feed the input which this format to Giraph? 我需要什么选项将这种格式的输入提供给Giraph?

You should adapt one Input Format or write your own. 您应该改编一种输入格式或编写自己的输入格式。 Look at this and this for example. 看看这个这个 ,例如。 You should think in using separators that can't be part of the elements of your graph, with the idea that having this will facilitate the job of parsing lines of your input file through your input format. 您应该考虑使用不能成为图形元素一部分的分隔符,其想法是拥有分隔符将有助于通过输入格式来解析输入文件的行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM