public abstract class DistributedWorkQueueWorkAssigner extends Object implements WorkAssigner
WorkAssigners| Modifier and Type | Field and Description |
|---|---|
protected AccumuloClient |
client |
protected AccumuloConfiguration |
conf |
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,
AccumuloClient client) |
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 AccumuloClient |
getClient() |
protected AccumuloConfiguration |
getConf() |
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 |
setClient(AccumuloClient client) |
protected void |
setConf(AccumuloConfiguration conf) |
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 AccumuloClient client
protected AccumuloConfiguration conf
protected DistributedWorkQueue workQueue
protected int maxQueueSize
protected ZooCache zooCache
protected boolean isWorkRequired(Replication.Status status)
protected AccumuloClient getClient()
protected void setClient(AccumuloClient client)
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, AccumuloClient client)
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–2018 The Apache Software Foundation. All rights reserved.