org.apache.hadoop.hbase.master.handler
Class MasterOpenRegionHandler

java.lang.Object
  extended by org.apache.hadoop.hbase.executor.HBaseEventHandler
      extended by org.apache.hadoop.hbase.master.handler.MasterOpenRegionHandler
All Implemented Interfaces:
Runnable

public class MasterOpenRegionHandler
extends HBaseEventHandler

This is the event handler for all events relating to opening regions on the HMaster. This could be one of the following: - notification that a region server is "OPENING" a region - notification that a region server has "OPENED" a region The following event types map to this handler: - RS_REGION_OPENING - RS_REGION_OPENED


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.executor.HBaseEventHandler
HBaseEventHandler.HBaseEventHandlerListener, HBaseEventHandler.HBaseEventType
 
Field Summary
protected  byte[] serializedData
           
 
Fields inherited from class org.apache.hadoop.hbase.executor.HBaseEventHandler
eventHandlerListeners, eventType, isRegionServer, serverName
 
Constructor Summary
MasterOpenRegionHandler(HBaseEventHandler.HBaseEventType eventType, ServerManager serverManager, String serverName, String regionName, byte[] serData)
           
 
Method Summary
 void process()
          Handle the various events relating to opening regions.
 
Methods inherited from class org.apache.hadoop.hbase.executor.HBaseEventHandler
execute, getEventHandlerName, getHBEvent, isRegionServer, registerListener, run, submit, unregisterListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serializedData

protected byte[] serializedData
Constructor Detail

MasterOpenRegionHandler

public MasterOpenRegionHandler(HBaseEventHandler.HBaseEventType eventType,
                               ServerManager serverManager,
                               String serverName,
                               String regionName,
                               byte[] serData)
Method Detail

process

public void process()
Handle the various events relating to opening regions. We can get the following events here: - RS_REGION_OPENING : Keep track to see how long the region open takes. If the RS is taking too long, then revert the region back to closed state so that it can be re-assigned. - RS_REGION_OPENED : The region is opened. Add an entry into META for the RS having opened this region. Then delete this entry in ZK.

Specified by:
process in class HBaseEventHandler


Copyright © 2010 Apache Software Foundation. All Rights Reserved.