@InterfaceAudience.Private public class ReplicationSink extends java.lang.Object
| Constructor and Description |
|---|
ReplicationSink(Configuration conf,
Stoppable stopper)
Create a sink for replication
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
batch(TableName tableName,
java.util.Collection<java.util.List<Row>> allRows)
Do the changes and handle the pool
|
MetricsSink |
getSinkMetrics()
Get replication Sink Metrics
|
java.lang.String |
getStats()
Get a string representation of this sink's metrics
|
void |
replicateEntries(java.util.List<AdminProtos.WALEntry> entries,
CellScanner cells,
java.lang.String replicationClusterId,
java.lang.String sourceBaseNamespaceDirPath,
java.lang.String sourceHFileArchiveDirPath)
Replicate this array of entries directly into the local cluster using the native client.
|
void |
stopReplicationSinkServices()
stop the thread pool executor.
|
public ReplicationSink(Configuration conf,
Stoppable stopper)
throws java.io.IOException
conf - conf objectstopper - boolean to tell this thread to stopjava.io.IOException - thrown when HDFS goes bad or bad file namepublic void replicateEntries(java.util.List<AdminProtos.WALEntry> entries, CellScanner cells, java.lang.String replicationClusterId, java.lang.String sourceBaseNamespaceDirPath, java.lang.String sourceHFileArchiveDirPath) throws java.io.IOException
entries - cells - replicationClusterId - Id which will uniquely identify source cluster FS client
configurations in the replication configuration directorysourceBaseNamespaceDirPath - Path that point to the source cluster base namespace
directorysourceHFileArchiveDirPath - Path that point to the source cluster hfile archive directoryjava.io.IOException - If failed to replicate the datapublic void stopReplicationSinkServices()
protected void batch(TableName tableName, java.util.Collection<java.util.List<Row>> allRows) throws java.io.IOException
tableName - table to insert intoallRows - list of actionsjava.io.IOExceptionpublic java.lang.String getStats()
public MetricsSink getSinkMetrics()