org.apache.hadoop.hbase.ipc
Interface HMasterInterface

All Superinterfaces:
HBaseRPCProtocolVersion, org.apache.hadoop.ipc.VersionedProtocol
All Known Implementing Classes:
HMaster

public interface HMasterInterface
extends HBaseRPCProtocolVersion

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 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, byte[] columnName, HColumnDescriptor descriptor)
          Modifies an existing column on the specified table
 void modifyTable(byte[] tableName, HConstants.Modify op, org.apache.hadoop.io.Writable[] args)
          Modify a table's metadata
 void shutdown()
          Shutdown an HBase cluster.
 
Methods inherited from interface org.apache.hadoop.ipc.VersionedProtocol
getProtocolVersion
 

Method Detail

isMasterRunning

boolean isMasterRunning()
Returns:
true if master is available

createTable

void createTable(HTableDescriptor desc,
                 byte[][] splitKeys)
                 throws IOException
Creates a new table. If splitKeys are specified, then the table will be created with an initial set of multiple regions. If splitKeys is null, the table will be created with a single region.

Parameters:
desc - table descriptor
splitKeys -
Throws:
IOException

deleteTable

void deleteTable(byte[] tableName)
                 throws IOException
Deletes a table

Parameters:
tableName - table to delete
Throws:
IOException - e

addColumn

void addColumn(byte[] tableName,
               HColumnDescriptor column)
               throws IOException
Adds a column to the specified table

Parameters:
tableName - table to modify
column - column descriptor
Throws:
IOException - e

modifyColumn

void modifyColumn(byte[] tableName,
                  byte[] columnName,
                  HColumnDescriptor descriptor)
                  throws IOException
Modifies an existing column on the specified table

Parameters:
tableName - table name
columnName - name of the column to edit
descriptor - new column descriptor
Throws:
IOException - e

deleteColumn

void deleteColumn(byte[] tableName,
                  byte[] columnName)
                  throws IOException
Deletes a column from the specified table. Table must be disabled.

Parameters:
tableName - table to alter
columnName - column family to remove
Throws:
IOException - e

enableTable

void enableTable(byte[] tableName)
                 throws IOException
Puts the table on-line (only needed if table has been previously taken offline)

Parameters:
tableName - table to enable
Throws:
IOException - e

disableTable

void disableTable(byte[] tableName)
                  throws IOException
Take table offline

Parameters:
tableName - table to take offline
Throws:
IOException - e

modifyTable

void modifyTable(byte[] tableName,
                 HConstants.Modify op,
                 org.apache.hadoop.io.Writable[] args)
                 throws IOException
Modify a table's metadata

Parameters:
tableName - table to modify
op - the operation to do
args - arguments for operation
Throws:
IOException - e

shutdown

void shutdown()
              throws IOException
Shutdown an HBase cluster.

Throws:
IOException - e

getClusterStatus

ClusterStatus getClusterStatus()
Return cluster status.

Returns:
status object


Copyright © 2010 Apache Software Foundation. All Rights Reserved.