Hi, A solution would be to be to get the partition owner and then get the worker info. You can use *getVertexPartitionOwner <https://giraph.apache.org/apidocs/org/apache/giraph/worker/BspServiceWorker.html#getVertexPartitionOwner(I)>* (I <https://giraph.apache.org/apidocs/org/apache/giraph/worker/BspServiceWorker.html> vertexId) from HashWorkerPartitioner. There are other classes who also have this function. Once you get the *PartitionOwner <https://giraph.apache.org/apidocs/org/apache/giraph/worker/BspServiceWorker.html#getVertexPartitionOwner(I)> you can get the WorkerInfo.*
*Hope it helps.* *Flavian* 2015-09-21 20:00 GMT+02:00 Thomas Karampelas <[email protected]>: > Hi, > > Is there a way to find the worker id of a vertex, given a vertex id? > I saw this [1] and I get that by calling > getWorkerContext().getMyWorkerIndex() it is possible to get current > vertex's worker id. > But is it possible to find the worker ids of all its neighbour vertexes at > that point? > > > [1] > http://mail-archives.apache.org/mod_mbox/giraph-user/201411.mbox/%3CD09E3112.27FA%25kiran.garimella%40aalto.fi%3E > > Thanks, > Thomas >
