|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.metastore.HiveMetaStoreClient
public class HiveMetaStoreClient
Hive Metastore Client.
Constructor Summary | |
---|---|
HiveMetaStoreClient(HiveConf conf)
|
Method Summary | |
---|---|
Partition |
add_partition(Partition new_part)
Add a partition to the table. |
void |
alter_table(String dbname,
String tbl_name,
Table new_tbl)
|
Partition |
appendPartition(String db_name,
String table_name,
List<String> part_vals)
|
void |
close()
|
boolean |
createDatabase(String name,
String location_uri)
|
void |
createTable(Table tbl)
|
boolean |
createType(Type type)
|
boolean |
dropDatabase(String name)
|
boolean |
dropPartition(String db_name,
String tbl_name,
List<String> part_vals)
|
boolean |
dropPartition(String db_name,
String tbl_name,
List<String> part_vals,
boolean deleteData)
|
void |
dropTable(String tableName,
boolean deleteData)
Drop the table. |
void |
dropTable(String dbname,
String name)
|
void |
dropTable(String dbname,
String name,
boolean deleteData,
boolean ignoreUknownTab)
Drop the table. |
boolean |
dropType(String type)
|
Database |
getDatabase(String name)
|
List<String> |
getDatabases()
|
Partition |
getPartition(String db_name,
String tbl_name,
List<String> part_vals)
|
Table |
getTable(String tableName)
Get a table object. |
Table |
getTable(String dbname,
String name)
Get a table object. |
List<String> |
getTables(String tablePattern)
|
List<String> |
getTables(String dbname,
String tablePattern)
|
Type |
getType(String name)
|
Map<String,Type> |
getTypeAll(String name)
|
List<String> |
listPartitionNames(String dbName,
String tblName,
short max)
|
List<Partition> |
listPartitions(String db_name,
String tbl_name,
short max_parts)
|
boolean |
tableExists(String tableName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HiveMetaStoreClient(HiveConf conf) throws MetaException
MetaException
Method Detail |
---|
public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, com.facebook.thrift.TException
alter_table
in interface IMetaStoreClient
dbname
- tbl_name
- new_tbl
-
InvalidOperationException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.alter_table(java.lang.String, java.lang.String, org.apache.hadoop.hive.metastore.api.Table)
public void close()
close
in interface IMetaStoreClient
public void dropTable(String tableName, boolean deleteData) throws MetaException, NoSuchObjectException
IMetaStoreClient
dropTable
in interface IMetaStoreClient
tableName
- The table to dropdeleteData
- Should we delete the underlying data
MetaException
- Could not drop table properly.
NoSuchObjectException
- The table wasn't found.public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, com.facebook.thrift.TException
IMetaStoreClient
add_partition
in interface IMetaStoreClient
new_part
-
InvalidObjectException
AlreadyExistsException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.add_partition(org.apache.hadoop.hive.metastore.api.Partition)
public Partition appendPartition(String db_name, String table_name, List<String> part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, com.facebook.thrift.TException
appendPartition
in interface IMetaStoreClient
table_name
- db_name
- part_vals
-
InvalidObjectException
AlreadyExistsException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.append_partition(java.lang.String, java.lang.String, java.util.List)
public boolean createDatabase(String name, String location_uri) throws AlreadyExistsException, MetaException, com.facebook.thrift.TException
createDatabase
in interface IMetaStoreClient
name
- location_uri
-
AlreadyExistsException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.create_database(java.lang.String, java.lang.String)
public void createTable(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, com.facebook.thrift.TException
createTable
in interface IMetaStoreClient
tbl
-
MetaException
NoSuchObjectException
com.facebook.thrift.TException
AlreadyExistsException
InvalidObjectException
ThriftHiveMetastore.Iface.create_table(org.apache.hadoop.hive.metastore.api.Table)
public boolean createType(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, com.facebook.thrift.TException
type
-
AlreadyExistsException
InvalidObjectException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.create_type(org.apache.hadoop.hive.metastore.api.Type)
public boolean dropDatabase(String name) throws MetaException, com.facebook.thrift.TException
dropDatabase
in interface IMetaStoreClient
name
-
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.drop_database(java.lang.String)
public boolean dropPartition(String db_name, String tbl_name, List<String> part_vals) throws NoSuchObjectException, MetaException, com.facebook.thrift.TException
tbl_name
- db_name
- part_vals
-
NoSuchObjectException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.drop_partition(java.lang.String, java.lang.String, java.util.List, boolean)
public boolean dropPartition(String db_name, String tbl_name, List<String> part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, com.facebook.thrift.TException
dropPartition
in interface IMetaStoreClient
db_name
- tbl_name
- part_vals
- deleteData
- delete the underlying data or just delete the table in metadata
NoSuchObjectException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.drop_partition(java.lang.String, java.lang.String, java.util.List, boolean)
public void dropTable(String dbname, String name) throws NoSuchObjectException, ExistingDependentsException, MetaException, com.facebook.thrift.TException
name
- dbname
-
NoSuchObjectException
ExistingDependentsException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.drop_table(java.lang.String, java.lang.String, boolean)
public void dropTable(String dbname, String name, boolean deleteData, boolean ignoreUknownTab) throws ExistingDependentsException, MetaException, com.facebook.thrift.TException, NoSuchObjectException
IMetaStoreClient
dropTable
in interface IMetaStoreClient
dbname
- name
- deleteData
- delete the underlying data or just delete the table in metadata
NoSuchObjectException
ExistingDependentsException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.drop_table(java.lang.String, java.lang.String, boolean)
public boolean dropType(String type) throws MetaException, com.facebook.thrift.TException
type
-
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.drop_type(java.lang.String)
public Map<String,Type> getTypeAll(String name) throws MetaException, com.facebook.thrift.TException
name
-
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.get_type_all(java.lang.String)
public List<String> getDatabases() throws MetaException, com.facebook.thrift.TException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.get_databases()
public List<Partition> listPartitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, com.facebook.thrift.TException
listPartitions
in interface IMetaStoreClient
tbl_name
- db_name
- max_parts
-
NoSuchObjectException
MetaException
com.facebook.thrift.TException
public Database getDatabase(String name) throws NoSuchObjectException, MetaException, com.facebook.thrift.TException
name
-
NoSuchObjectException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.get_database(java.lang.String)
public Partition getPartition(String db_name, String tbl_name, List<String> part_vals) throws MetaException, com.facebook.thrift.TException
getPartition
in interface IMetaStoreClient
tbl_name
- db_name
- part_vals
-
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.get_partition(java.lang.String, java.lang.String, java.util.List)
public Table getTable(String dbname, String name) throws MetaException, com.facebook.thrift.TException, NoSuchObjectException
IMetaStoreClient
getTable
in interface IMetaStoreClient
name
- dbname
-
NoSuchObjectException
MetaException
com.facebook.thrift.TException
NoSuchObjectException
ThriftHiveMetastore.Iface.get_table(java.lang.String, java.lang.String)
public Type getType(String name) throws MetaException, com.facebook.thrift.TException
name
-
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.get_type(java.lang.String)
public List<String> getTables(String dbname, String tablePattern) throws MetaException
getTables
in interface IMetaStoreClient
MetaException
public List<String> getTables(String tablePattern) throws MetaException
MetaException
public boolean tableExists(String tableName) throws MetaException, com.facebook.thrift.TException, UnknownDBException
tableExists
in interface IMetaStoreClient
MetaException
com.facebook.thrift.TException
UnknownDBException
public Table getTable(String tableName) throws MetaException, com.facebook.thrift.TException, NoSuchObjectException
IMetaStoreClient
getTable
in interface IMetaStoreClient
tableName
- Name of the table to fetch.
MetaException
- Could not fetch the table
com.facebook.thrift.TException
- A thrift communication error occurred
NoSuchObjectException
- In case the table wasn't found.public List<String> listPartitionNames(String dbName, String tblName, short max) throws MetaException, com.facebook.thrift.TException
listPartitionNames
in interface IMetaStoreClient
MetaException
com.facebook.thrift.TException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |