org.apache.hadoop.hbase.master
Class BulkAssigner
java.lang.Object
org.apache.hadoop.hbase.master.BulkAssigner
public abstract class BulkAssigner
- extends 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 String getThreadNamePrefix()
getUncaughtExceptionHandler
protected Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
getThreadCount
protected int getThreadCount()
getTimeoutOnRIT
protected long getTimeoutOnRIT()
populatePool
protected abstract void populatePool(ExecutorService pool)
bulkAssign
public boolean bulkAssign()
throws InterruptedException
- Run the bulk assign.
- Returns:
- True if done.
- Throws:
InterruptedException
waitUntilDone
protected abstract boolean waitUntilDone(long timeout)
throws InterruptedException
- Wait until bulk assign is done.
- Parameters:
timeout
- How long to wait.
- Returns:
- True if the condition we were waiting on happened.
- Throws:
InterruptedException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.