|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.metastore.MetaStoreClient
public class MetaStoreClient
TODO Unnecessary when the server sides for both dbstore and filestore are merged
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
|
Constructor Summary | |
---|---|
MetaStoreClient(org.apache.hadoop.conf.Configuration configuration)
|
Method Summary | |
---|---|
Partition |
add_partition(Partition partition)
Add a partition to the table. |
void |
alter_table(String defaultDatabaseName,
String tblName,
Table table)
|
Partition |
appendPartition(String dbName,
String tableName,
List<String> partVals)
|
void |
close()
|
boolean |
createDatabase(String name,
String location_uri)
|
void |
createTable(String tableName,
Properties schema)
|
void |
createTable(Table tbl)
|
boolean |
dropDatabase(String name)
|
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,
boolean deleteData,
boolean ignoreUknownTab)
This operation is unsupported in this metastore. |
List<FieldSchema> |
get_fields(String tableName)
|
Partition |
getPartition(String dbName,
String tableName,
List<String> partVals)
|
Properties |
getSchema(String tableName)
|
Table |
getTable(String tableName)
Get a table object. |
Table |
getTable(String dbName,
String tableName)
This operation is unsupported in this metastore. |
List<String> |
getTables(String dbName,
String tablePattern)
|
List<String> |
listPartitionNames(String db_name,
String tbl_name,
short max_parts)
|
List<Partition> |
listPartitions(String dbName,
String tableName,
short max_parts)
|
void |
open(URI store)
|
boolean |
tableExists(String tableName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
public MetaStoreClient(org.apache.hadoop.conf.Configuration configuration) throws MetaException
MetaException
Method Detail |
---|
public void open(URI store) throws com.facebook.thrift.TException
com.facebook.thrift.TException
public void close()
close
in interface IMetaStoreClient
public List<String> getTables(String dbName, String tablePattern) throws MetaException, UnknownTableException, com.facebook.thrift.TException, UnknownDBException
getTables
in interface IMetaStoreClient
MetaException
UnknownTableException
com.facebook.thrift.TException
UnknownDBException
public void dropTable(String tableName, boolean deleteData) throws MetaException, UnknownTableException, com.facebook.thrift.TException
IMetaStoreClient
dropTable
in interface IMetaStoreClient
tableName
- The table to dropdeleteData
- Should we delete the underlying data
MetaException
- Could not drop table properly.
UnknownTableException
- The table wasn't found.
com.facebook.thrift.TException
- A thrift communication error occurredpublic void createTable(String tableName, Properties schema) throws MetaException, UnknownTableException, com.facebook.thrift.TException
MetaException
UnknownTableException
com.facebook.thrift.TException
public Properties getSchema(String tableName) throws MetaException, com.facebook.thrift.TException, NoSuchObjectException
MetaException
com.facebook.thrift.TException
NoSuchObjectException
public boolean tableExists(String tableName) throws MetaException, com.facebook.thrift.TException, UnknownDBException
tableExists
in interface IMetaStoreClient
MetaException
com.facebook.thrift.TException
UnknownDBException
public List<FieldSchema> get_fields(String tableName) throws MetaException, UnknownTableException, com.facebook.thrift.TException
MetaException
UnknownTableException
com.facebook.thrift.TException
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 Table getTable(String dbName, String tableName) throws MetaException, com.facebook.thrift.TException, NoSuchObjectException
getTable
in interface IMetaStoreClient
dbName
- The database the table is located in.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.getTable(String)
public List<Partition> listPartitions(String dbName, String tableName, short max_parts) throws NoSuchObjectException, MetaException, com.facebook.thrift.TException
listPartitions
in interface IMetaStoreClient
NoSuchObjectException
MetaException
com.facebook.thrift.TException
public Partition getPartition(String dbName, String tableName, List<String> partVals) throws MetaException, com.facebook.thrift.TException
getPartition
in interface IMetaStoreClient
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.get_partition(java.lang.String, java.lang.String, java.util.List)
public void createTable(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, com.facebook.thrift.TException
createTable
in interface IMetaStoreClient
AlreadyExistsException
InvalidObjectException
MetaException
NoSuchObjectException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.create_table(org.apache.hadoop.hive.metastore.api.Table)
public Partition appendPartition(String dbName, String tableName, List<String> partVals) throws InvalidObjectException, AlreadyExistsException, MetaException, com.facebook.thrift.TException
appendPartition
in interface IMetaStoreClient
InvalidObjectException
AlreadyExistsException
MetaException
com.facebook.thrift.TException
ThriftHiveMetastore.Iface.append_partition(java.lang.String, java.lang.String, java.util.List)
public void alter_table(String defaultDatabaseName, String tblName, Table table) throws InvalidOperationException, MetaException, com.facebook.thrift.TException
alter_table
in interface IMetaStoreClient
InvalidOperationException
MetaException
com.facebook.thrift.TException
public boolean createDatabase(String name, String location_uri) throws AlreadyExistsException, MetaException, com.facebook.thrift.TException
createDatabase
in interface IMetaStoreClient
AlreadyExistsException
MetaException
com.facebook.thrift.TException
public boolean dropDatabase(String name) throws MetaException, com.facebook.thrift.TException
dropDatabase
in interface IMetaStoreClient
MetaException
com.facebook.thrift.TException
public List<String> listPartitionNames(String db_name, String tbl_name, short max_parts) throws MetaException, com.facebook.thrift.TException
listPartitionNames
in interface IMetaStoreClient
MetaException
com.facebook.thrift.TException
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
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, boolean deleteData, boolean ignoreUknownTab) throws ExistingDependentsException, MetaException, com.facebook.thrift.TException, NoSuchObjectException
dropTable
in interface IMetaStoreClient
dbname
- The database for this tablename
- The table to drop
ExistingDependentsException
MetaException
- Could not drop table properly.
com.facebook.thrift.TException
- A thrift communication error occurred
NoSuchObjectException
- The table wasn't found.IMetaStoreClient.dropTable(String, String, boolean, boolean)
public Partition add_partition(Partition partition) throws InvalidObjectException, AlreadyExistsException, MetaException, com.facebook.thrift.TException
IMetaStoreClient
add_partition
in interface IMetaStoreClient
partition
- The partition to add
InvalidObjectException
- Could not find table to add to
AlreadyExistsException
- Partition already exists
MetaException
- Could not add partition
com.facebook.thrift.TException
- Thrift exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |