[ https://issues.apache.org/jira/browse/GIRAPH-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121188#comment-13121188 ]
Avery Ching commented on GIRAPH-47: ----------------------------------- I tried to add you as a contributor to assign this to you, but I think JIRA has recently changed how that's done (by search) and that failed. I'll try again later, sorry. Unfortunately, I doubt that giving Mapper.Context to users will do what you want. We purposely use the output format in the job to call the user's vertex output format. Plus there is the issue of types that you brought up. I think it makes more sense to define our own worker context interface for these reasons. In fact, maybe it makes more sense to do away with the methods public void preApplication(Configurable workerObject); public void postApplication(Configurable workerObject); public void preSuperstep(Configurable workerObject); public void postSuperstep(Configurable workerObject); and instead put them on the WorkerContext (don't know what else to call it, you can rename it to something better). This will make it more clear about the fact that worker context is on a per-worker basis and the methods called with respect to a worker and not a vertex. I.e. public interface WorkerContext { void initialize(); // Called before anything else void close(); // Called when worker is done void preSuperstep(); // Called before compute() on any vertex void postSuperstep(); // Called after all vertices computed() } and then the user can register their own implementation. You can implement opening and closing files in initialize/close respectively. and you can dump whenever you want in preSuperstep/postSuperstep. By the way, please change the method names if you can think of something better. =) > Export Worker's Context/State to vertices through > pre/post/Application/Superstep > -------------------------------------------------------------------------------- > > Key: GIRAPH-47 > URL: https://issues.apache.org/jira/browse/GIRAPH-47 > Project: Giraph > Issue Type: Improvement > Components: graph > Affects Versions: 0.70.0 > Reporter: 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 this: > 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira