public class ReplicationSourceDummy extends Object implements ReplicationSourceInterface
Constructor and Description |
---|
ReplicationSourceDummy() |
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 rq,
ReplicationPeers rp,
Stoppable stopper,
String peerClusterId,
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 e)
End the replication
|
public void init(Configuration conf, FileSystem fs, ReplicationSourceManager manager, ReplicationQueues rq, ReplicationPeers rp, Stoppable stopper, String peerClusterId, UUID clusterId, ReplicationEndpoint replicationEndpoint, MetricsSource metrics) throws IOException
ReplicationSourceInterface
init
in interface ReplicationSourceInterface
conf
- the configuration to usefs
- the file system to usemanager
- the manager to usestopper
- the stopper object for this region serverIOException
public void enqueueLog(Path log)
ReplicationSourceInterface
enqueueLog
in interface ReplicationSourceInterface
log
- path to the log to replicatepublic Path getCurrentPath()
ReplicationSourceInterface
getCurrentPath
in interface ReplicationSourceInterface
public void startup()
ReplicationSourceInterface
startup
in interface ReplicationSourceInterface
public void terminate(String reason)
ReplicationSourceInterface
terminate
in interface ReplicationSourceInterface
reason
- why it's terminatingpublic void terminate(String reason, Exception e)
ReplicationSourceInterface
terminate
in interface ReplicationSourceInterface
reason
- why it's terminatinge
- the error that's causing itpublic String getPeerClusterZnode()
ReplicationSourceInterface
getPeerClusterZnode
in interface ReplicationSourceInterface
public String getPeerClusterId()
ReplicationSourceInterface
getPeerClusterId
in interface ReplicationSourceInterface
public String getStats()
ReplicationSourceInterface
getStats
in interface ReplicationSourceInterface