@InterfaceAudience.Private public class RegionReplicationSink extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
RegionReplicationSink.SinkEntry |
Constructor and Description |
---|
RegionReplicationSink(org.apache.hadoop.conf.Configuration conf,
RegionInfo primary,
TableDescriptor td,
RegionReplicationBufferManager manager,
Runnable flushRequester,
AsyncClusterConnection conn) |
Modifier and Type | Method and Description |
---|---|
void |
add(WALKeyImpl key,
WALEdit edit,
ServerCall<?> rpcCall)
Add this edit to replication queue.
|
private long |
clearAllEntries() |
(package private) org.agrona.collections.IntHashSet |
getFailedReplicas() |
(package private) Optional<org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.FlushDescriptor> |
getStartFlushAllDescriptor(Cell metaCell) |
private boolean |
isStartFlushAllStores(org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.FlushDescriptor flushDesc) |
(package private) void |
onComplete(List<RegionReplicationSink.SinkEntry> sent,
Map<Integer,org.apache.commons.lang3.mutable.MutableObject<Throwable>> replica2Error) |
(package private) long |
pendingSize() |
private void |
send() |
void |
stop()
Stop the replication sink.
|
void |
waitUntilStopped()
Make sure that we have finished all the replicating requests.
|
private static final org.slf4j.Logger LOG
public static final String RETRIES_NUMBER
public static final int RETRIES_NUMBER_DEFAULT
public static final String RPC_TIMEOUT_MS
public static final long RPC_TIMEOUT_MS_DEFAULT
public static final String OPERATION_TIMEOUT_MS
public static final long OPERATION_TIMEOUT_MS_DEFAULT
public static final String META_EDIT_RPC_TIMEOUT_MS
public static final long META_EDIT_RPC_TIMEOUT_MS_DEFAULT
public static final String META_EDIT_OPERATION_TIMEOUT_MS
public static final long META_EDIT_OPERATION_TIMEOUT_MS_DEFAULT
public static final String BATCH_SIZE_CAPACITY
public static final long BATCH_SIZE_CAPACITY_DEFAULT
public static final String BATCH_COUNT_CAPACITY
public static final int BATCH_COUNT_CAPACITY_DEFAULT
private final RegionInfo primary
private final TableDescriptor tableDesc
private final int regionReplication
private final RegionReplicationBufferManager manager
private final RegionReplicationFlushRequester flushRequester
private final AsyncClusterConnection conn
private final org.agrona.collections.IntHashSet failedReplicas
private final Queue<RegionReplicationSink.SinkEntry> entries
private final int retries
private final long rpcTimeoutNs
private final long operationTimeoutNs
private final long metaEditRpcTimeoutNs
private final long metaEditOperationTimeoutNs
private final long batchSizeCapacity
private final long batchCountCapacity
private volatile long pendingSize
private long lastFlushedSequenceId
private boolean sending
private boolean stopping
private boolean stopped
public RegionReplicationSink(org.apache.hadoop.conf.Configuration conf, RegionInfo primary, TableDescriptor td, RegionReplicationBufferManager manager, Runnable flushRequester, AsyncClusterConnection conn)
void onComplete(List<RegionReplicationSink.SinkEntry> sent, Map<Integer,org.apache.commons.lang3.mutable.MutableObject<Throwable>> replica2Error)
private void send()
private boolean isStartFlushAllStores(org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.FlushDescriptor flushDesc)
Optional<org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.FlushDescriptor> getStartFlushAllDescriptor(Cell metaCell)
private long clearAllEntries()
public void add(WALKeyImpl key, WALEdit edit, ServerCall<?> rpcCall)
rpcCall
is for retaining the cells if the edit is built within an rpc call and the
rpc call has cell scanner, which is off heap.long pendingSize()
public void stop()
public void waitUntilStopped() throws InterruptedException
InterruptedException
org.agrona.collections.IntHashSet getFailedReplicas()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.