I think  you have to implement your own input format similar to the 
org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat

where the vertex value Type is MyVertexValueWritable


and the input graph should be like:

[0,0,0,[[1,1],[3,3]]]
[1,0,0,[[0,1],[2,2],[3,1]]]
[2,0,0,[[1,2],[4,4]]]
[3,0,0,[[0,3],[1,1],[4,4]]]
[4,0,0,[[3,4],[2,4]]]

like [ID,Double,Double,[..Edges..]] where Double,Double is the 
MyVertexValueWritable serialization…


Best Regards!

Betim!








Da: Jyoti Yadav
Data invio: ‎domenica‎ ‎17‎ ‎novembre‎ ‎2013 ‎17‎:‎22
A: user@giraph.apache.org











Thanks all for your ideas...


I have one further query..
Scenario...

Vertex_id-->LongWritable
Vertex_value-->MyVertexValueWritable( it consists of composite value--> 
double,double )
 Edge_value->FloatWritable


Input given to giraph is in following format...

[0,0,[[1,1],[3,3]]]
[1,0,[[0,1],[2,2],[3,1]]]
[2,0,[[1,2],[4,4]]]
[3,0,[[0,3],[1,1],[4,4]]]
[4,0,[[3,4],[2,4]]]



What vertex input format should i give to execute the program???


Any Ideas??

Thanks















On Sun, Nov 17, 2013 at 5:12 PM, <ikapo...@csd.auth.gr> wrote:

You can also set a variable outside of the compute function, at the private 
part of the class. You will have to instantiate it at superstep 0 though, else 
you will have a NullPointerException thrown, in case you use it at superstep 1.





Quoting Jyoti Yadav <rao.jyoti26ya...@gmail.com>:


Thanks Ameya...I will give a try to your ideas...


On Sun, Nov 17, 2013 at 3:17 PM, Ameya Vilankar <ameya.vilan...@gmail.com>wrote:


In your scenario, you want to store some value that is obtained in
Superstep 1, so that it is available to a vertex in all the subsequent
supersteps. The best place to do that is to store it on the vertex itself.
The simplest example is ShortesPath Example where you store the current
lowest distance on the vertex, and when you receive a message you update it
with the new lowest mistake. I assume that in your program you don't want
to update the value after Superstep 1. So don't. Just keep an extra
variable in your vertex value class and set it in superstep 1 so that it
can be used by the vertex in all the following steps.

But if you want to store global information i.e in superstep 1, every
vertex computes and stores a value and in the subsequent supersteps, a
vertex needs access to the stored values of all the vertices, you need to
make those values global. The only way to do it is to use a persistent
aggregator. In superstep 1, every vertex computes the value and then sends
it to the persistent aggregator that can contain a hashmap from the vertex
id to the value. This value will persist across all the supersteps since
the aggregator is a persistent one. Will be available to every vertex too.


On Sun, Nov 17, 2013 at 1:11 AM, Mirko Kämpf <mirko.kae...@cloudera.com>wrote:


Hi,

if it is a local value, just important for that given vertex, it might
work with a local variable, maybe even a more complex data structure, e.g.
a Stack or a FIFO buffer, to handle "old" data. I do not consider to
exchange data between vertexes, only within one vertex over time.

I write this here, to share my idea, but I am not really sure if a Giraph
vertex works like this. It's just how I would try it ...

But I think we will see a definitive answer soon.

Have a nice day!
Mirko


On Sun, Nov 17, 2013 at 6:55 AM, Jyoti Yadav <rao.jyoti26ya...@gmail.com>wrote:


Hi folks...

while executing my program ,i came across a doubt which is creating
problem...

Scenario....

In compute() function,
Suppose in superstep1 each vertex want to save some value so that every
vertex can use its  previously saved value in upcoming supersteps...Is it
possible???


Any ideas are really appreciated...

Thanks...
Jyoti

Reply via email to