@InterfaceAudience.Private public class WALEditsReplaySink extends Object
This class uses the native HBase client in order to replay WAL entries.
Modifier and Type | Class and Description |
---|---|
(package private) class |
WALEditsReplaySink.ReplayServerCallable<R>
Callable that handles the
replay method call going against a single regionserver |
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private HConnection |
conn |
private static org.apache.commons.logging.Log |
LOG |
private static int |
MAX_BATCH_SIZE |
private MetricsWALEditsReplay |
metrics |
private int |
replayTimeout |
private RpcControllerFactory |
rpcControllerFactory |
private boolean |
skipErrors |
private TableName |
tableName |
private AtomicLong |
totalReplayedEdits |
Constructor and Description |
---|
WALEditsReplaySink(org.apache.hadoop.conf.Configuration conf,
TableName tableName,
HConnection conn)
Create a sink for WAL log entries replay
|
Modifier and Type | Method and Description |
---|---|
String |
getStats()
Get a string representation of this sink's metrics
|
private void |
replayEdits(HRegionLocation regionLoc,
HRegionInfo regionInfo,
List<WAL.Entry> entries) |
void |
replayEntries(List<Pair<HRegionLocation,WAL.Entry>> entries)
Replay an array of actions of the same region directly into the newly assigned Region Server
|
private static final org.apache.commons.logging.Log LOG
private static final int MAX_BATCH_SIZE
private final org.apache.hadoop.conf.Configuration conf
private final HConnection conn
private final TableName tableName
private final MetricsWALEditsReplay metrics
private final AtomicLong totalReplayedEdits
private final boolean skipErrors
private final int replayTimeout
private RpcControllerFactory rpcControllerFactory
public WALEditsReplaySink(org.apache.hadoop.conf.Configuration conf, TableName tableName, HConnection conn) throws IOException
conf
- tableName
- conn
- IOException
public void replayEntries(List<Pair<HRegionLocation,WAL.Entry>> entries) throws IOException
entries
- IOException
public String getStats()
private void replayEdits(HRegionLocation regionLoc, HRegionInfo regionInfo, List<WAL.Entry> entries) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.