public class ReplicationSink extends Object
Modifier and Type | Field and Description |
---|---|
static String |
REPLICATION_LOG_DIR |
Constructor and Description |
---|
ReplicationSink(org.apache.hadoop.conf.Configuration conf,
Stoppable stopper)
Create a sink for replication
|
Modifier and Type | Method and Description |
---|---|
protected void |
batch(byte[] tableName,
Collection<List<Row>> allRows)
Do the changes and handle the pool
|
void |
replicateEntries(HLog.Entry[] entries)
Replicate this array of entries directly into the local cluster
using the native client.
|
void |
stopReplicationSinkServices()
stop the thread pool executor.
|
public static final String REPLICATION_LOG_DIR
public ReplicationSink(org.apache.hadoop.conf.Configuration conf, Stoppable stopper) throws IOException
conf
- conf objectstopper
- boolean to tell this thread to stopIOException
- thrown when HDFS goes bad or bad file namepublic void replicateEntries(HLog.Entry[] entries) throws IOException
entries
- IOException
public void stopReplicationSinkServices()
protected void batch(byte[] tableName, Collection<List<Row>> allRows) throws IOException
tableName
- table to insert intoallRows
- list of actionsIOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.