@InterfaceAudience.Private public interface ReplicationSourceInterface
| Modifier and Type | Method and Description |
|---|---|
void |
addHFileRefs(TableName tableName,
byte[] family,
java.util.List<Pair<Path,Path>> pairs)
Add hfile names to the queue to be replicated.
|
void |
enqueueLog(Path log)
Add a log to the list of logs to replicate
|
Path |
getCurrentPath()
Get the current log that's replicated
|
java.lang.String |
getPeerClusterId()
Get the id that the source is replicating to.
|
java.lang.String |
getPeerClusterZnode()
Get the id that the source is replicating to
|
java.lang.String |
getStats()
Get a string representation of the current statistics
for this source
|
void |
init(Configuration conf,
FileSystem fs,
ReplicationSourceManager manager,
ReplicationQueues replicationQueues,
ReplicationPeers replicationPeers,
Stoppable stopper,
java.lang.String peerClusterZnode,
java.util.UUID clusterId,
ReplicationEndpoint replicationEndpoint,
MetricsSource metrics)
Initializer for the source
|
void |
startup()
Start the replication
|
void |
terminate(java.lang.String reason)
End the replication
|
void |
terminate(java.lang.String reason,
java.lang.Exception cause)
End the replication
|
void init(Configuration conf,
FileSystem fs,
ReplicationSourceManager manager,
ReplicationQueues replicationQueues,
ReplicationPeers replicationPeers,
Stoppable stopper,
java.lang.String peerClusterZnode,
java.util.UUID clusterId,
ReplicationEndpoint replicationEndpoint,
MetricsSource metrics)
throws java.io.IOException
conf - the configuration to usefs - the file system to usemanager - the manager to usereplicationQueues - replicationPeers - stopper - the stopper object for this region serverpeerClusterZnode - clusterId - java.io.IOExceptionvoid enqueueLog(Path log)
log - path to the log to replicatePath getCurrentPath()
void startup()
void terminate(java.lang.String reason)
reason - why it's terminatingvoid terminate(java.lang.String reason,
java.lang.Exception cause)
reason - why it's terminatingcause - the error that's causing itjava.lang.String getPeerClusterZnode()
java.lang.String getPeerClusterId()
java.lang.String getStats()
void addHFileRefs(TableName tableName, byte[] family, java.util.List<Pair<Path,Path>> pairs) throws ReplicationException
tableName - Name of the table these files belongs tofamily - Name of the family these files belong topairs - list of pairs of { HFile location in staging dir, HFile path in region dir which
will be added in the queue for replication}ReplicationException - If failed to add hfile references