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
Modifier and TypeFieldDescriptionprivate final AsyncClusterConnection
private static final org.slf4j.Logger
private final HRegion
Fields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate int
getRetriesCount
(org.apache.hadoop.conf.Configuration conf) protected void
Event exception handler, may be overriddenvoid
process()
This method is the main processing loop to be implemented by the various subclasses.(package private) void
triggerFlushInPrimaryRegion
(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: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
-
getRetriesCount
-
triggerFlushInPrimaryRegion
- Throws:
IOException
-