Hi Rana, all you need to do is writing your own EdgeValue and VertexValue class by implementing the Writable Interface. You can use any field you like. Just make sure you write or read them in the Writeable methods.
Here’s VertexValue I use (There may be better ways for writing list, but it works just fine) http://pastebin.com/VpMVFuuc In your compute method get the VertexValue with vertex.getValue() and apply your changes. That’s it. Whatever you write into it in step one, you will be able to read or modify in step two. Regards Pascal Am 25.03.2014 um 07:14 schrieb Rana Althunyan <ranoo...@gmail.com<mailto:ranoo...@gmail.com>>: Hello Pankaj Malhotra, Yes, I need to assign more than values to the edge. I need the edge has [flow, capacity, distinction, source] You says I need to create a new class type for edge, How can I pass it to json class and how can I make json class read my new edge object. I need to submit my code next week, so any answer or recommendation will definitely help. thanks Rana On Mar 24, 2014, at 7:29 AM, Pankaj Malhotra <pankajiit...@gmail.com<mailto:pankajiit...@gmail.com>> wrote: If I get your point-1 right, you want to have a vertex class type other than the ones available, for example: Text. If this is what you want, you can have a class having as many fields as you want. Then convert the objects of that class to Json objects using Gson for example. Then, you can use the Json string to set the fields of the Text class. On 22 March 2014 04:50, Rana Althunyan <ranoo...@gmail.com<mailto:ranoo...@gmail.com>> wrote: Hello experts, > I really need your help. I am new to Giraph. I have project on pregel paper, > and I need to implement One algorithm via Apache Giraph.The algorithm is > push-relabel flow algorithm. Actually when I started to adapt the algorithm > to fit to Giraph I found some problems. I will list them. > > 1- Because any type of data structure are not allowed in Giraph how can I > store excess flow and distance value for each vertex. > 2- When the excess value becomes zero for any vertex, I wanna keep vertex > flow during future supersteps even if the vertex received messages. > 3- The last point, when I want to send a flow to a vertex, i need store two > values of residual graph the remaining value from the edge capacity and the > amount of flow that we use so far. How can I do that. How can I keep these > two values for each vertex in the graph. > > these following questions may are easy for you .. > 4- How can I determine the last vertex as a sink. > 5- How can I get the number of all vertexes from the input file . > > I know I have written many question.I searched a lot in the Internet, but I > did not find any discussion regards to this algorithm > > sorry and thank you.I appreciate any help or recommendations > Rana