voldemort.client.rebalance.task
Class RebalanceTask
java.lang.Object
voldemort.client.rebalance.task.RebalanceTask
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- StealerBasedRebalanceTask
public abstract class RebalanceTask
- extends java.lang.Object
- implements java.lang.Runnable
Method Summary |
protected void |
acquirePermit(int nodeId)
|
java.lang.Exception |
getError()
|
java.util.List<RebalanceTaskInfo> |
getStealInfos()
|
boolean |
hasException()
|
boolean |
isComplete()
|
protected void |
permitAcquired(int nodeId)
Helper method to pretty print progress and timing info. |
protected void |
permitStart(int nodeId)
Helper method to pretty print progress and timing info. |
protected void |
taskDone(int rebalanceAsyncId)
Helper method to pretty print progress and timing info. |
protected void |
taskLog(java.lang.String message)
Helper method to log updates in uniform manner that includes batch & task
ID. |
protected void |
taskStart(int rebalanceAsyncId)
Helper method to pretty print progress and timing info. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
run |
batchId
protected final int batchId
taskId
protected final int taskId
stealInfos
protected final java.util.List<RebalanceTaskInfo> stealInfos
donorPermit
protected final java.util.concurrent.Semaphore donorPermit
adminClient
protected final AdminClient adminClient
progressBar
protected final RebalanceBatchPlanProgressBar progressBar
loggerToUse
protected final org.apache.log4j.Logger loggerToUse
exception
protected java.lang.Exception exception
isComplete
protected final java.util.concurrent.atomic.AtomicBoolean isComplete
partitionStoreCount
protected final int partitionStoreCount
permitAcquisitionTimeMs
protected long permitAcquisitionTimeMs
taskCompletionTimeMs
protected long taskCompletionTimeMs
INVALID_REBALANCE_ID
protected static final int INVALID_REBALANCE_ID
- See Also:
- Constant Field Values
RebalanceTask
public RebalanceTask(int batchId,
int taskId,
java.util.List<RebalanceTaskInfo> stealInfos,
java.util.concurrent.Semaphore donorPermit,
AdminClient adminClient,
RebalanceBatchPlanProgressBar progressBar,
org.apache.log4j.Logger logger)
getStealInfos
public java.util.List<RebalanceTaskInfo> getStealInfos()
isComplete
public boolean isComplete()
hasException
public boolean hasException()
getError
public java.lang.Exception getError()
acquirePermit
protected void acquirePermit(int nodeId)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
taskLog
protected void taskLog(java.lang.String message)
- Helper method to log updates in uniform manner that includes batch & task
ID.
- Parameters:
message
-
permitStart
protected void permitStart(int nodeId)
- Helper method to pretty print progress and timing info.
- Parameters:
nodeId
- node ID for which donor permit is required
permitAcquired
protected void permitAcquired(int nodeId)
- Helper method to pretty print progress and timing info.
- Parameters:
nodeId
- node ID for which donor permit is required
taskStart
protected void taskStart(int rebalanceAsyncId)
- Helper method to pretty print progress and timing info.
- Parameters:
rebalanceAsyncId
- ID of the async rebalancing task
taskDone
protected void taskDone(int rebalanceAsyncId)
- Helper method to pretty print progress and timing info.
- Parameters:
rebalanceAsyncId
- ID of the async rebalancing task
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu