@InterfaceAudience.Private public class RegionReplicationBufferManager extends Object
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.| Modifier and Type | Field and Description |
|---|---|
static String |
MAX_PENDING_SIZE
This is the total size of pending entries for all the sinks.
|
static long |
MAX_PENDING_SIZE_DEFAULT |
static String |
SOFT_LIMIT_PERCENTAGE |
static float |
SOFT_LIMIT_PERCENTAGE_DEFAULT |
| Constructor and Description |
|---|
RegionReplicationBufferManager(RegionServerServices rsServices) |
| Modifier and Type | Method and Description |
|---|---|
void |
decrease(long size)
Called after you ship the edits out.
|
boolean |
increase(long size)
Return whether we should just drop all the edits, if we have reached the hard limit of max
pending size.
|
void |
stop() |
public static final String MAX_PENDING_SIZE
public static final long MAX_PENDING_SIZE_DEFAULT
public static final String SOFT_LIMIT_PERCENTAGE
public static final float SOFT_LIMIT_PERCENTAGE_DEFAULT
public RegionReplicationBufferManager(RegionServerServices rsServices)
public boolean increase(long size)
true means OK, false means drop all the edits.public void decrease(long size)
public void stop()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.