@InterfaceAudience.Private public interface ReplicationQueues
| Modifier and Type | Method and Description |
|---|---|
void |
addHFileRefs(java.lang.String peerId,
java.util.List<Pair<Path,Path>> pairs)
Add new hfile references to the queue.
|
void |
addLog(java.lang.String queueId,
java.lang.String filename)
Add a new WAL file to the given queue.
|
void |
addPeerToHFileRefs(java.lang.String peerId)
Add a peer to hfile reference queue if peer does not exist.
|
java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.String>> |
claimQueues(java.lang.String regionserver)
Take ownership for the set of queues belonging to a dead region server.
|
java.util.List<java.lang.String> |
getAllQueues()
Get a list of all queues for this region server.
|
java.util.List<java.lang.String> |
getListOfReplicators()
Get a list of all region servers that have outstanding replication queues.
|
long |
getLogPosition(java.lang.String queueId,
java.lang.String filename)
Get the current position for a specific WAL in a given queue.
|
java.util.List<java.lang.String> |
getLogsInQueue(java.lang.String queueId)
Get a list of all WALs in the given queue.
|
void |
init(java.lang.String serverName)
Initialize the region server replication queue interface.
|
boolean |
isThisOurZnode(java.lang.String znode)
Checks if the provided znode is the same as this region server's
|
void |
removeAllQueues()
Remove all replication queues for this region server.
|
void |
removeHFileRefs(java.lang.String peerId,
java.util.List<java.lang.String> files)
Remove hfile references from the queue.
|
void |
removeLog(java.lang.String queueId,
java.lang.String filename)
Remove an WAL file from the given queue.
|
void |
removeQueue(java.lang.String queueId)
Remove a replication queue.
|
void |
setLogPosition(java.lang.String queueId,
java.lang.String filename,
long position)
Set the current position for a specific WAL in a given queue.
|
void init(java.lang.String serverName) throws ReplicationException
serverName - The server name of the region server that owns the replication queues this
interface manages.ReplicationExceptionvoid removeQueue(java.lang.String queueId)
queueId - a String that identifies the queue.void addLog(java.lang.String queueId,
java.lang.String filename)
throws ReplicationException
queueId - a String that identifies the queue.filename - name of the WALReplicationExceptionvoid removeLog(java.lang.String queueId,
java.lang.String filename)
queueId - a String that identifies the queue.filename - name of the WALvoid setLogPosition(java.lang.String queueId,
java.lang.String filename,
long position)
queueId - a String that identifies the queuefilename - name of the WALposition - the current position in the filelong getLogPosition(java.lang.String queueId,
java.lang.String filename)
throws ReplicationException
queueId - a String that identifies the queuefilename - name of the WALReplicationExceptionvoid removeAllQueues()
java.util.List<java.lang.String> getLogsInQueue(java.lang.String queueId)
queueId - a String that identifies the queuejava.util.List<java.lang.String> getAllQueues()
java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.String>> claimQueues(java.lang.String regionserver)
regionserver - the id of the dead region serverjava.util.List<java.lang.String> getListOfReplicators()
boolean isThisOurZnode(java.lang.String znode)
znode - to checkvoid addPeerToHFileRefs(java.lang.String peerId)
throws ReplicationException
peerId - peer cluster id to be addedReplicationException - if fails to add a peer id to hfile reference queuevoid addHFileRefs(java.lang.String peerId,
java.util.List<Pair<Path,Path>> pairs)
throws ReplicationException
peerId - peer cluster id to which the hfiles need to be replicatedpairs - list of pairs of { HFile location in staging dir, HFile path in region dir which
will be added in the queue }ReplicationException - if fails to add a hfile referencevoid removeHFileRefs(java.lang.String peerId,
java.util.List<java.lang.String> files)
peerId - peer cluster id from which this hfile references needs to be removedfiles - list of hfile references to be removed