org.apache.hadoop.hbase.regionserver.handler
Class OpenRegionHandler

java.lang.Object
  extended by org.apache.hadoop.hbase.executor.EventHandler
      extended by org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler
All Implemented Interfaces:
Comparable<Runnable>, Runnable
Direct Known Subclasses:
OpenMetaHandler

@InterfaceAudience.Private
public class OpenRegionHandler
extends EventHandler

Handles opening of a region on a region server.

This is executed after receiving an OPEN RPC from the master or client.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.executor.EventHandler
EventHandler.EventHandlerListener
 
Field Summary
protected  RegionServerServices rsServices
           
 
Fields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents
 
Constructor Summary
  OpenRegionHandler(Server server, RegionServerServices rsServices, HRegionInfo regionInfo, HTableDescriptor htd)
           
  OpenRegionHandler(Server server, RegionServerServices rsServices, HRegionInfo regionInfo, HTableDescriptor htd, int versionOfOfflineNode, long masterSystemTime)
           
protected OpenRegionHandler(Server server, RegionServerServices rsServices, HRegionInfo regionInfo, HTableDescriptor htd, long masterSystemTime, EventType eventType, int versionOfOfflineNode)
           
 
Method Summary
 HRegionInfo getRegionInfo()
           
 void process()
          This method is the main processing loop to be implemented by the various subclasses.
static boolean tryTransitionFromOfflineToFailedOpen(RegionServerServices rsServices, HRegionInfo hri, int versionOfOfflineNode)
          Try to transition to open.
 
Methods inherited from class org.apache.hadoop.hbase.executor.EventHandler
compareTo, getEventType, getInformativeName, getListener, getPriority, getSeqid, handleException, prepare, run, setListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rsServices

protected final RegionServerServices rsServices
Constructor Detail

OpenRegionHandler

public OpenRegionHandler(Server server,
                         RegionServerServices rsServices,
                         HRegionInfo regionInfo,
                         HTableDescriptor htd)

OpenRegionHandler

public OpenRegionHandler(Server server,
                         RegionServerServices rsServices,
                         HRegionInfo regionInfo,
                         HTableDescriptor htd,
                         int versionOfOfflineNode,
                         long masterSystemTime)

OpenRegionHandler

protected OpenRegionHandler(Server server,
                            RegionServerServices rsServices,
                            HRegionInfo regionInfo,
                            HTableDescriptor htd,
                            long masterSystemTime,
                            EventType eventType,
                            int versionOfOfflineNode)
Method Detail

getRegionInfo

public HRegionInfo getRegionInfo()

process

public void process()
             throws IOException
Description copied from class: EventHandler
This method is the main processing loop to be implemented by the various subclasses.

Specified by:
process in class EventHandler
Throws:
IOException

tryTransitionFromOfflineToFailedOpen

public static boolean tryTransitionFromOfflineToFailedOpen(RegionServerServices rsServices,
                                                           HRegionInfo hri,
                                                           int versionOfOfflineNode)
Try to transition to open. This function is static to make it usable before creating the handler. This is not guaranteed to succeed, we just do our best.

Parameters:
rsServices -
hri - Region we're working on.
versionOfOfflineNode - version to checked.
Returns:
whether znode is successfully transitioned to FAILED_OPEN state.


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.