Logo Search packages:      
Sourcecode: hbase version File versions  Download package

org::apache::hadoop::hbase::master::RegionManager Class Reference

Inheritance diagram for org::apache::hadoop::hbase::master::RegionManager:


List of all members.

Detailed Description

Class to manage assigning regions to servers, state of root and meta, etc.

Definition at line 63 of file RegionManager.java.

Public Types

enum  Modify {

Public Member Functions

void addMetaRegionToScan (MetaRegion m)
void applyActions (HServerInfo serverInfo, ArrayList< HMsg > returnMsgs)
boolean areAllMetaRegionsOnline ()
int countRegionsOnFS () throws IOException
void createRegion (HRegionInfo newRegion, HRegionInterface server, byte[] metaRegionName) throws IOException
void endAction (byte[] regionName, HConstants.Modify op)
void endActions (byte[] regionName)
MetaRegion getFirstMetaRegionForRegion (HRegionInfo newRegion)
List< MetaRegiongetListOfOnlineMetaRegions ()
Set< HRegionInfogetMarkedToClose (String serverName)
MetaRegion getMetaRegionForRow (final byte[] row) throws NotAllMetaRegionsOnlineException
Set< MetaRegiongetMetaRegionsForTable (byte[] tableName) throws NotAllMetaRegionsOnlineException
HRegionInfo getMetaServerRegionInfo (final String server)
Map< byte[], MetaRegiongetOnlineMetaRegions ()
HServerAddress getRootRegionLocation ()
void incrementNumMetaRegions ()
boolean inSafeMode ()
boolean isInitialMetaScanComplete ()
boolean isInitialRootScanComplete ()
boolean isMetaRegionOnline (byte[] startKey)
boolean isMetaServer (HServerAddress server)
boolean isOfflined (String regionName)
boolean isPendingOpen (String regionName)
boolean isRootServer (HServerAddress server)
boolean isRootServerCandidate (final String server)
boolean isUnassigned (HRegionInfo info)
List< byte[]> listMetaRegionsForServer (HServerAddress server)
boolean metaRegionsInTransition ()
int numMetaRegions ()
int numOnlineMetaRegions ()
MetaRegion offlineMetaRegion (byte[] startKey)
synchronized boolean offlineMetaServer (HServerAddress server)
void putMetaRegionOnline (MetaRegion metaRegion)
boolean regionIsInTransition (String regionName)
boolean regionIsOpening (String regionName)
void removeRegion (HRegionInfo info)
void setClosed (String regionName)
void setClosing (String serverName, final HRegionInfo regionInfo, final boolean setOffline)
void setNumMetaRegions (int num)
void setOpen (String regionName)
void setPendingClose (String regionName)
void setRootRegionLocation (HServerAddress address)
void setUnassigned (HRegionInfo info, boolean force)
void startAction (byte[] regionName, HRegionInfo info, HServerAddress server, HConstants.Modify op)
void stop ()
void stopScanners ()
void waitForRootRegionLocation ()

Static Public Attributes

static final int ALL_VERSIONS = Integer.MAX_VALUE
static final byte[] CATALOG_FAMILY = Bytes.toBytes(CATALOG_FAMILY_STR)
static final String CATALOG_FAMILY_STR = "info"
static final byte[] CATALOG_HISTORIAN_FAMILY = Bytes.toBytes("historian")
static final String CLUSTER_DISTRIBUTED = "hbase.cluster.distributed"
static final String CLUSTER_IS_DISTRIBUTED = "true"
static final String CLUSTER_IS_LOCAL = "false"
static final String DEFAULT_HOST = ""
static final int DEFAULT_MASTER_INFOPORT = 60010
static final int DEFAULT_MASTER_PORT = 60000
static final long DEFAULT_MAX_FILE_SIZE = 256 * 1024 * 1024
static final String DEFAULT_REGION_SERVER_CLASS = HRegionInterface.class.getName()
static final int DEFAULT_REGIONSERVER_INFOPORT = 60030
static final int DEFAULT_REGIONSERVER_PORT = 60020
static final int DEFAULT_SIZE_RESERVATION_BLOCK = 1024 * 1024 * 5
static final int DEFAULT_ZOOKEEPER_PAUSE = 2 * 1000
static final int DEFAULT_ZOOKEEPER_RETRIES = 5
static final byte[] EMPTY_BYTE_ARRAY = new byte [0]
static final byte[] EMPTY_END_ROW = EMPTY_START_ROW
static final byte[] EMPTY_START_ROW = EMPTY_BYTE_ARRAY
static final String FILE_SYSTEM_VERSION = "7"
static final int FOREVER = Integer.MAX_VALUE
static String HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE_KEY = "hbase.client.scanner.max.result.size"
static final String HBASE_DIR = "hbase.rootdir"
static final String HREGION_COMPACTIONDIR_NAME = "compaction.dir"
static final String HREGION_LOGDIR_NAME = ".logs"
static final String HREGION_OLDLOGFILE_NAME = "oldlogfile.log"
static final String IN_MEMORY = "IN_MEMORY"
static final byte[] LAST_ROW = EMPTY_BYTE_ARRAY
static final long LATEST_TIMESTAMP = Long.MAX_VALUE
static final byte[] LATEST_TIMESTAMP_BYTES = Bytes.toBytes(LATEST_TIMESTAMP)
static final String MAJOR_COMPACTION_PERIOD = "hbase.hregion.majorcompaction"
static final String MASTER_PORT = "hbase.master.port"
static final int MAX_ROW_LENGTH = Short.MAX_VALUE
static final int MAXIMUM_VALUE_LENGTH = Integer.MAX_VALUE
static final int META_ROW_DELIMITER = ','
static final byte[] META_TABLE_NAME = Bytes.toBytes(".META.")
static final String NAME = "NAME"
static final String NINES = "99999999999999"
static final String REGION_IMPL = "hbase.hregion.impl"
static final String REGION_SERVER_CLASS = "hbase.regionserver.class"
static final String REGION_SERVER_IMPL = "hbase.regionserver.impl"
static final byte[] REGIONINFO_QUALIFIER = Bytes.toBytes("regioninfo")
static final String REGIONSERVER_PORT = "hbase.regionserver.port"
static int RETRY_BACKOFF [] = { 1, 1, 1, 2, 2, 4, 4, 8, 16, 32 }
static final byte[] ROOT_TABLE_NAME = Bytes.toBytes("-ROOT-")
static final byte[] SERVER_QUALIFIER = Bytes.toBytes("server")
static final byte[] SPLITA_QUALIFIER = Bytes.toBytes("splitA")
static final byte[] SPLITB_QUALIFIER = Bytes.toBytes("splitB")
static final byte[] STARTCODE_QUALIFIER = Bytes.toBytes("serverstartcode")
static final String THREAD_WAKE_FREQUENCY = "hbase.server.thread.wakefrequency"
static final String UTF8_ENCODING = "UTF-8"
static final String VERSION_FILE_NAME = "hbase.version"
static final String VERSIONS = "VERSIONS"
static final int WEEK_IN_SECONDS = 7 * 24 * 3600
static final String ZEROES = "00000000000000"
static final String ZOOKEEPER_CONFIG_NAME = "zoo.cfg"
static final String ZOOKEEPER_PAUSE = "zookeeper.pause"
static final String ZOOKEEPER_QUORUM = "hbase.zookeeper.quorum"
static final String ZOOKEEPER_RETRIES = "zookeeper.retries"

Static Protected Attributes

static final Log LOG = LogFactory.getLog(RegionManager.class)

Package Functions

void assignRegions (HServerInfo info, HRegionInfo[] mostLoadedRegions, ArrayList< HMsg > returnMsgs)
boolean clearFromInTransition (final byte[] regionname)
NavigableMap< String, String > getRegionsInTransition ()
void reassignRootRegion ()
 RegionManager (HMaster master)
void start ()
void unassignSomeRegions (final HServerInfo info, int numRegionsToClose, final HRegionInfo[] mostLoadedRegions, ArrayList< HMsg > returnMsgs)
void unsetRootRegion ()

Package Attributes

final HMaster master
final MetaScanner metaScannerThread
final SortedMap< String,
RegionState > 
final Lock splitLogLock = new ReentrantLock()

Static Package Attributes

static final Long ZERO_L = Long.valueOf(0L)

Private Member Functions

void applyActions (final HServerInfo serverInfo, final ArrayList< HMsg > returnMsgs, final SortedMap< byte[], Pair< HRegionInfo, HServerAddress >> map, final HMsg.Type msg)
void assignRegions (final Set< RegionState > regionsToAssign, final int nregions, final HServerInfo info, final ArrayList< HMsg > returnMsgs)
void assignRegionsToMultipleServers (final HServerLoad thisServersLoad, final Set< RegionState > regionsToAssign, final HServerInfo info, final ArrayList< HMsg > returnMsgs)
void assignRegionsToOneServer (final Set< RegionState > regionsToAssign, final HServerInfo info, final ArrayList< HMsg > returnMsgs)
int computeNextHeaviestLoad (HServerLoad referenceLoad, HServerLoad heavierLoad)
void doRegionAssignment (final RegionState rs, final HServerInfo sinfo, final ArrayList< HMsg > returnMsgs)
long getPauseTime (int tries)
Set< RegionState > regionsAwaitingAssignment (HServerAddress addr, boolean isSingleServer)
int regionsPerServer (final int numUnassignedRegions, final HServerLoad thisServersLoad)
void sleep (int attempt)
void startAction (final byte[] regionName, final HRegionInfo info, final HServerAddress server, final SortedMap< byte[], Pair< HRegionInfo, HServerAddress >> map)
boolean tellZooKeeperOutOfSafeMode ()
void writeRootRegionLocationToZooKeeper (HServerAddress address)

Private Attributes

final LoadBalancer loadBalancer
final int maxAssignInOneGo
final AtomicInteger numberOfMetaRegions = new AtomicInteger()
final NavigableMap< byte[],
final SortedMap< byte[], Pair
< HRegionInfo, HServerAddress > > 
final SortedMap< byte[], Pair
< HRegionInfo, HServerAddress > > 
final SortedMap< byte[], Pair
< HRegionInfo, HServerAddress > > 
final SortedMap< byte[], Pair
< HRegionInfo, HServerAddress > > 
AtomicReference< HServerAddressrootRegionLocation
final RootScanner rootScannerThread
volatile boolean safeMode = true
final int zooKeeperNumRetries
final int zooKeeperPause

Static Private Attributes

static final byte[] META_REGION_PREFIX = Bytes.toBytes(".META.,")
static final byte[] OVERLOADED = Bytes.toBytes("Overloaded")


class  LoadBalancer
class  RegionDirFilter
class  RegionState
class  TableDirFilter

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index