|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.HMsg
public class HMsg
HMsg is used to send messages between master and regionservers. Messages are sent as payload on the regionserver-to-master heartbeats. Region assignment does not use this mechanism. It goes via zookeeper.
Most of the time the messages are simple but some messages are accompanied by the region affected. HMsg may also carry an optional message.
TODO: Clean out all messages that go from master to regionserver; by design, these are to go via zk from here on out.
Nested Class Summary | |
---|---|
static class |
HMsg.Type
|
Field Summary | |
---|---|
static HMsg[] |
EMPTY_HMSG_ARRAY
|
static HMsg[] |
STOP_REGIONSERVER_ARRAY
|
Constructor Summary | |
---|---|
HMsg()
Default constructor. |
|
HMsg(HMsg.Type type)
Construct a message with the specified message and empty HRegionInfo |
|
HMsg(HMsg.Type type,
HRegionInfo hri)
Construct a message with the specified message and HRegionInfo |
|
HMsg(HMsg.Type type,
HRegionInfo hri,
byte[] msg)
Construct a message with the specified message and HRegionInfo |
|
HMsg(HMsg.Type type,
HRegionInfo hri,
HRegionInfo daughterA,
HRegionInfo daughterB,
byte[] msg)
Construct a message with the specified message and HRegionInfo |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
HRegionInfo |
getDaughterA()
|
HRegionInfo |
getDaughterB()
|
byte[] |
getMessage()
|
HRegionInfo |
getRegionInfo()
|
HMsg.Type |
getType()
|
int |
hashCode()
|
boolean |
isType(HMsg.Type other)
|
void |
readFields(DataInput in)
|
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final HMsg[] STOP_REGIONSERVER_ARRAY
public static final HMsg[] EMPTY_HMSG_ARRAY
Constructor Detail |
---|
public HMsg()
public HMsg(HMsg.Type type)
type
- Message typepublic HMsg(HMsg.Type type, HRegionInfo hri)
type
- Message typehri
- Region to which message type
appliespublic HMsg(HMsg.Type type, HRegionInfo hri, byte[] msg)
type
- Message typehri
- Region to which message type
applies. Cannot be
null. If no info associated, used other Constructor.msg
- Optional message (Stringified exception, etc.)public HMsg(HMsg.Type type, HRegionInfo hri, HRegionInfo daughterA, HRegionInfo daughterB, byte[] msg)
type
- Message typehri
- Region to which message type
applies. Cannot be
null. If no info associated, used other Constructor.daughterA
- daughterB
- msg
- Optional message (Stringified exception, etc.)Method Detail |
---|
public HRegionInfo getRegionInfo()
public HMsg.Type getType()
public boolean isType(HMsg.Type other)
other
- Message type to compare to
other
public byte[] getMessage()
public HRegionInfo getDaughterA()
public HRegionInfo getDaughterB()
public String toString()
toString
in class Object
Object.toString()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
Writable.write(java.io.DataOutput)
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Writable.readFields(java.io.DataInput)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |