@InterfaceAudience.Private public interface ReplicationSourceInterface
| Modifier and Type | Method and Description |
|---|---|
void |
addHFileRefs(TableName tableName,
byte[] family,
List<Pair<org.apache.hadoop.fs.Path,org.apache.hadoop.fs.Path>> pairs)
Add hfile names to the queue to be replicated.
|
void |
enqueueLog(org.apache.hadoop.fs.Path log)
Add a log to the list of logs to replicate
|
org.apache.hadoop.fs.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
|
MetricsSource |
getSourceMetrics()
Get the associated metrics.
|
String |
getStats()
Get a string representation of the current statistics
for this source
|
void |
init(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.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(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.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 - IOExceptionvoid enqueueLog(org.apache.hadoop.fs.Path log)
log - path to the log to replicateorg.apache.hadoop.fs.Path 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()
void addHFileRefs(TableName tableName, byte[] family, List<Pair<org.apache.hadoop.fs.Path,org.apache.hadoop.fs.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 referencesMetricsSource getSourceMetrics()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.