giraph-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Karampelas <tkar...@di.uoa.gr>
Subject Re: Way to find the worker id of a given vertex id
Date Tue, 22 Sep 2015 12:12:21 GMT
Thanks for the reply.

I am working on the scope of an extention of the BasicComputationClass 
(let's say SimpleShortestPathsComputation).
It seems to me that from there I don't have access to an object having 
the accessor that you've mentioned(*getVertexPartitionOwner 
<https://giraph.apache.org/apidocs/org/apache/giraph/worker/BspServiceWorker.html#getVertexPartitionOwner%28I%29>*(I

<https://giraph.apache.org/apidocs/org/apache/giraph/worker/BspServiceWorker.html> vertexId))

without changing things on existing classes.

Is there anything that I'm missing or should I mess around on existing 
classes to make it doable?

Thanks,
Thomas

On 22/09/2015 09:54 πμ, Flavian Jacquot wrote:
> 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%28I%29>*(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%28I%29>
you 
> can get the WorkerInfo.*
> *
> *
> *Hope it helps.*
> *
> *
> *Flavian*
>
> 2015-09-21 20:00 GMT+02:00 Thomas Karampelas <tkaramp@di.uoa.gr 
> <mailto:tkaramp@di.uoa.gr>>:
>
>     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
>
>


Mime
View raw message