@InterfaceAudience.Private public class CloseRegionHandler extends EventHandler
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.
UnassignRegionHandler| Modifier and Type | Field and Description |
|---|---|
private boolean |
abort |
private ServerName |
destination |
private static org.slf4j.Logger |
LOG |
private RegionInfo |
regionInfo |
private RegionServerServices |
rsServices |
eventType, seqids, server, waitingTimeForEvents| Modifier | Constructor and Description |
|---|---|
protected |
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.
|
| Modifier and Type | Method and Description |
|---|---|
RegionInfo |
getRegionInfo() |
protected void |
handleException(Throwable t)
Event exception handler, may be overridden
|
void |
process()
This method is the main processing loop to be implemented by the various subclasses.
|
compareTo, getEventType, getInformativeName, getPriority, getSeqid, prepare, run, toStringprivate static final org.slf4j.Logger LOG
private final RegionServerServices rsServices
private final RegionInfo regionInfo
private final boolean abort
private ServerName destination
public CloseRegionHandler(Server server, RegionServerServices rsServices, RegionInfo regionInfo, boolean abort, ServerName destination)
abort - If the regionserver is aborting.protected CloseRegionHandler(Server server, RegionServerServices rsServices, RegionInfo regionInfo, boolean abort, EventType eventType, ServerName destination)
public RegionInfo getRegionInfo()
public void process() throws IOException
EventHandlerprocess in class EventHandlerIOExceptionprotected void handleException(Throwable t)
EventHandlerhandleException in class EventHandlert - Throwable objectCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.