giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laxmidhar <LAXMID...@bigtappanalytics.com>
Subject Re: How To Define and Link New Input and Output Formats
Date Tue, 02 Jun 2015 12:59:39 GMT
On Monday 01 June 2015 04:45 PM, Cristian Vidal Silva wrote:
> Hey everyone.
>
> Currently, I need to read vertices in the format [Id, Val1, Val2, 
> [[taget1, weight1], [target2, weight2]..]], and I want out  simply 
> simply , for each vertex, the sum of its values... For example, 
> tiny_graph.txt is:
>
> [0,1,2,[[1,1],[3,3]]]
> [1,3,4,[[0,1],[2,2],[3,1]]]
> [2,5,5,[[1,2],[4,4]]]
> [3,6,7,[[0,3],[1,1],[4,4]]]
> [4,8,9,[[3,4],[2,4]]]
>
> So, the output would be like:
> 0,3
> 1,7
> 2,10
> 3,13
> 4,17
>
> What must I do to achieve this goal? What classes Do I have to define? 
> How Do I link these classes?
>
> I hope to get replies to get this goal to advance on my research.
>
Hi Silva,

No need of defining anything for that you need to change your logic in
compute() method of your class.And take the 1st argument as your source
id of your each line then add the value of its.


Thanks
Laxmidhar

Mime
View raw message