giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claudio Martella (Commented) (JIRA)" <>
Subject [jira] [Commented] (GIRAPH-47) Export Worker's Context/State to vertices through pre/post/Application/Superstep
Date Mon, 10 Oct 2011 13:39:29 GMT


Claudio Martella commented on GIRAPH-47:

I've given a thought or two to this interface and I cannot really see an easy way to pass
information to the WorkerContext, a part of the initialize(). For example, for my particular
Emitter scenario, how would i pass at preSuperstep() or postSuperstep() data to write to the
HDFS or in general some parameters that might be needed? 

One way would be to create at Vertex.preApplication() a shared List, where I'd put the data
that the WorkerContext would then dump to disk. It's not the best way as it could potentially
eat a lot of memory.

Or, I could add an emit() method to the implementing class and call it directly in compute(),
like: ((MyEmitterWorkerContext)this.getWorkerContext()).emit(mydata). The engineering should
be able to handle this quite easily (except for the cast cost each time, which is something).

Any idea?
> Export Worker's Context/State to vertices through pre/post/Application/Superstep
> --------------------------------------------------------------------------------
>                 Key: GIRAPH-47
>                 URL:
>             Project: Giraph
>          Issue Type: Improvement
>          Components: graph
>    Affects Versions: 0.70.0
>            Reporter: Claudio Martella
>            Assignee: Claudio Martella
> It would be quite useful for vertices to reach some worker-related information stored
i.e. in the GraphState class.
> This information could be exported as a parameter to pre/post/Application/Superstep like
> public void preApplication(Configurable workerObject);
> public void postApplication(Configurable workerObject);
> public void preSuperstep(Configurable workerObject);
> public void postSuperstep(Configurable workerObject);
> public Configurable getWorkerObject();
> Another possibility is to add a Context inner class to BasicVertex to store this information.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message