public class UnorderedWorkAssigner extends DistributedWorkQueueWorkAssigner
Uses the DistributedWorkQueue to make the work available for any tserver. This approach does not consider the locality of the tabletserver performing the work in relation to the data being replicated (local HDFS blocks).
The implementation allows for multiple tservers to concurrently replicate data to peer(s), however it is possible that data for a table is replayed on the
peer in a different order than the master. The SequentialWorkAssigner should be used if this must be guaranteed at the cost of replication
throughput.
conf, conn, maxQueueSize, workQueue, zooCache| Constructor and Description |
|---|
UnorderedWorkAssigner() |
UnorderedWorkAssigner(AccumuloConfiguration conf,
Connector conn) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupFinishedWork()
Iterate over the queued work to remove entries that have been completed.
|
String |
getName() |
protected Set<String> |
getQueuedWork() |
protected Set<String> |
getQueuedWork(ReplicationTarget target) |
protected int |
getQueueSize() |
protected void |
initializeQueuedWork()
Initialize the queuedWork set with the work already sent out
|
protected boolean |
queueWork(org.apache.hadoop.fs.Path path,
ReplicationTarget target)
Distribute the work for the given path with filename
|
protected void |
removeQueuedWork(ReplicationTarget target,
String queueKey)
Remove the given work from the internal state
|
protected void |
setQueuedWork(Set<String> queuedWork) |
protected boolean |
shouldQueueWork(ReplicationTarget target) |
assignWork, configure, createWork, getConf, getConnector, getMaxQueueSize, getWorkQueue, getZooCache, initializeWorkQueue, isWorkRequired, setConf, setConnector, setMaxQueueSize, setWorkQueue, setZooCachepublic UnorderedWorkAssigner()
public UnorderedWorkAssigner(AccumuloConfiguration conf, Connector conn)
public String getName()
protected void initializeQueuedWork()
initializeQueuedWork in class DistributedWorkQueueWorkAssignerprotected boolean queueWork(org.apache.hadoop.fs.Path path,
ReplicationTarget target)
queueWork in class DistributedWorkQueueWorkAssignerpath - Path to the file being replicatedtarget - Target for the file to be replicated toprotected void cleanupFinishedWork()
cleanupFinishedWork in class DistributedWorkQueueWorkAssignerprotected boolean shouldQueueWork(ReplicationTarget target)
shouldQueueWork in class DistributedWorkQueueWorkAssignerReplicationTarget be submitted to be worked on.protected int getQueueSize()
getQueueSize in class DistributedWorkQueueWorkAssignerprotected Set<String> getQueuedWork(ReplicationTarget target)
getQueuedWork in class DistributedWorkQueueWorkAssignertarget - Target for the workprotected void removeQueuedWork(ReplicationTarget target, String queueKey)
DistributedWorkQueueWorkAssignerremoveQueuedWork in class DistributedWorkQueueWorkAssignerCopyright © 2011–2017 The Apache Software Foundation. All rights reserved.