Index: src/java/org/apache/hama/bsp/BSPPeer.java =================================================================== --- src/java/org/apache/hama/bsp/BSPPeer.java (revision 929136) +++ src/java/org/apache/hama/bsp/BSPPeer.java (working copy) @@ -67,7 +67,7 @@ serverName = conf.get(PEER_HOST) + conf.get(PEER_PORT, DEFAULT_PEER_HOST); bindAddress = conf.get(PEER_HOST, DEFAULT_PEER_HOST); - bindPort = Integer.valueOf(conf.get(PEER_PORT, DEFAULT_PEER_HOST)); + bindPort = conf.getInt(PEER_PORT, DEFAULT_PEER_PORT); bspRoot = conf.get(ZOOKEEPER_ROOT, DEFAULT_ZOOKEEPER_ROOT); reinitialize(); @@ -77,14 +77,14 @@ try { server = RPC.getServer(this, bindAddress, bindPort, conf); server.start(); - } catch (IOException e1) { - e1.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); } try { zk = new ZooKeeper(conf.get(ZOOKEEPER_SERVER_ADDRS), 3000, this); - } catch (IOException e1) { - e1.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); } } @@ -136,6 +136,7 @@ queue = entry.getValue(); messages = queue.iterator(); + // TODO - to be improved by collective communication and compression while (messages.hasNext()) { peer.put(messages.next()); }