@InterfaceAudience.Private public interface ReplicationSourceInterface
Modifier and Type | Method and Description |
---|---|
void |
enqueueLog(Path log)
Add a log to the list of logs to replicate
|
Path |
getCurrentPath()
Get the current log that's replicated
|
String |
getPeerClusterId()
Get the id that the source is replicating to.
|
String |
getPeerClusterZnode()
Get the id that the source is replicating to
|
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,
String peerClusterZnode,
UUID clusterId,
ReplicationEndpoint replicationEndpoint,
MetricsSource metrics)
Initializer for the source
|
void |
startup()
Start the replication
|
void |
terminate(String reason)
End the replication
|
void |
terminate(String reason,
Exception cause)
End the replication
|
void init(Configuration conf, FileSystem fs, ReplicationSourceManager manager, ReplicationQueues replicationQueues, ReplicationPeers replicationPeers, Stoppable stopper, String peerClusterZnode, UUID clusterId, ReplicationEndpoint replicationEndpoint, MetricsSource metrics) throws 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
- IOException
void enqueueLog(Path log)
log
- path to the log to replicatePath getCurrentPath()
void startup()
void terminate(String reason)
reason
- why it's terminatingvoid terminate(String reason, Exception cause)
reason
- why it's terminatingcause
- the error that's causing itString getPeerClusterZnode()
String getPeerClusterId()
String getStats()