org.apache.hadoop.hive.metastore
Class HiveMetaStore.HMSHandler
java.lang.Object
com.facebook.fb303.FacebookBase
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
|
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_by_name(String db_name,
String tbl_name,
String part_name)
|
Partition |
append_partition(String dbName,
String tableName,
List<String> part_vals)
|
void |
create_database(Database db)
|
boolean |
create_index(Index index_def)
|
void |
create_table(Table tbl)
|
boolean |
create_type(Type type)
|
void |
drop_database(String dbName,
boolean deleteData)
|
boolean |
drop_partition_by_name(String db_name,
String tbl_name,
String part_name,
boolean deleteData)
|
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)
|
List<String> |
get_all_databases()
|
List<String> |
get_all_tables(String dbname)
|
String |
get_config_value(String name,
String defaultValue)
Returns the value of the given configuration variable name. |
Database |
get_database(String name)
|
List<String> |
get_databases(String pattern)
|
List<FieldSchema> |
get_fields(String db,
String tableName)
|
Partition |
get_partition_by_name(String db_name,
String tbl_name,
String part_name)
|
List<String> |
get_partition_names_ps(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts)
|
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_ps(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts)
|
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)
|
HiveConf |
getHiveConf()
|
int |
getStatus()
|
String |
getVersion()
|
boolean |
is_table_exists(String dbname,
String name)
|
boolean |
is_type_exists(String typeName)
|
Map<String,String> |
partition_name_to_spec(String part_name)
|
List<String> |
partition_name_to_vals(String part_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 |
LOG
public static final org.apache.commons.logging.Log LOG
HiveMetaStore.HMSHandler
public HiveMetaStore.HMSHandler(String name)
throws MetaException
- Throws:
MetaException
HiveMetaStore.HMSHandler
public HiveMetaStore.HMSHandler(String name,
HiveConf conf)
throws MetaException
- Throws:
MetaException
get
public static Integer get()
getHiveConf
public HiveConf getHiveConf()
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 void create_database(Database db)
throws AlreadyExistsException,
InvalidObjectException,
MetaException
- Specified by:
create_database
in interface ThriftHiveMetastore.Iface
- Throws:
AlreadyExistsException
InvalidObjectException
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 void drop_database(String dbName,
boolean deleteData)
throws NoSuchObjectException,
InvalidOperationException,
MetaException
- Specified by:
drop_database
in interface ThriftHiveMetastore.Iface
- Throws:
NoSuchObjectException
InvalidOperationException
MetaException
get_databases
public List<String> get_databases(String pattern)
throws MetaException
- Specified by:
get_databases
in interface ThriftHiveMetastore.Iface
- Throws:
MetaException
get_all_databases
public List<String> get_all_databases()
throws MetaException
- Specified by:
get_all_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,
NoSuchObjectException
- Specified by:
get_type
in interface ThriftHiveMetastore.Iface
- Throws:
MetaException
NoSuchObjectException
is_type_exists
public boolean is_type_exists(String typeName)
throws MetaException
- 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,
NoSuchObjectException
- Specified by:
get_partition
in interface ThriftHiveMetastore.Iface
- Throws:
MetaException
NoSuchObjectException
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_all_tables
public List<String> get_all_tables(String dbname)
throws MetaException
- Specified by:
get_all_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 databasetableName
- 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
get_config_value
public String get_config_value(String name,
String defaultValue)
throws org.apache.thrift.TException,
ConfigValSecurityException
- Returns the value of the given configuration variable name. If the
configuration variable with the given name doesn't exist, or if there
were an exception thrown while retrieving the variable, or if name is
null, defaultValue is returned.
- Specified by:
get_config_value
in interface ThriftHiveMetastore.Iface
- Throws:
org.apache.thrift.TException
ConfigValSecurityException
get_partition_by_name
public Partition get_partition_by_name(String db_name,
String tbl_name,
String part_name)
throws MetaException,
NoSuchObjectException,
org.apache.thrift.TException
- Specified by:
get_partition_by_name
in interface ThriftHiveMetastore.Iface
- Throws:
MetaException
NoSuchObjectException
org.apache.thrift.TException
append_partition_by_name
public Partition append_partition_by_name(String db_name,
String tbl_name,
String part_name)
throws InvalidObjectException,
AlreadyExistsException,
MetaException,
org.apache.thrift.TException
- Specified by:
append_partition_by_name
in interface ThriftHiveMetastore.Iface
- Throws:
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
drop_partition_by_name
public boolean drop_partition_by_name(String db_name,
String tbl_name,
String part_name,
boolean deleteData)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
- Specified by:
drop_partition_by_name
in interface ThriftHiveMetastore.Iface
- Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException
get_partitions_ps
public List<Partition> get_partitions_ps(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts)
throws MetaException,
org.apache.thrift.TException
- Specified by:
get_partitions_ps
in interface ThriftHiveMetastore.Iface
- Throws:
MetaException
org.apache.thrift.TException
get_partition_names_ps
public List<String> get_partition_names_ps(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts)
throws MetaException,
org.apache.thrift.TException
- Specified by:
get_partition_names_ps
in interface ThriftHiveMetastore.Iface
- Throws:
MetaException
org.apache.thrift.TException
partition_name_to_vals
public List<String> partition_name_to_vals(String part_name)
throws MetaException,
org.apache.thrift.TException
- Specified by:
partition_name_to_vals
in interface ThriftHiveMetastore.Iface
- Throws:
MetaException
org.apache.thrift.TException
partition_name_to_spec
public Map<String,String> partition_name_to_spec(String part_name)
throws MetaException,
org.apache.thrift.TException
- Specified by:
partition_name_to_spec
in interface ThriftHiveMetastore.Iface
- Throws:
MetaException
org.apache.thrift.TException
Copyright © 2010 The Apache Software Foundation