incubator-hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filipe Manana (JIRA)" <>
Subject [jira] Commented: (HAMA-304) Allow BSP peers to get a list of all other peers executing tasks of the same job
Date Mon, 11 Oct 2010 09:57:37 GMT


Filipe Manana commented on HAMA-304:

Hi Edward,
Thanks for reviewing it and the suggestions.

I would just change:

+  public InetSocketAddress getAddress(String hostname) {
+    String hostPort = allPeers.get(hostname);
+    String[] peerAddrParts = hostPort.split(":");
+    return new InetSocketAddress(peerAddrParts[0], Integer.parseInt(peerAddrParts[1]));
+  }


+  public InetSocketAddress getAddress(String hostname) {
+    String peerAddr = allPeers.get(hostname);
+    String[] peerAddrParts = peerAddr.split(":");
+    return new InetSocketAddress(peerAddrParts[0], Integer.parseInt(peerAddrParts[1]));
+  }

(variable hostPort name does not reflects a hostname:port pair)

And the "import java.util.Collections;" in is no longer needed.

Just one question, since we have peer names (groom server names), does it make sense to have
IDs (ints)? If the groom server names are unique, then they're like an ID already.


> Allow BSP peers to get a list of all other peers executing tasks of the same job
> --------------------------------------------------------------------------------
>                 Key: HAMA-304
>                 URL:
>             Project: Hama
>          Issue Type: New Feature
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>         Attachments: hama-304.patch, HAMA-304_v02.patch
> Hi,
> Currently (as in the PiEstimator example), when a peer wants to send a message to other
peer, it has to know in advance its hostname and port. This is likely fine for very small
clusters, but not convenient for reasonably sized clusters.
> The following patch allows a peer to get a list of all other peers (collection of InetSocketAddress)
so that it doesn't force a BSP job to know in advance the hostname and ports of the peers.
> The implementation might not be very efficient for very large clusters, as a list of
groom server addresses is sent in each HeartBeat response. This is something I think it should
be improved sometime later.
> Feedback welcome.
> cheers

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message