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

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

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

org::apache::hadoop::hbase::HConstants org::apache::hadoop::hbase::ipc::HMasterInterface org::apache::hadoop::hbase::ipc::HMasterRegionInterface org::apache::hadoop::hbase::ipc::HBaseRPCProtocolVersion org::apache::hadoop::hbase::ipc::HBaseRPCProtocolVersion org::apache::hadoop::hbase::master::OOMEHMaster

List of all members.


Detailed Description

HMaster is the "master server" for a HBase. There is only one HMaster for a single HBase deployment.

NOTE: This class extends Thread rather than Chore because the sleep time can be interrupted when there is something to do, rather than the Chore sleep time which is invariant.

Definition at line 103 of file HMaster.java.


Public Types

enum  Modify {
  CLOSE_REGION, TABLE_COMPACT, TABLE_FLUSH, TABLE_MAJOR_COMPACT,
  TABLE_SET_HTD, TABLE_SPLIT
}

Public Member Functions

void addColumn (final byte[] tableName, HColumnDescriptor column) throws IOException
void addColumn (byte[] tableName, HColumnDescriptor column) throws IOException
int countRegionsOnFS ()
void createTable (HTableDescriptor desc) throws IOException
void deleteColumn (final byte[] tableName, final byte[] c) throws IOException
void deleteTable (final byte[] tableName) throws IOException
void disableTable (final byte[] tableName) throws IOException
void enableTable (final byte[] tableName) throws IOException
double getAverageLoad ()
ClusterStatus getClusterStatus ()
HBaseConfiguration getConfiguration ()
InfoServer getInfoServer ()
HServerAddress getMasterAddress ()
MasterMetrics getMetrics ()
Map< byte[], MetaRegiongetOnlineMetaRegions ()
long getProtocolVersion (String protocol, long clientVersion)
Path getRootDir ()
HServerAddress getRootRegionLocation ()
Map< HServerAddress, HServerInfogetServerAddressToServerInfo ()
ServerManager getServerManager ()
Map< String, HServerLoadgetServersToLoad ()
Map< String, HServerInfogetServersToServerInfo ()
ZooKeeperWrapper getZooKeeperWrapper ()
 HMaster (HBaseConfiguration conf) throws IOException
boolean isMasterRunning ()
void modifyColumn (final byte[] tableName, final byte[] columnName, HColumnDescriptor descriptor) throws IOException
void modifyColumn (byte[] tableName, byte[] columnName, HColumnDescriptor descriptor) throws IOException
void modifyTable (byte[] tableName, HConstants.Modify op, Writable[] args) throws IOException
void modifyTable (final byte[] tableName, HConstants.Modify op, Writable[] args) throws IOException
void process (WatchedEvent event)
HMsg[] regionServerReport (HServerInfo info, HMsg msgs[], HRegionInfo mostLoadedRegions[]) throws IOException
HMsg[] regionServerReport (HServerInfo serverInfo, HMsg msgs[], HRegionInfo[] mostLoadedRegions) throws IOException
MapWritable regionServerStartup (HServerInfo info) throws IOException
MapWritable regionServerStartup (final HServerInfo serverInfo) throws IOException
void run ()
void shutdown ()
void waitForRootRegionLocation ()

Static Public Member Functions

static void main (String[] args)

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 long DEFAULT_HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE = Long.MAX_VALUE
static final String DEFAULT_HOST = "0.0.0.0"
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 final String HBASE_CLIENT_RETRIES_NUMBER_KEY
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 = "master"
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 long versionID = 21L
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"

Protected Member Functions

boolean checkFileSystem ()
MapWritable createConfigurationSubset ()
void deleteEmptyMetaRows (HRegionInterface s, byte[] metaRegionName, List< byte[]> emptyRows)
Result getFromMETA (final byte[] row, final byte[] family) throws IOException

Static Protected Member Functions

static void doMain (String[] args, Class<?extends HMaster > masterClass)

Package Functions

HRegionInfo getHRegionInfo (final byte[] row, final Result res) throws IOException
void startShutdown ()

Package Attributes

volatile AtomicBoolean closed = new AtomicBoolean(true)
final ServerConnection connection
volatile DelayQueue
< RegionServerOperation > 
delayedToDoQueue
final FileSystem fs
volatile boolean fsOk = true
InfoServer infoServer
final int leaseTimeout
final long maxRegionOpenTime
final int metaRescanInterval
final int numRetries
final Random rand
RegionManager regionManager
final Path rootdir
ServerManager serverManager
volatile AtomicBoolean shutdownRequested = new AtomicBoolean(false)
final int threadWakeFrequency
volatile BlockingQueue
< RegionServerOperation > 
toDoQueue

Static Package Attributes

static final Log LOG = LogFactory.getLog(HMaster.class.getName())
static final Long ZERO_L = Long.valueOf(0L)

Private Member Functions

MapWritable addConfig (final MapWritable mw, final String key)
void bootstrap () throws IOException
synchronized void createTable (final HRegionInfo newRegion) throws IOException
HRegionInterface getMETAServer (final MetaRegion meta) throws IOException
Pair< HRegionInfo, HServerAddressgetTableRegionClosest (final byte[] tableName, final byte[] rowKey) throws IOException
Pair< HRegionInfo, HServerAddressgetTableRegionFromName (final byte[] regionName) throws IOException
List< Pair< HRegionInfo,
HServerAddress > > 
getTableRegions (final byte[] tableName) throws IOException
boolean processToDoQueue ()
void setInfoFamilyCaching (final HRegionInfo hri, final boolean b)
void splitLogAfterStartup () throws IOException
void startServiceThreads ()
void verifyClusterState ()
boolean writeAddressToZooKeeper (boolean retry)

Static Private Member Functions

static void printUsageAndExit ()

Private Attributes

final HServerAddress address
final HBaseConfiguration conf
MasterMetrics metrics
final HBaseServer server
final Sleeper sleeper
final ZKMasterAddressWatcher zkMasterAddressWatcher
ZooKeeperWrapper zooKeeperWrapper

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

Generated by  Doxygen 1.6.0   Back to index