org.apache.hama.bsp
Class BSPMessage

java.lang.Object
  extended by org.apache.hama.bsp.BSPMessage
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class BSPMessage
extends Object
implements org.apache.hadoop.io.Writable

BSPMessage consists of the tag and the arbitrary amount of data to be communicated.


Field Summary
protected  byte[] data
           
protected  byte[] tag
           
 
Constructor Summary
BSPMessage()
           
BSPMessage(byte[] tag, byte[] data)
          Constructor
 
Method Summary
 byte[] getData()
           
 byte[] getTag()
          BSP messages are typically identified with tags.
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

protected byte[] tag

data

protected byte[] data
Constructor Detail

BSPMessage

public BSPMessage()

BSPMessage

public BSPMessage(byte[] tag,
                  byte[] data)
Constructor

Parameters:
tag - of data
data - of message
Method Detail

getTag

public byte[] getTag()
BSP messages are typically identified with tags. This allows to get the tag of data.

Returns:
tag of data of BSP message

getData

public byte[] getData()
Returns:
data of BSP message

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2011 The Apache Software Foundation