org.apache.hadoop.hbase.master
Class BulkAssigner
java.lang.Object
org.apache.hadoop.hbase.master.BulkAssigner
public abstract class BulkAssigner
- extends java.lang.Object
Base class used bulk assigning and unassigning regions.
Encapsulates a fixed size thread pool of executors to run assignment/unassignment.
Implement populatePool(java.util.concurrent.ExecutorService) and
waitUntilDone(long).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BulkAssigner
public BulkAssigner(Server server)
- Parameters:
server - An instance of Server
getThreadNamePrefix
protected java.lang.String getThreadNamePrefix()
getUncaughtExceptionHandler
protected java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
getThreadCount
protected int getThreadCount()
getTimeoutOnRIT
protected long getTimeoutOnRIT()
populatePool
protected abstract void populatePool(java.util.concurrent.ExecutorService pool)
bulkAssign
public boolean bulkAssign()
throws java.lang.InterruptedException
- Run the bulk assign.
- Returns:
- True if done.
- Throws:
java.lang.InterruptedException
waitUntilDone
protected abstract boolean waitUntilDone(long timeout)
throws java.lang.InterruptedException
- Wait until bulk assign is done.
- Parameters:
timeout - How long to wait.
- Returns:
- True if the condition we were waiting on happened.
- Throws:
java.lang.InterruptedException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.