@InterfaceAudience.Private public class AssignRegionHandler extends EventHandler
OpenRegionHandler
, with some modifications on
fencing and retrying. But we need to keep the OpenRegionHandler
as is to keep compatible
with the zk less assignment for 1.x, otherwise it is not possible to do rolling upgrade.Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private long |
masterSystemTime |
private long |
openProcId |
private RegionInfo |
regionInfo |
private RetryCounter |
retryCounter |
private TableDescriptor |
tableDesc |
eventType, seqids, server, waitingTimeForEvents
Constructor and Description |
---|
AssignRegionHandler(HRegionServer server,
RegionInfo regionInfo,
long openProcId,
TableDescriptor tableDesc,
long masterSystemTime,
EventType eventType) |
Modifier and Type | Method and Description |
---|---|
private void |
cleanUpAndReportFailure(IOException error) |
static AssignRegionHandler |
create(HRegionServer server,
RegionInfo regionInfo,
long openProcId,
TableDescriptor tableDesc,
long masterSystemTime) |
private HRegionServer |
getServer() |
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, toString
private static final org.slf4j.Logger LOG
private final RegionInfo regionInfo
private final long openProcId
private final TableDescriptor tableDesc
private final long masterSystemTime
private final RetryCounter retryCounter
public AssignRegionHandler(HRegionServer server, RegionInfo regionInfo, long openProcId, @Nullable TableDescriptor tableDesc, long masterSystemTime, EventType eventType)
private HRegionServer getServer()
private void cleanUpAndReportFailure(IOException error) throws IOException
IOException
public void process() throws IOException
EventHandler
process
in class EventHandler
IOException
protected void handleException(Throwable t)
EventHandler
handleException
in class EventHandler
t
- Throwable objectpublic static AssignRegionHandler create(HRegionServer server, RegionInfo regionInfo, long openProcId, TableDescriptor tableDesc, long masterSystemTime)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.