org.apache.hadoop.hbase.ipc
Interface HMasterInterface

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

public interface HMasterInterface
extends org.apache.hadoop.ipc.VersionedProtocol

Clients interact with the HMasterInterface to gain access to meta-level HBase functionality, like finding an HRegionServer and creating/destroying tables.


Field Summary
static long versionID
          Interface version.
 
Method Summary
 void addColumn(byte[] tableName, HColumnDescriptor column)
          Adds a column to the specified table
 void createTable(HTableDescriptor desc)
          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)
 HServerAddress findRootRegion()
          Get the location of the root region
 boolean isMasterRunning()
           
 void modifyColumn(byte[] tableName, byte[] columnName, HColumnDescriptor descriptor)
          Modifies an existing column on the specified table
 void modifyTableMeta(byte[] tableName, HTableDescriptor desc)
          Modify a table's metadata
 void shutdown()
          Shutdown an HBase cluster.
 
Methods inherited from interface org.apache.hadoop.ipc.VersionedProtocol
getProtocolVersion
 

Field Detail

versionID

static final long versionID
Interface version. Version was incremented to 2 when we brought the hadoop RPC local to hbase -- HADOOP-2495 and then to 3 when we changed the RPC to send codes instead of actual class names (HADOOP-2519).

Version 4 when we moved to all byte arrays (HBASE-42).

See Also:
Constant Field Values
Method Detail

isMasterRunning

boolean isMasterRunning()
Returns:
true if master is available

createTable

void createTable(HTableDescriptor desc)
                 throws IOException
Creates a new table

Parameters:
desc - table descriptor
Throws:
IOException

deleteTable

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

Parameters:
tableName -
Throws:
IOException

addColumn

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

Parameters:
tableName -
column - column descriptor
Throws:
IOException

modifyColumn

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

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

deleteColumn

void deleteColumn(byte[] tableName,
                  byte[] columnName)
                  throws IOException
Deletes a column from the specified table

Parameters:
tableName -
columnName -
Throws:
IOException

enableTable

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

Parameters:
tableName -
Throws:
IOException

disableTable

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

Parameters:
tableName -
Throws:
IOException

modifyTableMeta

void modifyTableMeta(byte[] tableName,
                     HTableDescriptor desc)
                     throws IOException
Modify a table's metadata

Parameters:
tableName -
desc -
Throws:
IOException

shutdown

void shutdown()
              throws IOException
Shutdown an HBase cluster.

Throws:
IOException

findRootRegion

HServerAddress findRootRegion()
Get the location of the root region

Returns:
address of server that serves the root region


Copyright © 2008 The Apache Software Foundation