org.apache.hadoop.hbase
Class HMsg

java.lang.Object
  extended by org.apache.hadoop.hbase.HMsg
All Implemented Interfaces:
Writable

public class HMsg
extends Object
implements Writable

HMsg is for communicating instructions between the HMaster and the HRegionServers.


Field Summary
static byte MSG_CALL_SERVER_STARTUP
          Region server is unknown to master.
static byte MSG_REGION_CLOSE
          Stop serving the specified region
static byte MSG_REGION_CLOSE_WITHOUT_REPORT
          Stop serving the specified region and don't report back that it's closed
static byte MSG_REGION_OPEN
          Start serving the specified region
static byte MSG_REGIONSERVER_STOP
          Master tells region server to stop
static byte MSG_REPORT_CLOSE
          region server is no longer serving the specified region
static byte MSG_REPORT_EXITING
          region server is shutting down note that this message is followed by MSG_REPORT_CLOSE messages for each region the region server was serving.
static byte MSG_REPORT_OPEN
          region server is now serving the specified region
static byte MSG_REPORT_SPLIT
          region server split the region associated with this message.
 
Constructor Summary
HMsg()
          Default constructor.
HMsg(byte msg)
          Construct a message with an empty HRegionInfo
HMsg(byte msg, HRegionInfo info)
          Construct a message with the specified message code and HRegionInfo
 
Method Summary
 byte getMsg()
          Accessor
 HRegionInfo getRegionInfo()
          Accessor
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 String toString()
          
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MSG_REGION_OPEN

public static final byte MSG_REGION_OPEN
Start serving the specified region

See Also:
Constant Field Values

MSG_REGION_CLOSE

public static final byte MSG_REGION_CLOSE
Stop serving the specified region

See Also:
Constant Field Values

MSG_CALL_SERVER_STARTUP

public static final byte MSG_CALL_SERVER_STARTUP
Region server is unknown to master. Restart

See Also:
Constant Field Values

MSG_REGIONSERVER_STOP

public static final byte MSG_REGIONSERVER_STOP
Master tells region server to stop

See Also:
Constant Field Values

MSG_REGION_CLOSE_WITHOUT_REPORT

public static final byte MSG_REGION_CLOSE_WITHOUT_REPORT
Stop serving the specified region and don't report back that it's closed

See Also:
Constant Field Values

MSG_REPORT_OPEN

public static final byte MSG_REPORT_OPEN
region server is now serving the specified region

See Also:
Constant Field Values

MSG_REPORT_CLOSE

public static final byte MSG_REPORT_CLOSE
region server is no longer serving the specified region

See Also:
Constant Field Values

MSG_REPORT_SPLIT

public static final byte MSG_REPORT_SPLIT
region server split the region associated with this message. note that this message is immediately followed by two MSG_REPORT_OPEN messages, one for each of the new regions resulting from the split

See Also:
Constant Field Values

MSG_REPORT_EXITING

public static final byte MSG_REPORT_EXITING
region server is shutting down note that this message is followed by MSG_REPORT_CLOSE messages for each region the region server was serving.

See Also:
Constant Field Values
Constructor Detail

HMsg

public HMsg()
Default constructor. Used during deserialization


HMsg

public HMsg(byte msg)
Construct a message with an empty HRegionInfo

Parameters:
msg - - message code

HMsg

public HMsg(byte msg,
            HRegionInfo info)
Construct a message with the specified message code and HRegionInfo

Parameters:
msg - - message code
info - - HRegionInfo
Method Detail

getMsg

public byte getMsg()
Accessor

Returns:
message code

getRegionInfo

public HRegionInfo getRegionInfo()
Accessor

Returns:
HRegionInfo

toString

public String toString()

Overrides:
toString in class Object

write

public void write(DataOutput out)
           throws IOException
Serialize the fields of this object to out.

Specified by:
write in interface Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Deserialize the fields of this object from in.

For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
IOException


Copyright © 2006 The Apache Software Foundation