Class RegionReplicationFlushRequester
java.lang.Object
org.apache.hadoop.hbase.regionserver.regionreplication.RegionReplicationFlushRequester
A helper class for requesting flush on a given region.
In general, we do not want to trigger flush too frequently for a region, so here we will add
something like a rate control, i.e, the interval of the two flush request should not be too
small.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Runnable
private long
private long
static final String
The minimum interval between two flush requestsstatic final int
private final long
private org.apache.hbase.thirdparty.io.netty.util.Timeout
private long
private static org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer
The timer for executing delayed flush request task. -
Constructor Summary
ConstructorDescriptionRegionReplicationFlushRequester
(org.apache.hadoop.conf.Configuration conf, Runnable flushRequester) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
flush
(org.apache.hbase.thirdparty.io.netty.util.Timeout timeout) private static org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer
getTimer()
(package private) void
recordFlush
(long sequenceId) Record that we have already finished a flush with the givensequenceId
.private void
request()
(package private) void
requestFlush
(long sequenceId) Request a flush for the given region.
-
Field Details
-
TIMER
The timer for executing delayed flush request task. It will be shared across all the instancesRegionReplicationFlushRequester
. Created on demand to save one extra thread as not every user uses region replication. -
MIN_INTERVAL_SECS
The minimum interval between two flush requests- See Also:
-
MIN_INTERVAL_SECS_DEFAULT
- See Also:
-
flushRequester
-
minIntervalSecs
-
lastRequestNanos
-
pendingFlushRequestSequenceId
-
lastFlushedSequenceId
-
pendingFlushRequest
-
-
Constructor Details
-
RegionReplicationFlushRequester
RegionReplicationFlushRequester(org.apache.hadoop.conf.Configuration conf, Runnable flushRequester)
-
-
Method Details
-
getTimer
-
request
-
flush
-
requestFlush
Request a flush for the given region. The sequence id of the edit which we fail to replicate. A flush must happen after this sequence id to recover the failure. -
recordFlush
Record that we have already finished a flush with the givensequenceId
. We can cancel the pending flush request if the failed sequence id is less than the givensequenceId
.
-