giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maja Kabiljo (JIRA)" <>
Subject [jira] [Commented] (GIRAPH-504) Create ComputeContext
Date Wed, 06 Feb 2013 05:03:14 GMT


Maja Kabiljo commented on GIRAPH-504:

The only things which are safe to use from WorkerContext are some constants, and it shouldn't
be a big deal if you have those constants in N places, where N is the number of threads. Anything
that user wants to modify shouldn't be in WorkerContext. We'd still have access to WorkerContext
through ComputeContext, but we want to discourage direct use of it from compute. And we still
have worker global data, since from preSuperstep/postSuperstep in ComputeContext one can safely
modify stuff in WorkerContext, since these are executed serially.

I agree that GraphState is a bit messy, but we already have per thread data there - workerClientRequestProcessor.
It should be refactored at some point, but that's a whole separate issue.

Sure, I'll make ComputeContext an interface.
> Create ComputeContext
> ---------------------
>                 Key: GIRAPH-504
>                 URL:
>             Project: Giraph
>          Issue Type: New Feature
>            Reporter: Maja Kabiljo
>            Assignee: Maja Kabiljo
>         Attachments: GIRAPH-504.diff
> Right now we have WorkerContext which is accessible from vertex.compute, but it's not
thread safe - usually if we want to use it with multithreaded computation we have to use synchronization.
Instead we can create a ComputeContext, which is going to have one instance per compute thread.

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

View raw message