public class HadoopShuffleMessage extends Object implements Message, HadoopMessage
Modifier and Type | Class and Description |
---|---|
static interface |
HadoopShuffleMessage.Visitor
Visitor.
|
DIRECT_TYPE_SIZE
Constructor and Description |
---|
HadoopShuffleMessage() |
HadoopShuffleMessage(HadoopJobId jobId,
int reducer,
int size) |
Modifier and Type | Method and Description |
---|---|
void |
addKey(long keyPtr,
int keySize) |
void |
addValue(long valPtr,
int valSize) |
boolean |
available(int size,
boolean valOnly) |
byte[] |
buffer() |
short |
directType()
Gets message type.
|
byte |
fieldsCount()
Gets fields count.
|
long |
id() |
HadoopJobId |
jobId() |
int |
offset() |
void |
onAckReceived()
Method called when ack message received.
|
void |
readExternal(ObjectInput in) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
int |
reducer() |
String |
toString() |
void |
visit(HadoopShuffleMessage.Visitor v) |
void |
writeExternal(ObjectOutput out) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
public HadoopShuffleMessage()
public HadoopShuffleMessage(HadoopJobId jobId, int reducer, int size)
size
- Size.public long id()
public HadoopJobId jobId()
public int reducer()
public byte[] buffer()
public int offset()
public boolean available(int size, boolean valOnly)
size
- Size.valOnly
- Only value wll be added.true
If this message can fit additional data of this sizepublic void addKey(long keyPtr, int keySize)
keyPtr
- Key pointer.keySize
- Key size.public void addValue(long valPtr, int valSize)
valPtr
- Value pointer.valSize
- Value size.public void visit(HadoopShuffleMessage.Visitor v) throws IgniteCheckedException
v
- Visitor.IgniteCheckedException
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
public short directType()
directType
in interface Message
public byte fieldsCount()
fieldsCount
in interface Message
public void onAckReceived()
onAckReceived
in interface Message
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017