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
FieldsModifier and TypeFieldDescriptionprivate final ThreadPoolExecutorprivate static final org.slf4j.Loggerstatic final StringThis is the total size of pending entries for all the sinks.static final longprivate final longprivate final AtomicLongprivate final RegionServerServicesstatic final Stringstatic final floatprivate final long -
Constructor Summary
Constructors -
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:
truemeans OK,falsemeans drop all the edits.
-
decrease
Called after you ship the edits out. -
stop
-