org.apache.hadoop.hive.metastore
Class HiveMetaStore.HMSHandler

java.lang.Object
  extended by com.facebook.fb303.FacebookBase
      extended by org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler
All Implemented Interfaces:
com.facebook.fb303.FacebookService.Iface, ThriftHiveMetastore.Iface
Direct Known Subclasses:
HiveServer.HiveServerHandler
Enclosing class:
HiveMetaStore

public static class HiveMetaStore.HMSHandler
extends com.facebook.fb303.FacebookBase
implements ThriftHiveMetastore.Iface


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
HiveMetaStore.HMSHandler(String name)
           
HiveMetaStore.HMSHandler(String name, HiveConf conf)
           
 
Method Summary
 Partition add_partition(Partition part)
           
 int add_partitions(List<Partition> parts)
           
 void alter_partition(String db_name, String tbl_name, Partition new_part)
           
 void alter_table(String dbname, String name, Table newTable)
           
 Partition append_partition(String dbName, String tableName, List<String> part_vals)
           
 boolean create_database(String name, String location_uri)
           
 boolean create_index(Index index_def)
           
 void create_table(Table tbl)
           
 boolean create_type(Type type)
           
 boolean drop_database(String name)
           
 boolean drop_partition(String db_name, String tbl_name, List<String> part_vals, boolean deleteData)
           
 void drop_table(String dbname, String name, boolean deleteData)
           
 boolean drop_type(String name)
           
 Database get_database(String name)
           
 List<String> get_databases()
           
 List<FieldSchema> get_fields(String db, String tableName)
           
 List<String> get_partition_names(String db_name, String tbl_name, short max_parts)
           
 Partition get_partition(String db_name, String tbl_name, List<String> part_vals)
           
 List<Partition> get_partitions(String db_name, String tbl_name, short max_parts)
           
 List<FieldSchema> get_schema(String db, String tableName)
          Return the schema of the table.
 Table get_table(String dbname, String name)
           
 List<String> get_tables(String dbname, String pattern)
           
 Map<String,Type> get_type_all(String name)
           
 Type get_type(String name)
           
static Integer get()
           
 String getCpuProfile(int profileDurationInSec)
           
 int getStatus()
           
 String getVersion()
           
 boolean is_table_exists(String dbname, String name)
           
 boolean set_table_parameters(String dbname, String name, Map<String,String> params)
           
 void shutdown()
           
 
Methods inherited from class com.facebook.fb303.FacebookBase
aliveSince, deleteCounter, getCounter, getCounters, getCpuProfile, getName, getOption, getOptions, getStatusDetails, incrementCounter, reinitialize, resetCounter, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.facebook.fb303.FacebookService.Iface
aliveSince, getCounter, getCounters, getName, getOption, getOptions, getStatusDetails, reinitialize, setOption
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

HiveMetaStore.HMSHandler

public HiveMetaStore.HMSHandler(String name)
                         throws MetaException
Throws:
MetaException

HiveMetaStore.HMSHandler

public HiveMetaStore.HMSHandler(String name,
                                HiveConf conf)
                         throws MetaException
Throws:
MetaException
Method Detail

get

public static Integer get()

getStatus

public int getStatus()
Specified by:
getStatus in interface com.facebook.fb303.FacebookService.Iface
Specified by:
getStatus in class com.facebook.fb303.FacebookBase

shutdown

public void shutdown()
Specified by:
shutdown in interface com.facebook.fb303.FacebookService.Iface
Overrides:
shutdown in class com.facebook.fb303.FacebookBase

create_database

public boolean create_database(String name,
                               String location_uri)
                        throws AlreadyExistsException,
                               MetaException
Specified by:
create_database in interface ThriftHiveMetastore.Iface
Throws:
AlreadyExistsException
MetaException

get_database

public Database get_database(String name)
                      throws NoSuchObjectException,
                             MetaException
Specified by:
get_database in interface ThriftHiveMetastore.Iface
Throws:
NoSuchObjectException
MetaException

drop_database

public boolean drop_database(String name)
                      throws MetaException
Specified by:
drop_database in interface ThriftHiveMetastore.Iface
Throws:
MetaException

get_databases

public List<String> get_databases()
                           throws MetaException
Specified by:
get_databases in interface ThriftHiveMetastore.Iface
Throws:
MetaException

create_type

public boolean create_type(Type type)
                    throws AlreadyExistsException,
                           MetaException,
                           InvalidObjectException
Specified by:
create_type in interface ThriftHiveMetastore.Iface
Throws:
AlreadyExistsException
MetaException
InvalidObjectException

get_type

public Type get_type(String name)
              throws MetaException
Specified by:
get_type in interface ThriftHiveMetastore.Iface
Throws:
MetaException

drop_type

public boolean drop_type(String name)
                  throws MetaException
Specified by:
drop_type in interface ThriftHiveMetastore.Iface
Throws:
MetaException

get_type_all

public Map<String,Type> get_type_all(String name)
                              throws MetaException
Specified by:
get_type_all in interface ThriftHiveMetastore.Iface
Throws:
MetaException

create_table

public void create_table(Table tbl)
                  throws AlreadyExistsException,
                         MetaException,
                         InvalidObjectException
Specified by:
create_table in interface ThriftHiveMetastore.Iface
Throws:
AlreadyExistsException
MetaException
InvalidObjectException

is_table_exists

public boolean is_table_exists(String dbname,
                               String name)
                        throws MetaException
Throws:
MetaException

drop_table

public void drop_table(String dbname,
                       String name,
                       boolean deleteData)
                throws NoSuchObjectException,
                       MetaException
Specified by:
drop_table in interface ThriftHiveMetastore.Iface
Throws:
NoSuchObjectException
MetaException

get_table

public Table get_table(String dbname,
                       String name)
                throws MetaException,
                       NoSuchObjectException
Specified by:
get_table in interface ThriftHiveMetastore.Iface
Throws:
MetaException
NoSuchObjectException

set_table_parameters

public boolean set_table_parameters(String dbname,
                                    String name,
                                    Map<String,String> params)
                             throws NoSuchObjectException,
                                    MetaException
Throws:
NoSuchObjectException
MetaException

append_partition

public Partition append_partition(String dbName,
                                  String tableName,
                                  List<String> part_vals)
                           throws InvalidObjectException,
                                  AlreadyExistsException,
                                  MetaException
Specified by:
append_partition in interface ThriftHiveMetastore.Iface
Throws:
InvalidObjectException
AlreadyExistsException
MetaException

add_partitions

public int add_partitions(List<Partition> parts)
                   throws MetaException,
                          InvalidObjectException,
                          AlreadyExistsException
Throws:
MetaException
InvalidObjectException
AlreadyExistsException

add_partition

public Partition add_partition(Partition part)
                        throws InvalidObjectException,
                               AlreadyExistsException,
                               MetaException
Specified by:
add_partition in interface ThriftHiveMetastore.Iface
Throws:
InvalidObjectException
AlreadyExistsException
MetaException

drop_partition

public boolean drop_partition(String db_name,
                              String tbl_name,
                              List<String> part_vals,
                              boolean deleteData)
                       throws NoSuchObjectException,
                              MetaException,
                              org.apache.thrift.TException
Specified by:
drop_partition in interface ThriftHiveMetastore.Iface
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException

get_partition

public Partition get_partition(String db_name,
                               String tbl_name,
                               List<String> part_vals)
                        throws MetaException
Specified by:
get_partition in interface ThriftHiveMetastore.Iface
Throws:
MetaException

get_partitions

public List<Partition> get_partitions(String db_name,
                                      String tbl_name,
                                      short max_parts)
                               throws NoSuchObjectException,
                                      MetaException
Specified by:
get_partitions in interface ThriftHiveMetastore.Iface
Throws:
NoSuchObjectException
MetaException

get_partition_names

public List<String> get_partition_names(String db_name,
                                        String tbl_name,
                                        short max_parts)
                                 throws MetaException
Specified by:
get_partition_names in interface ThriftHiveMetastore.Iface
Throws:
MetaException

alter_partition

public void alter_partition(String db_name,
                            String tbl_name,
                            Partition new_part)
                     throws InvalidOperationException,
                            MetaException,
                            org.apache.thrift.TException
Specified by:
alter_partition in interface ThriftHiveMetastore.Iface
Throws:
InvalidOperationException
MetaException
org.apache.thrift.TException

create_index

public boolean create_index(Index index_def)
                     throws IndexAlreadyExistsException,
                            MetaException
Throws:
IndexAlreadyExistsException
MetaException

getVersion

public String getVersion()
                  throws org.apache.thrift.TException
Specified by:
getVersion in interface com.facebook.fb303.FacebookService.Iface
Throws:
org.apache.thrift.TException

alter_table

public void alter_table(String dbname,
                        String name,
                        Table newTable)
                 throws InvalidOperationException,
                        MetaException
Specified by:
alter_table in interface ThriftHiveMetastore.Iface
Throws:
InvalidOperationException
MetaException

get_tables

public List<String> get_tables(String dbname,
                               String pattern)
                        throws MetaException
Specified by:
get_tables in interface ThriftHiveMetastore.Iface
Throws:
MetaException

get_fields

public List<FieldSchema> get_fields(String db,
                                    String tableName)
                             throws MetaException,
                                    UnknownTableException,
                                    UnknownDBException
Specified by:
get_fields in interface ThriftHiveMetastore.Iface
Throws:
MetaException
UnknownTableException
UnknownDBException

get_schema

public List<FieldSchema> get_schema(String db,
                                    String tableName)
                             throws MetaException,
                                    UnknownTableException,
                                    UnknownDBException
Return the schema of the table. This function includes partition columns in addition to the regular columns.

Specified by:
get_schema in interface ThriftHiveMetastore.Iface
Parameters:
db - Name of the database
tableName - Name of the table
Returns:
List of columns, each column is a FieldSchema structure
Throws:
MetaException
UnknownTableException
UnknownDBException

getCpuProfile

public String getCpuProfile(int profileDurationInSec)
                     throws org.apache.thrift.TException
Specified by:
getCpuProfile in interface com.facebook.fb303.FacebookService.Iface
Throws:
org.apache.thrift.TException


Copyright © 2009 The Apache Software Foundation