Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hama Wiki" for change 
notification.

The "BSPModel" page has been changed by thomasjungblut:
http://wiki.apache.org/hama/BSPModel?action=diff&rev1=17&rev2=18

  {{{
   @Override
    public final void bsp(
-       BSPPeer<LongWritable, Text, KEYOUT, VALUEOUT> peer)
+       BSPPeer<LongWritable, Text, KEYOUT, VALUEOUT, MESSAGE_TYPE> peer)
        throws IOException, InterruptedException, SyncException {
        
        // this method reads the next key value record from file
@@ -184, +184 @@

  {{{
      @Override
      public void bsp(
-         BSPPeer<NullWritable, NullWritable, Text, DoubleWritable> peer)
+         BSPPeer<NullWritable, NullWritable, Text, DoubleWritable, 
LongMessage> peer)
          throws IOException, SyncException, InterruptedException {
  
        for (String peerName : peer.getAllPeerNames()) {
@@ -206, +206 @@

  {{{
      @Override
      public void bsp(
-         BSPPeer<NullWritable, NullWritable, Text, DoubleWritable> peer)
+         BSPPeer<NullWritable, NullWritable, Text, DoubleWritable, Writable> 
peer)
          throws IOException, SyncException, InterruptedException {
  
        for (int i = 0; i < 100; i++) {
@@ -245, +245 @@

      }
  }}}
  
- Counters are in 0.4.0 not usable for flow controls, since they are not synced 
during sync phase. Watch 
[[https://issues.apache.org/jira/browse/HAMA-515|HAMA-515]] for details.
  
  = Setup and Cleanup =
  
@@ -288, +287 @@

  Combiners are used for performing message aggregation to reduce communication 
overhead in cases when messages can be summarized arithmetically e.g., min, 
max, sum, and average at the sender side. Suppose that you want to send the 
integer messages to a specific processor from 0 to 1000 and sum all received 
the integer messages from all processors.
  
  {{{
-     public void bsp(BSPPeer<NullWritable, NullWritable, NullWritable, 
NullWritable> peer) throws IOException,
+     public void bsp(BSPPeer<NullWritable, NullWritable, NullWritable, 
NullWritable, IntegerMessage> peer) throws IOException,
          SyncException, InterruptedException {
  
        for (int i = 0; i < 1000; i++) {
@@ -298, +297 @@

  
        if (peer.getPeerName().equals(masterTask)) {
          IntegerMessage received;
-         while ((received = (IntegerMessage) peer.getCurrentMessage()) != 
null) {
+         while ((received = peer.getCurrentMessage()) != null) {
            sum += received.getData();
          }
        }

Reply via email to