Class RegionReplicaFlushHandler
java.lang.Object
org.apache.hadoop.hbase.executor.EventHandler
org.apache.hadoop.hbase.regionserver.handler.RegionReplicaFlushHandler
- All Implemented Interfaces:
Comparable<EventHandler>,Runnable
HBASE-11580: With the async wal approach (HBASE-11568), the edits are not persisted to WAL in
secondary region replicas. This means that a secondary region replica can serve some edits from
it's memstore that are still not flushed from primary. We do not want to allow secondary region's
seqId to go back in time, when this secondary region is opened elsewhere after a crash or region
move. We will trigger a flush cache in the primary region replica and wait for observing a
complete flush cycle before marking the region readsEnabled. This handler does the flushing of
the primary region replica and ensures that regular region opening is not blocked while the
secondary replica is blocked on flush.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AsyncClusterConnectionprivate static final org.slf4j.Loggerprivate final HRegionFields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intgetRetriesCount(org.apache.hadoop.conf.Configuration conf) protected voidEvent exception handler, may be overriddenprivate booleanisTableDisabledOrDropped(IOException error, HRegion region) voidprocess()This method is the main processing loop to be implemented by the various subclasses.(package private) voidtriggerFlushInPrimaryRegion(HRegion region) Methods inherited from class org.apache.hadoop.hbase.executor.EventHandler
compareTo, getEventType, getInformativeName, getPriority, getSeqid, prepare, run, toString
-
Field Details
-
LOG
-
connection
-
region
-
-
Constructor Details
-
RegionReplicaFlushHandler
-
-
Method Details
-
process
Description copied from class:EventHandlerThis method is the main processing loop to be implemented by the various subclasses.- Specified by:
processin classEventHandler- Throws:
IOException
-
handleException
Description copied from class:EventHandlerEvent exception handler, may be overridden- Overrides:
handleExceptionin classEventHandler- Parameters:
t- Throwable object
-
getRetriesCount
-
isTableDisabledOrDropped
-
triggerFlushInPrimaryRegion
- Throws:
IOException
-