Class RegionReplicationBufferManager
java.lang.Object
org.apache.hadoop.hbase.regionserver.regionreplication.RegionReplicationBufferManager
Manager the buffer size for all
RegionReplicationSink
.
If the buffer size exceeds the soft limit, we will find out the region with largest pending size
and trigger a flush, so it can drop all the pending entries and save memories.
If the buffer size exceeds the hard limit, we will return false
for
increase(long)
and let the RegionReplicationSink
to drop the edits immediately.-
Field Summary
Modifier and TypeFieldDescriptionprivate final ThreadPoolExecutor
private static final org.slf4j.Logger
static final String
This is the total size of pending entries for all the sinks.static final long
private final long
private final AtomicLong
private final RegionServerServices
static final String
static final float
private final long
-
Constructor Summary
-
Method Summary
-
Field Details
-
LOG
-
MAX_PENDING_SIZE
This is the total size of pending entries for all the sinks.- See Also:
-
MAX_PENDING_SIZE_DEFAULT
- See Also:
-
SOFT_LIMIT_PERCENTAGE
- See Also:
-
SOFT_LIMIT_PERCENTAGE_DEFAULT
- See Also:
-
rsServices
-
maxPendingSize
-
softMaxPendingSize
-
pendingSize
-
executor
-
-
Constructor Details
-
RegionReplicationBufferManager
-
-
Method Details
-
flush
-
increase
Return whether we should just drop all the edits, if we have reached the hard limit of max pending size.- Returns:
true
means OK,false
means drop all the edits.
-
decrease
Called after you ship the edits out. -
stop
-