org.apache.hadoop.hbase.executor
Enum HBaseEventHandler.HBaseEventType

java.lang.Object
  extended by java.lang.Enum<HBaseEventHandler.HBaseEventType>
      extended by org.apache.hadoop.hbase.executor.HBaseEventHandler.HBaseEventType
All Implemented Interfaces:
Serializable, Comparable<HBaseEventHandler.HBaseEventType>
Enclosing class:
HBaseEventHandler

public static enum HBaseEventHandler.HBaseEventType
extends Enum<HBaseEventHandler.HBaseEventType>

These are a list of HBase events that can be handled by the various HBaseExecutorService's. All the events are serialized as byte values.


Enum Constant Summary
M2ZK_REGION_OFFLINE
           
NONE
           
RS2ZK_REGION_CLOSED
           
RS2ZK_REGION_CLOSING
           
RS2ZK_REGION_OPENED
           
RS2ZK_REGION_OPENING
           
 
Method Summary
static HBaseEventHandler.HBaseEventType fromByte(byte value)
           
 byte getByteValue()
           
 HBaseExecutorService.HBaseExecutorServiceType getMasterExecutorForEvent()
          Called by the HMaster.
static String getRSExecutorForEvent(String serverName)
          Called by the RegionServer.
 void startMasterExecutorService(String serverName)
          Start the executor service that handles the passed in event type.
static void startRSExecutorService()
           
static HBaseEventHandler.HBaseEventType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HBaseEventHandler.HBaseEventType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final HBaseEventHandler.HBaseEventType NONE

RS2ZK_REGION_CLOSING

public static final HBaseEventHandler.HBaseEventType RS2ZK_REGION_CLOSING

RS2ZK_REGION_CLOSED

public static final HBaseEventHandler.HBaseEventType RS2ZK_REGION_CLOSED

RS2ZK_REGION_OPENING

public static final HBaseEventHandler.HBaseEventType RS2ZK_REGION_OPENING

RS2ZK_REGION_OPENED

public static final HBaseEventHandler.HBaseEventType RS2ZK_REGION_OPENED

M2ZK_REGION_OFFLINE

public static final HBaseEventHandler.HBaseEventType M2ZK_REGION_OFFLINE
Method Detail

values

public static HBaseEventHandler.HBaseEventType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (HBaseEventHandler.HBaseEventType c : HBaseEventHandler.HBaseEventType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static HBaseEventHandler.HBaseEventType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getMasterExecutorForEvent

public HBaseExecutorService.HBaseExecutorServiceType getMasterExecutorForEvent()
Called by the HMaster. Returns a name of the executor service given an event type. Every event type has en entry - if the event should not be handled just add the NONE executor.

Returns:
name of the executor service

getRSExecutorForEvent

public static String getRSExecutorForEvent(String serverName)
Called by the RegionServer. Returns a name of the executor service given an event type. Every event type has en entry - if the event should not be handled just return a null executor name.

Returns:
name of the event service

startMasterExecutorService

public void startMasterExecutorService(String serverName)
Start the executor service that handles the passed in event type. The server that starts these event executor services wants to handle these event types.


startRSExecutorService

public static void startRSExecutorService()

getByteValue

public byte getByteValue()

fromByte

public static HBaseEventHandler.HBaseEventType fromByte(byte value)


Copyright © 2010 Apache Software Foundation. All Rights Reserved.