|
||||||||||
| 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 | |
|---|---|
static long |
VERSION
This Interfaces' version. |
| Method Summary | |
|---|---|
void |
addColumn(byte[] tableName,
HColumnDescriptor column)
Adds a column to the specified table |
void |
assign(byte[] regionName)
Assign a region to a server chosen at random. |
void |
assign(byte[] regionName,
boolean force)
Deprecated. The force is unused.Use assign(byte[]) |
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 asynchronously. |
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) |
Pair<Integer,Integer> |
getAlterStatus(byte[] tableName)
Used by the client to get the number of regions that have received the updated schema |
ClusterStatus |
getClusterStatus()
Return cluster status. |
HTableDescriptor[] |
getHTableDescriptors()
Get array of all HTDs. |
HTableDescriptor[] |
getHTableDescriptors(List<String> tableNames)
Get array of HTDs for requested tables. |
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.hbase.ipc.VersionedProtocol |
|---|
getProtocolSignature, getProtocolVersion |
| Field Detail |
|---|
static final long VERSION
| 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 - e
Pair<Integer,Integer> getAlterStatus(byte[] tableName)
throws IOException
tableName -
IOException
void addColumn(byte[] tableName,
HColumnDescriptor column)
throws IOException
tableName - table to modifycolumn - column descriptor
IOException - e
void modifyColumn(byte[] tableName,
HColumnDescriptor descriptor)
throws IOException
tableName - table namedescriptor - new column descriptor
IOException - e
void deleteColumn(byte[] tableName,
byte[] columnName)
throws IOException
tableName - table to altercolumnName - column family to remove
IOException - e
void enableTable(byte[] tableName)
throws IOException
tableName - table to enable
IOException - e
void disableTable(byte[] tableName)
throws IOException
tableName - table to take offline
IOException - e
void modifyTable(byte[] tableName,
HTableDescriptor htd)
throws IOException
tableName - table to modifyhtd - new descriptor for table
IOException - e
void shutdown()
throws IOException
IOException - e
void 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
force is unused.Use assign(byte[])
regionName - Region to assign. Will use existing RegionPlan if one
found.force - If true, will force the assignment.
IOException
void assign(byte[] regionName)
throws IOException
regionName - Region to assign. Will use existing RegionPlan if one found.
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 as well as from assigned regions --
radical!.If results in double assignment use hbck -fix to resolve.
IOExceptionboolean balance()
boolean balanceSwitch(boolean b)
b - If true, enable balancer. If false, disable balancer.
HTableDescriptor[] getHTableDescriptors()
HTableDescriptor[] getHTableDescriptors(List<String> tableNames)
tableNames -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||