org.apache.hadoop.hbase.replication.regionserver
Interface ReplicationSourceInterface

All Known Implementing Classes:
ReplicationSource

@InterfaceAudience.Private
public interface ReplicationSourceInterface

Interface that defines a replication source


Method Summary
 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
 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
 

Method Detail

init

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
Initializer for the source

Parameters:
conf - the configuration to use
fs - the file system to use
manager - the manager to use
replicationQueues -
replicationPeers -
stopper - the stopper object for this region server
peerClusterZnode -
clusterId -
Throws:
IOException

enqueueLog

void enqueueLog(org.apache.hadoop.fs.Path log)
Add a log to the list of logs to replicate

Parameters:
log - path to the log to replicate

getCurrentPath

org.apache.hadoop.fs.Path getCurrentPath()
Get the current log that's replicated

Returns:
the current log

startup

void startup()
Start the replication


terminate

void terminate(String reason)
End the replication

Parameters:
reason - why it's terminating

terminate

void terminate(String reason,
               Exception cause)
End the replication

Parameters:
reason - why it's terminating
cause - the error that's causing it

getPeerClusterZnode

String getPeerClusterZnode()
Get the id that the source is replicating to

Returns:
peer cluster id

getPeerClusterId

String getPeerClusterId()
Get the id that the source is replicating to.

Returns:
peer cluster id

getStats

String getStats()
Get a string representation of the current statistics for this source

Returns:
printable stats


Copyright © 2015 The Apache Software Foundation. All rights reserved.