|
||||||||||
| 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 java.io.IOException
desc - table descriptorsplitKeys -
java.io.IOException
void deleteTable(byte[] tableName)
throws java.io.IOException
tableName - table to delete
java.io.IOException - e
void addColumn(byte[] tableName,
HColumnDescriptor column)
throws java.io.IOException
tableName - table to modifycolumn - column descriptor
java.io.IOException - e
void modifyColumn(byte[] tableName,
HColumnDescriptor descriptor)
throws java.io.IOException
tableName - table namedescriptor - new column descriptor
java.io.IOException - e
void deleteColumn(byte[] tableName,
byte[] columnName)
throws java.io.IOException
tableName - table to altercolumnName - column family to remove
java.io.IOException - e
void enableTable(byte[] tableName)
throws java.io.IOException
tableName - table to enable
java.io.IOException - e
void disableTable(byte[] tableName)
throws java.io.IOException
tableName - table to take offline
java.io.IOException - e
void modifyTable(byte[] tableName,
HTableDescriptor htd)
throws java.io.IOException
tableName - table to modifyhtd - new descriptor for table
java.io.IOException - e
void shutdown()
throws java.io.IOException
java.io.IOException - e
void stopMaster()
throws java.io.IOException
java.io.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 java.io.IOException
regionName - Region to assign. Will use existing RegionPlan if one
found.force - If true, will force the assignment.
java.io.IOException
void unassign(byte[] regionName,
boolean force)
throws java.io.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).
java.io.IOExceptionboolean 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 | |||||||||