|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.apache.hadoop.hbase.HMaster
public class HMaster
HMaster is the "master server" for a HBase. There is only one HMaster for a single HBase deployment.
Nested Class Summary | |
---|---|
static class |
HMaster.MetaRegion
|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static String |
MASTER
|
protected Sleeper |
sleeper
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Fields inherited from interface org.apache.hadoop.hbase.HMasterInterface |
---|
versionID |
Fields inherited from interface org.apache.hadoop.hbase.HMasterRegionInterface |
---|
versionID |
Constructor Summary | |
---|---|
HMaster(Configuration conf)
Build the HMaster out of a raw configuration item. |
|
HMaster(Path dir,
HServerAddress address,
Configuration conf)
Build the HMaster |
Method Summary | |
---|---|
void |
addColumn(Text tableName,
HColumnDescriptor column)
Adds a column to the specified table |
protected boolean |
checkFileSystem()
Checks to see if the file system is still accessible. |
protected MapWritable |
createConfigurationSubset()
|
void |
createTable(HTableDescriptor desc)
Creates a new table |
void |
deleteColumn(Text tableName,
Text columnName)
Deletes a column from the specified table |
void |
deleteTable(Text tableName)
Deletes a table |
void |
disableTable(Text tableName)
Take table offline |
protected static void |
doMain(String[] args,
Class<? extends HMaster> masterClass)
|
void |
enableTable(Text tableName)
Puts the table on-line (only needed if table has been previously taken offline) |
HServerAddress |
findRootRegion()
Get the location of the root region |
HServerAddress |
getMasterAddress()
|
Map<Text,HMaster.MetaRegion> |
getOnlineMetaRegions()
|
long |
getProtocolVersion(String protocol,
long clientVersion)
Return protocol version corresponding to protocol interface. |
Path |
getRootDir()
|
HServerAddress |
getRootRegionLocation()
|
Map<String,HServerLoad> |
getServersToLoad()
|
Map<String,HServerInfo> |
getServersToServerInfo()
|
boolean |
isMasterRunning()
|
static void |
main(String[] args)
Main program |
HMsg[] |
regionServerReport(HServerInfo serverInfo,
HMsg[] msgs)
Called to renew lease, tell master what the region server is doing and to receive new instructions from the master |
MapWritable |
regionServerStartup(HServerInfo serverInfo)
Called when a region server first starts |
void |
run()
Main processing loop |
void |
shutdown()
Shutdown an HBase cluster. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Sleeper sleeper
public static final String MASTER
Constructor Detail |
---|
public HMaster(Configuration conf) throws IOException
conf
- - Configuration object
IOException
public HMaster(Path dir, HServerAddress address, Configuration conf) throws IOException
dir
- base directoryaddress
- server address and port numberconf
- configuration
IOException
Method Detail |
---|
public long getProtocolVersion(String protocol, long clientVersion) throws IOException
getProtocolVersion
in interface VersionedProtocol
protocol
- The classname of the protocol interfaceclientVersion
- The version of the protocol that the client speaks
IOException
protected boolean checkFileSystem()
public HServerAddress getMasterAddress()
public Path getRootDir()
public Map<String,HServerInfo> getServersToServerInfo()
public Map<String,HServerLoad> getServersToLoad()
public HServerAddress getRootRegionLocation()
-ROOT-
region.public Map<Text,HMaster.MetaRegion> getOnlineMetaRegions()
public void run()
run
in interface Runnable
run
in class Thread
public MapWritable regionServerStartup(HServerInfo serverInfo) throws IOException
regionServerStartup
in interface HMasterRegionInterface
IOException
protected MapWritable createConfigurationSubset()
public HMsg[] regionServerReport(HServerInfo serverInfo, HMsg[] msgs) throws IOException
regionServerReport
in interface HMasterRegionInterface
serverInfo
- server's address and start codemsgs
- things the region server wants to tell the master
IOException
public boolean isMasterRunning()
isMasterRunning
in interface HMasterInterface
public void shutdown()
shutdown
in interface HMasterInterface
public void createTable(HTableDescriptor desc) throws IOException
createTable
in interface HMasterInterface
desc
- table descriptor
IOException
public void deleteTable(Text tableName) throws IOException
deleteTable
in interface HMasterInterface
IOException
public void addColumn(Text tableName, HColumnDescriptor column) throws IOException
addColumn
in interface HMasterInterface
column
- column descriptor
IOException
public void deleteColumn(Text tableName, Text columnName) throws IOException
deleteColumn
in interface HMasterInterface
IOException
public void enableTable(Text tableName) throws IOException
enableTable
in interface HMasterInterface
IOException
public void disableTable(Text tableName) throws IOException
disableTable
in interface HMasterInterface
IOException
public HServerAddress findRootRegion()
findRootRegion
in interface HMasterInterface
protected static void doMain(String[] args, Class<? extends HMaster> masterClass)
public static void main(String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |