|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HMasterInterface
Clients interact with the HMasterInterface to gain access to meta-level HBase functionality, like finding an HRegionServer and creating/destroying tables.
NOTE: if you change the interface, you must change the RPC version number in HBaseRPCProtocolVersion
Field Summary |
---|
Fields inherited from interface org.apache.hadoop.hbase.ipc.HBaseRPCProtocolVersion |
---|
versionID |
Method Summary | |
---|---|
void |
addColumn(byte[] tableName,
HColumnDescriptor column)
Adds a column to the specified table |
void |
assign(byte[] regionName,
boolean force)
Assign a region to a server chosen at random. |
boolean |
balance()
Run the balancer. |
boolean |
balanceSwitch(boolean b)
Turn the load balancer on or off. |
void |
createTable(HTableDescriptor desc,
byte[][] splitKeys)
Creates a new table. |
void |
deleteColumn(byte[] tableName,
byte[] columnName)
Deletes a column from the specified table. |
void |
deleteTable(byte[] tableName)
Deletes a table |
void |
disableTable(byte[] tableName)
Take table offline |
void |
enableTable(byte[] tableName)
Puts the table on-line (only needed if table has been previously taken offline) |
ClusterStatus |
getClusterStatus()
Return cluster status. |
boolean |
isMasterRunning()
|
void |
modifyColumn(byte[] tableName,
HColumnDescriptor descriptor)
Modifies an existing column on the specified table |
void |
modifyTable(byte[] tableName,
HTableDescriptor htd)
Modify a table's metadata |
void |
move(byte[] encodedRegionName,
byte[] destServerName)
Move the region r to dest . |
void |
shutdown()
Shutdown an HBase cluster. |
void |
stopMaster()
Stop HBase Master only. |
void |
unassign(byte[] regionName,
boolean force)
Unassign a region from current hosting regionserver. |
Methods inherited from interface org.apache.hadoop.ipc.VersionedProtocol |
---|
getProtocolVersion |
Method Detail |
---|
boolean isMasterRunning()
void createTable(HTableDescriptor desc, byte[][] splitKeys) throws IOException
desc
- table descriptorsplitKeys
-
IOException
void deleteTable(byte[] tableName) throws IOException
tableName
- table to delete
IOException
- evoid addColumn(byte[] tableName, HColumnDescriptor column) throws IOException
tableName
- table to modifycolumn
- column descriptor
IOException
- evoid modifyColumn(byte[] tableName, HColumnDescriptor descriptor) throws IOException
tableName
- table namedescriptor
- new column descriptor
IOException
- evoid deleteColumn(byte[] tableName, byte[] columnName) throws IOException
tableName
- table to altercolumnName
- column family to remove
IOException
- evoid enableTable(byte[] tableName) throws IOException
tableName
- table to enable
IOException
- evoid disableTable(byte[] tableName) throws IOException
tableName
- table to take offline
IOException
- evoid modifyTable(byte[] tableName, HTableDescriptor htd) throws IOException
tableName
- table to modifyhtd
- new descriptor for table
IOException
- evoid shutdown() throws IOException
IOException
- evoid stopMaster() throws IOException
IOException
- eClusterStatus getClusterStatus()
void move(byte[] encodedRegionName, byte[] destServerName) throws UnknownRegionException
r
to dest
.
encodedRegionName
- The encoded region name; i.e. the hash that makes
up the region name suffix: e.g. if regionname is
TestTable,0094429456,1289497600452.527db22f95c8a9e0116f0cc13c680396.
,
then the encoded region name is: 527db22f95c8a9e0116f0cc13c680396
.destServerName
- The servername of the destination regionserver. If
passed the empty byte array we'll assign to a random server. A server name
is made of host, port and startcode. Here is an example:
host187.example.com,60020,1289493121758
.
UnknownRegionException
- Thrown if we can't find a region named
encodedRegionName
void assign(byte[] regionName, boolean force) throws IOException
regionName
- Region to assign. Will use existing RegionPlan if one
found.force
- If true, will force the assignment.
IOException
void unassign(byte[] regionName, boolean force) throws IOException
move(byte[], byte[])
if you want
to control the region movement.
regionName
- Region to unassign. Will clear any existing RegionPlan
if one found.force
- If true, force unassign (Will remove region from
regions-in-transition too if present).
IOException
boolean balance()
boolean balanceSwitch(boolean b)
b
- If true, enable balancer. If false, disable balancer.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |