org.apache.hadoop.hbase.master
Class BulkReOpen

java.lang.Object
  extended by org.apache.hadoop.hbase.master.BulkAssigner
      extended by org.apache.hadoop.hbase.master.BulkReOpen

public class BulkReOpen
extends BulkAssigner

Performs bulk reopen of the list of regions provided to it.


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.master.BulkAssigner
server
 
Constructor Summary
BulkReOpen(Server server, Map<ServerName,List<HRegionInfo>> serverToRegions, AssignmentManager am)
           
 
Method Summary
 boolean bulkReOpen()
           
protected  int getThreadCount()
          Configuration knobs "hbase.bulk.reopen.threadpool.size" number of regions that can be reopened concurrently.
protected  void populatePool(ExecutorService pool)
          Unassign all regions, so that they go through the regular region assignment flow (in assignment manager) and are re-opened.
protected  boolean waitUntilDone(long timeout)
          Reopen the regions asynchronously, so always returns true immediately.
 
Methods inherited from class org.apache.hadoop.hbase.master.BulkAssigner
bulkAssign, bulkAssign, getThreadNamePrefix, getTimeoutOnRIT, getUncaughtExceptionHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulkReOpen

public BulkReOpen(Server server,
                  Map<ServerName,List<HRegionInfo>> serverToRegions,
                  AssignmentManager am)
Method Detail

populatePool

protected void populatePool(ExecutorService pool)
Unassign all regions, so that they go through the regular region assignment flow (in assignment manager) and are re-opened.

Specified by:
populatePool in class BulkAssigner

waitUntilDone

protected boolean waitUntilDone(long timeout)
Reopen the regions asynchronously, so always returns true immediately.

Specified by:
waitUntilDone in class BulkAssigner
Parameters:
timeout - How long to wait.
Returns:
true

getThreadCount

protected int getThreadCount()
Configuration knobs "hbase.bulk.reopen.threadpool.size" number of regions that can be reopened concurrently. The maximum number of threads the master creates is never more than the number of region servers. If configuration is not defined it defaults to 20

Overrides:
getThreadCount in class BulkAssigner

bulkReOpen

public boolean bulkReOpen()
                   throws InterruptedException,
                          IOException
Throws:
InterruptedException
IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.