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

java.lang.Object
  extended by org.apache.hadoop.hbase.executor.EventHandler
      extended by org.apache.hadoop.hbase.master.handler.ClosedRegionHandler
All Implemented Interfaces:
Comparable<Runnable>, Runnable, TotesHRegionInfo

@InterfaceAudience.Private
public class ClosedRegionHandler
extends EventHandler
implements TotesHRegionInfo

Handles CLOSED region event on Master.

If table is being disabled, deletes ZK unassigned node and removes from regions in transition.

Otherwise, assigns the region to another server.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.executor.EventHandler
EventHandler.EventHandlerListener
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents
 
Constructor Summary
ClosedRegionHandler(Server server, AssignmentManager assignmentManager, HRegionInfo regionInfo)
           
 
Method Summary
 HRegionInfo getHRegionInfo()
           
 int getPriority()
          Get the priority level for this handler instance.
 void process()
          This method is the main processing loop to be implemented by the various subclasses.
 String toString()
           
 
Methods inherited from class org.apache.hadoop.hbase.executor.EventHandler
compareTo, getEventType, getInformativeName, getListener, getSeqid, handleException, prepare, run, setListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClosedRegionHandler

public ClosedRegionHandler(Server server,
                           AssignmentManager assignmentManager,
                           HRegionInfo regionInfo)
Method Detail

getPriority

public int getPriority()
Description copied from class: EventHandler
Get the priority level for this handler instance. This uses natural ordering so lower numbers are higher priority.

Lowest priority is Integer.MAX_VALUE. Highest priority is 0.

Subclasses should override this method to allow prioritizing handlers.

Handlers with the same priority are handled in FIFO order.

Overrides:
getPriority in class EventHandler
Returns:
Integer.MAX_VALUE by default, override to set higher priorities

getHRegionInfo

public HRegionInfo getHRegionInfo()
Specified by:
getHRegionInfo in interface TotesHRegionInfo
Returns:
HRegionInfo instance.

toString

public String toString()
Overrides:
toString in class EventHandler

process

public void process()
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


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.