Hi Thomas,

Getting back to this, I see you have created issue
https://issues.apache.org/jira/browse/HAMA-571
for this, thanks!

See my next posting.
Clemens


On 27.04.2012 20:00, Thomas Jungblut wrote:
> Well, no you got it wrong.
>
> Hama's graph package is designed to have a easy to develop API for simple
> graph problems with a vertex-centric paradigm.
> However, and that is where we distinguish from giraph, we provide the low
> level access to the underlying BSP methods and implementations.
>
> How to fix the problem you have without the need of preprocessing your data?
> You can rework the GraphJobRunner class, to check in the setup method if
> the vertices map is correctly filled.
> A simple pseudo code could look like this:
>
> // after load vertices into the map and edges have been setup
>> for(Vertex v : adjacencyList)
>>   for(Edge neighbor : v.getOutEdges())
>>      // do the hash partitioning trick
>>     peer.send(peer.getAllPeerNames()[Math.abs( neighbor.getDestVertexID()
>> % peer.getNumPeers())], new Text(neighbor.getDestVertexID()));
>> // sync
>> peer.sync();
>> Text vertexName = null;
>> while((vertexName = (Text) peer.getCurrentMessage()) != null)
>>   // check if the vertexName is contained in that peer's vertices map
>>   if(!vertices.containsKey(vertexName.get()))
>>      vertices.put(vertexName.get(), new Vertex(vertexName.get()));
>
>
> That is all, and solve the current problems with your dangling nodes.
> Good question why we haven't implemented it yet, but maybe because it adds
> overhead at the beginning of a job. And we also assume that the resulting
> structure in the graph is complete.
> We want to provide a real framework where you can plug all the stuff
> arround together and modify single parts of it very easy.
>
> Hope you got the gist, if you need a patch or stuff, I can implement it
> correctly for you. (we should add this anyways as a configurable
> preprocessing).
> Thanks for pointing to it!
>
> Regards,
> Thomas
>
>

-- 

Semantic Web Project, IT

Unister GmbH
Barfußgäßchen 11 | 04109 Leipzig

Telefon: +49 (0)341 49288 4496
[email protected] <mailto:%[email protected]>
www.unister.de <http://www.unister.de>

Vertretungsberechtigter Geschäftsführer: Thomas Wagner
Amtsgericht Leipzig, HRB: 19056

Reply via email to