Class CloseRegionHandler
java.lang.Object
org.apache.hadoop.hbase.executor.EventHandler
org.apache.hadoop.hbase.regionserver.handler.CloseRegionHandler
- All Implemented Interfaces:
Comparable<EventHandler>
,Runnable
- Direct Known Subclasses:
CloseMetaHandler
Handles closing of a region on a region server.
In normal operation, we use
UnassignRegionHandler
closing Regions but when shutting down
the region server and closing out Regions, we use this handler instead; it does not expect to be
able to communicate the close back to the Master.
Expects that the close *has* been registered in the hosting RegionServer before submitting this
Handler; i.e. rss.getRegionsInTransitionInRS().putIfAbsent(
this.regionInfo.getEncodedNameAsBytes(), Boolean.FALSE);
has been called first. In here
when done, we do the deregister.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private ServerName
private static final org.slf4j.Logger
private final RegionInfo
private final RegionServerServices
Fields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents
-
Constructor Summary
ModifierConstructorDescriptionprotected
CloseRegionHandler
(Server server, RegionServerServices rsServices, RegionInfo regionInfo, boolean abort, EventType eventType, ServerName destination) CloseRegionHandler
(Server server, RegionServerServices rsServices, RegionInfo regionInfo, boolean abort, ServerName destination) This method used internally by the RegionServer to close out regions. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Event exception handler, may be overriddenvoid
process()
This method is the main processing loop to be implemented by the various subclasses.Methods inherited from class org.apache.hadoop.hbase.executor.EventHandler
compareTo, getEventType, getInformativeName, getPriority, getSeqid, prepare, run, toString
-
Field Details
-
LOG
-
rsServices
-
regionInfo
-
abort
-
destination
-
-
Constructor Details
-
CloseRegionHandler
public CloseRegionHandler(Server server, RegionServerServices rsServices, RegionInfo regionInfo, boolean abort, ServerName destination) This method used internally by the RegionServer to close out regions.- Parameters:
abort
- If the regionserver is aborting.
-
CloseRegionHandler
protected CloseRegionHandler(Server server, RegionServerServices rsServices, RegionInfo regionInfo, boolean abort, EventType eventType, ServerName destination)
-
-
Method Details
-
getRegionInfo
-
process
Description copied from class:EventHandler
This method is the main processing loop to be implemented by the various subclasses.- Specified by:
process
in classEventHandler
- Throws:
IOException
-
handleException
Description copied from class:EventHandler
Event exception handler, may be overridden- Overrides:
handleException
in classEventHandler
- Parameters:
t
- Throwable object
-