giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Unmesh Joshi <unmesh.joshi...@gmail.com>
Subject Re: How To Define and Link New Input and Output Formats
Date Fri, 05 Jun 2015 01:37:32 GMT
You can have/extend your own VertexInputFormat class and parse according to
the format of input file.
It seems to me that you are using predefined input class which parses and
stores data differently.
On Jun 4, 2015 10:02 AM, "Cristian Vidal Silva" <vidalsil@msu.edu> wrote:

> Mmmmm.... I can get vertexId and its 1st value, System.out.println("Vertex
> Id: " + vertex.getId() + " - Value " + vertex.getValue()), but how can I
> get the vertex 2nd value?
>
> Assist me please...
>
>
> El 02/06/2015 a las 8:59, Laxmidhar escribió:
>
>> 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
>>
>
> --
> Cristian Vidal Silva
> Computer Engineer
> Master in Computer Science, University of Concepcion - Chile
> Master of Science in Computer Science, Michigan State University, MI - USA
> Ph.D(c) in Software Engineering and Technology, University of Seville -
> Spain
>
> Chilean Fulbright Scholar
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message