|
||||||||||
| 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(java.lang.Object obj)
|
HRegionInfo |
getDaughterA()
|
HRegionInfo |
getDaughterB()
|
byte[] |
getMessage()
|
HRegionInfo |
getRegionInfo()
|
HMsg.Type |
getType()
|
int |
hashCode()
|
boolean |
isType(HMsg.Type other)
|
void |
readFields(java.io.DataInput in)
|
java.lang.String |
toString()
|
void |
write(java.io.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 type
public HMsg(HMsg.Type type,
HRegionInfo hri)
type - Message typehri - Region to which message type applies
public 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
otherpublic byte[] getMessage()
public HRegionInfo getDaughterA()
public HRegionInfo getDaughterB()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
public void write(java.io.DataOutput out)
throws java.io.IOException
write in interface org.apache.hadoop.io.Writablejava.io.IOExceptionWritable.write(java.io.DataOutput)
public void readFields(java.io.DataInput in)
throws java.io.IOException
readFields in interface org.apache.hadoop.io.Writablejava.io.IOExceptionWritable.readFields(java.io.DataInput)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||