public abstract class DistributedWorkQueueWorkAssigner extends Object implements WorkAssigner
WorkAssigners| Modifier and Type | Field and Description |
|---|---|
protected AccumuloConfiguration |
conf |
protected Connector |
conn |
protected int |
maxQueueSize |
protected DistributedWorkQueue |
workQueue |
protected ZooCache |
zooCache |
| Constructor and Description |
|---|
DistributedWorkQueueWorkAssigner() |
| Modifier and Type | Method and Description |
|---|---|
void |
assignWork() |
protected abstract void |
cleanupFinishedWork()
Remove finished replication work from the internal state
|
void |
configure(AccumuloConfiguration conf,
Connector conn) |
protected void |
createWork()
Scan over the
ReplicationSchema.WorkSection of the replication table adding work for entries that have data to replicate and have not already been queued. |
protected AccumuloConfiguration |
getConf() |
protected Connector |
getConnector() |
protected int |
getMaxQueueSize() |
protected abstract Set<String> |
getQueuedWork(ReplicationTarget target) |
protected abstract int |
getQueueSize() |
protected DistributedWorkQueue |
getWorkQueue() |
protected ZooCache |
getZooCache() |
protected abstract void |
initializeQueuedWork()
Set up any internal state before using the WorkAssigner
|
protected void |
initializeWorkQueue(AccumuloConfiguration conf)
Initialize the DistributedWorkQueue using the proper ZK location
|
protected boolean |
isWorkRequired(Replication.Status status) |
protected abstract boolean |
queueWork(org.apache.hadoop.fs.Path path,
ReplicationTarget target)
Queue the given work for the target
|
protected abstract void |
removeQueuedWork(ReplicationTarget target,
String queueKey)
Remove the given work from the internal state
|
protected void |
setConf(AccumuloConfiguration conf) |
protected void |
setConnector(Connector conn) |
protected void |
setMaxQueueSize(int maxQueueSize) |
protected void |
setWorkQueue(DistributedWorkQueue workQueue) |
protected void |
setZooCache(ZooCache zooCache) |
protected abstract boolean |
shouldQueueWork(ReplicationTarget target) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNameprotected Connector conn
protected AccumuloConfiguration conf
protected DistributedWorkQueue workQueue
protected int maxQueueSize
protected ZooCache zooCache
protected boolean isWorkRequired(Replication.Status status)
protected Connector getConnector()
protected void setConnector(Connector conn)
protected AccumuloConfiguration getConf()
protected void setConf(AccumuloConfiguration conf)
protected DistributedWorkQueue getWorkQueue()
protected void setWorkQueue(DistributedWorkQueue workQueue)
protected int getMaxQueueSize()
protected void setMaxQueueSize(int maxQueueSize)
protected ZooCache getZooCache()
protected void setZooCache(ZooCache zooCache)
protected void initializeWorkQueue(AccumuloConfiguration conf)
public void configure(AccumuloConfiguration conf, Connector conn)
configure in interface WorkAssignerpublic void assignWork()
assignWork in interface WorkAssignerprotected void createWork()
ReplicationSchema.WorkSection of the replication table adding work for entries that have data to replicate and have not already been queued.protected abstract boolean shouldQueueWork(ReplicationTarget target)
ReplicationTarget be submitted to be worked on.protected abstract int getQueueSize()
protected abstract void initializeQueuedWork()
protected abstract boolean queueWork(org.apache.hadoop.fs.Path path,
ReplicationTarget target)
path - File to replicatetarget - Target for the workprotected abstract Set<String> getQueuedWork(ReplicationTarget target)
target - Target for the workprotected abstract void removeQueuedWork(ReplicationTarget target, String queueKey)
protected abstract void cleanupFinishedWork()
Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.