public class HiveMetaStoreClient extends java.lang.Object implements IMetaStoreClient
| Constructor and Description |
|---|
HiveMetaStoreClient(HiveConf conf) |
HiveMetaStoreClient(HiveConf conf,
HiveMetaHookLoader hookLoader) |
| Modifier and Type | Method and Description |
|---|---|
Partition |
add_partition(Partition new_part)
Add a partition to the table.
|
Partition |
add_partition(Partition new_part,
EnvironmentContext envContext) |
int |
add_partitions(java.util.List<Partition> new_parts)
Add partitions to the table.
|
void |
alter_index(java.lang.String dbname,
java.lang.String base_tbl_name,
java.lang.String idx_name,
Index new_idx) |
void |
alter_partition(java.lang.String dbName,
java.lang.String tblName,
Partition newPart)
updates a partition to new partition
|
void |
alter_partitions(java.lang.String dbName,
java.lang.String tblName,
java.util.List<Partition> newParts)
updates a list of partitions
|
void |
alter_table(java.lang.String dbname,
java.lang.String tbl_name,
Table new_tbl) |
void |
alter_table(java.lang.String dbname,
java.lang.String tbl_name,
Table new_tbl,
EnvironmentContext envContext) |
void |
alterDatabase(java.lang.String dbName,
Database db) |
Partition |
appendPartition(java.lang.String db_name,
java.lang.String table_name,
java.util.List<java.lang.String> part_vals) |
Partition |
appendPartition(java.lang.String db_name,
java.lang.String table_name,
java.util.List<java.lang.String> part_vals,
EnvironmentContext envContext) |
Partition |
appendPartition(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName) |
Partition |
appendPartition(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
EnvironmentContext envContext) |
Partition |
appendPartitionByName(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName) |
Partition |
appendPartitionByName(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
EnvironmentContext envContext) |
void |
cancelDelegationToken(java.lang.String tokenStrForm) |
void |
close() |
boolean |
create_role(Role role) |
void |
createDatabase(Database db)
Create a new Database
|
void |
createIndex(Index index,
Table indexTable)
create an index
|
void |
createTable(Table tbl) |
void |
createTable(Table tbl,
EnvironmentContext envContext) |
boolean |
createType(Type type) |
boolean |
deletePartitionColumnStatistics(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
java.lang.String colName)
Delete partition level column statistics given dbName, tableName, partName and colName
|
boolean |
deleteTableColumnStatistics(java.lang.String dbName,
java.lang.String tableName,
java.lang.String colName)
Delete table level column statistics given dbName, tableName and colName
|
boolean |
drop_role(java.lang.String roleName) |
void |
dropDatabase(java.lang.String name) |
void |
dropDatabase(java.lang.String name,
boolean deleteData,
boolean ignoreUnknownDb) |
void |
dropDatabase(java.lang.String name,
boolean deleteData,
boolean ignoreUnknownDb,
boolean cascade) |
boolean |
dropIndex(java.lang.String dbName,
java.lang.String tblName,
java.lang.String name,
boolean deleteData) |
boolean |
dropPartition(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals) |
boolean |
dropPartition(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
boolean deleteData) |
boolean |
dropPartition(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
boolean deleteData,
EnvironmentContext envContext) |
boolean |
dropPartition(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
EnvironmentContext env_context) |
boolean |
dropPartition(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
boolean deleteData) |
boolean |
dropPartition(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
boolean deleteData,
EnvironmentContext envContext) |
boolean |
dropPartitionByName(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
boolean deleteData) |
boolean |
dropPartitionByName(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
boolean deleteData,
EnvironmentContext envContext) |
void |
dropTable(java.lang.String tableName,
boolean deleteData)
Deprecated.
|
void |
dropTable(java.lang.String dbname,
java.lang.String name) |
void |
dropTable(java.lang.String dbname,
java.lang.String name,
boolean deleteData,
boolean ignoreUnknownTab)
Drop the table.
|
void |
dropTable(java.lang.String dbname,
java.lang.String name,
boolean deleteData,
boolean ignoreUnknownTab,
EnvironmentContext envContext) |
boolean |
dropType(java.lang.String type) |
Partition |
exchange_partition(java.util.Map<java.lang.String,java.lang.String> partitionSpecs,
java.lang.String sourceDb,
java.lang.String sourceTable,
java.lang.String destDb,
java.lang.String destinationTableName)
Exchange the partition between two tables
|
PrincipalPrivilegeSet |
get_privilege_set(HiveObjectRef hiveObject,
java.lang.String userName,
java.util.List<java.lang.String> groupNames) |
java.util.List<java.lang.String> |
getAllDatabases()
Get the names of all databases in the MetaStore.
|
java.util.List<java.lang.String> |
getAllTables(java.lang.String dbname)
Get the names of all tables in the specified database.
|
java.lang.String |
getConfigValue(java.lang.String name,
java.lang.String defaultValue) |
Database |
getDatabase(java.lang.String name)
Get a Database Object
|
java.util.List<java.lang.String> |
getDatabases(java.lang.String databasePattern)
Get the names of all databases in the MetaStore that match the given pattern.
|
java.lang.String |
getDelegationToken(java.lang.String renewerKerberosPrincipalName) |
java.lang.String |
getDelegationToken(java.lang.String owner,
java.lang.String renewerKerberosPrincipalName) |
java.util.List<FieldSchema> |
getFields(java.lang.String db,
java.lang.String tableName) |
Index |
getIndex(java.lang.String dbName,
java.lang.String tblName,
java.lang.String indexName) |
Partition |
getPartition(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals) |
Partition |
getPartition(java.lang.String db,
java.lang.String tableName,
java.lang.String partName) |
ColumnStatistics |
getPartitionColumnStatistics(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
java.lang.String colName)
Get partition level column statistics given dbName, tableName, partitionName and colName
|
java.util.List<Partition> |
getPartitionsByNames(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_names)
Get partitions by a list of partition names.
|
Partition |
getPartitionWithAuthInfo(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
java.lang.String user_name,
java.util.List<java.lang.String> group_names) |
java.util.List<FieldSchema> |
getSchema(java.lang.String db,
java.lang.String tableName) |
Table |
getTable(java.lang.String tableName)
Deprecated.
|
Table |
getTable(java.lang.String dbname,
java.lang.String name)
Get a table object.
|
ColumnStatistics |
getTableColumnStatistics(java.lang.String dbName,
java.lang.String tableName,
java.lang.String colName)
Get table level column statistics given dbName, tableName and colName
|
java.util.List<Table> |
getTableObjectsByName(java.lang.String dbName,
java.util.List<java.lang.String> tableNames) |
java.util.List<java.lang.String> |
getTables(java.lang.String dbname,
java.lang.String tablePattern)
Get the names of all tables in the specified database that satisfy the supplied
table name pattern.
|
java.lang.String |
getTokenStrForm() |
Type |
getType(java.lang.String name) |
java.util.Map<java.lang.String,Type> |
getTypeAll(java.lang.String name) |
boolean |
grant_privileges(PrivilegeBag privileges) |
boolean |
grant_role(java.lang.String roleName,
java.lang.String userName,
PrincipalType principalType,
java.lang.String grantor,
PrincipalType grantorType,
boolean grantOption) |
boolean |
isPartitionMarkedForEvent(java.lang.String db_name,
java.lang.String tbl_name,
java.util.Map<java.lang.String,java.lang.String> partKVs,
PartitionEventType eventType) |
java.util.List<HiveObjectPrivilege> |
list_privileges(java.lang.String principalName,
PrincipalType principalType,
HiveObjectRef hiveObject) |
java.util.List<Role> |
list_roles(java.lang.String principalName,
PrincipalType principalType) |
java.util.List<Index> |
listIndexes(java.lang.String dbName,
java.lang.String tblName,
short max)
list all the index names of the give base table.
|
java.util.List<java.lang.String> |
listIndexNames(java.lang.String dbName,
java.lang.String tblName,
short max)
list indexes of the give base table
|
java.util.List<java.lang.String> |
listPartitionNames(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
short max_parts) |
java.util.List<java.lang.String> |
listPartitionNames(java.lang.String dbName,
java.lang.String tblName,
short max) |
java.util.List<Partition> |
listPartitions(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
short max_parts) |
java.util.List<Partition> |
listPartitions(java.lang.String db_name,
java.lang.String tbl_name,
short max_parts) |
java.util.List<Partition> |
listPartitionsByFilter(java.lang.String db_name,
java.lang.String tbl_name,
java.lang.String filter,
short max_parts)
Get list of partitions matching specified filter
|
java.util.List<Partition> |
listPartitionsWithAuthInfo(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
short max_parts,
java.lang.String user_name,
java.util.List<java.lang.String> group_names) |
java.util.List<Partition> |
listPartitionsWithAuthInfo(java.lang.String db_name,
java.lang.String tbl_name,
short max_parts,
java.lang.String user_name,
java.util.List<java.lang.String> group_names) |
java.util.List<java.lang.String> |
listRoleNames()
list all role names
|
java.util.List<java.lang.String> |
listTableNamesByFilter(java.lang.String dbName,
java.lang.String filter,
short maxTables)
Get a list of table names that match a filter.
|
void |
markPartitionForEvent(java.lang.String db_name,
java.lang.String tbl_name,
java.util.Map<java.lang.String,java.lang.String> partKVs,
PartitionEventType eventType) |
static IMetaStoreClient |
newSynchronizedClient(IMetaStoreClient client)
Creates a synchronized wrapper for any
IMetaStoreClient. |
java.util.Map<java.lang.String,java.lang.String> |
partitionNameToSpec(java.lang.String name) |
java.util.List<java.lang.String> |
partitionNameToVals(java.lang.String name) |
void |
reconnect()
Tries to reconnect this MetaStoreClient to the MetaStore.
|
void |
renamePartition(java.lang.String dbname,
java.lang.String name,
java.util.List<java.lang.String> part_vals,
Partition newPart)
rename a partition to a new partition
|
long |
renewDelegationToken(java.lang.String tokenStrForm) |
boolean |
revoke_privileges(PrivilegeBag privileges) |
boolean |
revoke_role(java.lang.String roleName,
java.lang.String userName,
PrincipalType principalType) |
boolean |
tableExists(java.lang.String tableName)
Deprecated.
|
boolean |
tableExists(java.lang.String databaseName,
java.lang.String tableName) |
boolean |
updatePartitionColumnStatistics(ColumnStatistics statsObj)
Write partition level column statistics to persistent store
|
boolean |
updateTableColumnStatistics(ColumnStatistics statsObj)
Write table level column statistics to persistent store
|
void |
validatePartitionNameCharacters(java.util.List<java.lang.String> partVals) |
public HiveMetaStoreClient(HiveConf conf) throws MetaException
MetaExceptionpublic HiveMetaStoreClient(HiveConf conf, HiveMetaHookLoader hookLoader) throws MetaException
MetaExceptionpublic void reconnect()
throws MetaException
IMetaStoreClientreconnect in interface IMetaStoreClientMetaExceptionpublic void alter_table(java.lang.String dbname,
java.lang.String tbl_name,
Table new_tbl)
throws InvalidOperationException,
MetaException,
org.apache.thrift.TException
alter_table in interface IMetaStoreClientdbname - tbl_name - new_tbl - InvalidOperationExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.alter_table(
java.lang.String, java.lang.String,
org.apache.hadoop.hive.metastore.api.Table)public void alter_table(java.lang.String dbname,
java.lang.String tbl_name,
Table new_tbl,
EnvironmentContext envContext)
throws InvalidOperationException,
MetaException,
org.apache.thrift.TException
InvalidOperationExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void renamePartition(java.lang.String dbname,
java.lang.String name,
java.util.List<java.lang.String> part_vals,
Partition newPart)
throws InvalidOperationException,
MetaException,
org.apache.thrift.TException
IMetaStoreClientrenamePartition in interface IMetaStoreClientdbname - name - part_vals - newPart - InvalidOperationExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.rename_partition(
java.lang.String, java.lang.String, java.util.List, org.apache.hadoop.hive.metastore.api.Partition)public java.lang.String getTokenStrForm()
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface IMetaStoreClientpublic Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
IMetaStoreClientadd_partition in interface IMetaStoreClientnew_part - InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.add_partition(org.apache.hadoop.hive.metastore.api.Partition)public Partition add_partition(Partition new_part, EnvironmentContext envContext) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionpublic int add_partitions(java.util.List<Partition> new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
IMetaStoreClientadd_partitions in interface IMetaStoreClientnew_parts - InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.add_partitions(List)public Partition appendPartition(java.lang.String db_name, java.lang.String table_name, java.util.List<java.lang.String> part_vals) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
appendPartition in interface IMetaStoreClienttable_name - db_name - part_vals - InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.append_partition(java.lang.String,
java.lang.String, java.util.List)public Partition appendPartition(java.lang.String db_name, java.lang.String table_name, java.util.List<java.lang.String> part_vals, EnvironmentContext envContext) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionpublic Partition appendPartition(java.lang.String dbName, java.lang.String tableName, java.lang.String partName) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
appendPartition in interface IMetaStoreClientInvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionpublic Partition appendPartition(java.lang.String dbName, java.lang.String tableName, java.lang.String partName, EnvironmentContext envContext) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionpublic Partition exchange_partition(java.util.Map<java.lang.String,java.lang.String> partitionSpecs, java.lang.String sourceDb, java.lang.String sourceTable, java.lang.String destDb, java.lang.String destinationTableName) throws MetaException, NoSuchObjectException, InvalidObjectException, org.apache.thrift.TException
exchange_partition in interface IMetaStoreClientpartitionSpecs - partitions specs of the parent partition to be exchangeddestDb - the db of the destination tabledestinationTableName - the destination table nameMetaExceptionNoSuchObjectExceptionInvalidObjectExceptionorg.apache.thrift.TExceptionpublic void validatePartitionNameCharacters(java.util.List<java.lang.String> partVals)
throws org.apache.thrift.TException,
MetaException
validatePartitionNameCharacters in interface IMetaStoreClientorg.apache.thrift.TExceptionMetaExceptionpublic void createDatabase(Database db) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
createDatabase in interface IMetaStoreClientdb - AlreadyExistsExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.create_database(Database)public void createTable(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
createTable in interface IMetaStoreClienttbl - MetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionAlreadyExistsExceptionInvalidObjectExceptionThriftHiveMetastore.Iface.create_table(org.apache.hadoop.hive.metastore.api.Table)public void createTable(Table tbl, EnvironmentContext envContext) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
AlreadyExistsExceptionInvalidObjectExceptionMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic boolean createType(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
type - AlreadyExistsExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.create_type(org.apache.hadoop.hive.metastore.api.Type)public void dropDatabase(java.lang.String name)
throws NoSuchObjectException,
InvalidOperationException,
MetaException,
org.apache.thrift.TException
dropDatabase in interface IMetaStoreClientname - NoSuchObjectExceptionInvalidOperationExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.drop_database(java.lang.String, boolean, boolean)public void dropDatabase(java.lang.String name,
boolean deleteData,
boolean ignoreUnknownDb)
throws NoSuchObjectException,
InvalidOperationException,
MetaException,
org.apache.thrift.TException
dropDatabase in interface IMetaStoreClientNoSuchObjectExceptionInvalidOperationExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void dropDatabase(java.lang.String name,
boolean deleteData,
boolean ignoreUnknownDb,
boolean cascade)
throws NoSuchObjectException,
InvalidOperationException,
MetaException,
org.apache.thrift.TException
dropDatabase in interface IMetaStoreClientNoSuchObjectExceptionInvalidOperationExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean dropPartition(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
tbl_name - db_name - part_vals - NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.drop_partition(java.lang.String,
java.lang.String, java.util.List, boolean)public boolean dropPartition(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
EnvironmentContext env_context)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean dropPartition(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
boolean deleteData)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
dropPartition in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean dropPartition(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
boolean deleteData,
EnvironmentContext envContext)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean dropPartition(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
boolean deleteData)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
dropPartition in interface IMetaStoreClientdb_name - tbl_name - part_vals - deleteData - delete the underlying data or just delete the table in metadataNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.drop_partition(java.lang.String,
java.lang.String, java.util.List, boolean)public boolean dropPartition(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
boolean deleteData,
EnvironmentContext envContext)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void dropTable(java.lang.String dbname,
java.lang.String name)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
dropTable in interface IMetaStoreClientname - dbname - NoSuchObjectExceptionExistingDependentsExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.drop_table(java.lang.String,
java.lang.String, boolean)@Deprecated
public void dropTable(java.lang.String tableName,
boolean deleteData)
throws MetaException,
UnknownTableException,
org.apache.thrift.TException,
NoSuchObjectException
dropTable in interface IMetaStoreClienttableName - The table to dropdeleteData - Should we delete the underlying dataMetaException - Could not drop table properly.UnknownTableException - The table wasn't found.org.apache.thrift.TException - A thrift communication error occurredNoSuchObjectException - The table wasn't found.public void dropTable(java.lang.String dbname,
java.lang.String name,
boolean deleteData,
boolean ignoreUnknownTab)
throws MetaException,
org.apache.thrift.TException,
NoSuchObjectException,
java.lang.UnsupportedOperationException
IMetaStoreClientdropTable in interface IMetaStoreClientdbname - name - deleteData - delete the underlying data or just delete the table in metadataNoSuchObjectExceptionExistingDependentsExceptionMetaExceptionorg.apache.thrift.TExceptionjava.lang.UnsupportedOperationExceptionThriftHiveMetastore.Iface.drop_table(java.lang.String,
java.lang.String, boolean)public void dropTable(java.lang.String dbname,
java.lang.String name,
boolean deleteData,
boolean ignoreUnknownTab,
EnvironmentContext envContext)
throws MetaException,
org.apache.thrift.TException,
NoSuchObjectException,
java.lang.UnsupportedOperationException
MetaExceptionorg.apache.thrift.TExceptionNoSuchObjectExceptionjava.lang.UnsupportedOperationExceptionpublic boolean dropType(java.lang.String type)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
type - MetaExceptionorg.apache.thrift.TExceptionNoSuchObjectExceptionThriftHiveMetastore.Iface.drop_type(java.lang.String)public java.util.Map<java.lang.String,Type> getTypeAll(java.lang.String name) throws MetaException, org.apache.thrift.TException
name - MetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.get_type_all(java.lang.String)public java.util.List<java.lang.String> getDatabases(java.lang.String databasePattern)
throws MetaException
getDatabases in interface IMetaStoreClientMetaExceptionpublic java.util.List<java.lang.String> getAllDatabases()
throws MetaException
getAllDatabases in interface IMetaStoreClientMetaExceptionpublic java.util.List<Partition> listPartitions(java.lang.String db_name, java.lang.String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
listPartitions in interface IMetaStoreClienttbl_name - db_name - max_parts - NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic java.util.List<Partition> listPartitions(java.lang.String db_name, java.lang.String tbl_name, java.util.List<java.lang.String> part_vals, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
listPartitions in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic java.util.List<Partition> listPartitionsWithAuthInfo(java.lang.String db_name, java.lang.String tbl_name, short max_parts, java.lang.String user_name, java.util.List<java.lang.String> group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
listPartitionsWithAuthInfo in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic java.util.List<Partition> listPartitionsWithAuthInfo(java.lang.String db_name, java.lang.String tbl_name, java.util.List<java.lang.String> part_vals, short max_parts, java.lang.String user_name, java.util.List<java.lang.String> group_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
listPartitionsWithAuthInfo in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic java.util.List<Partition> listPartitionsByFilter(java.lang.String db_name, java.lang.String tbl_name, java.lang.String filter, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
listPartitionsByFilter in interface IMetaStoreClientdb_name - the database nametbl_name - the table namefilter - the filter string,
for example "part1 = \"p1_abc\" and part2 <= "\p2_test\"". Filtering can
be done only on string partition keys.max_parts - the maximum number of partitions to return,
all partitions are returned if -1 is passedMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic Database getDatabase(java.lang.String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientgetDatabase in interface IMetaStoreClientname - NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.get_database(java.lang.String)public Partition getPartition(java.lang.String db_name, java.lang.String tbl_name, java.util.List<java.lang.String> part_vals) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
getPartition in interface IMetaStoreClienttbl_name - db_name - part_vals - MetaExceptionorg.apache.thrift.TExceptionNoSuchObjectExceptionThriftHiveMetastore.Iface.get_partition(java.lang.String,
java.lang.String, java.util.List)public java.util.List<Partition> getPartitionsByNames(java.lang.String db_name, java.lang.String tbl_name, java.util.List<java.lang.String> part_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientgetPartitionsByNames in interface IMetaStoreClientdb_name - database nametbl_name - table namepart_names - list of partition namesNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic Partition getPartitionWithAuthInfo(java.lang.String db_name, java.lang.String tbl_name, java.util.List<java.lang.String> part_vals, java.lang.String user_name, java.util.List<java.lang.String> group_names) throws MetaException, UnknownTableException, NoSuchObjectException, org.apache.thrift.TException
getPartitionWithAuthInfo in interface IMetaStoreClientMetaExceptionUnknownTableExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic Table getTable(java.lang.String dbname, java.lang.String name) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
IMetaStoreClientgetTable in interface IMetaStoreClientname - dbname - NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionNoSuchObjectExceptionThriftHiveMetastore.Iface.get_table(java.lang.String,
java.lang.String)@Deprecated public Table getTable(java.lang.String tableName) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
getTable in interface IMetaStoreClienttableName - Name of the table to fetch.MetaException - Could not fetch the tableorg.apache.thrift.TException - A thrift communication error occurredNoSuchObjectException - In case the table wasn't found.public java.util.List<Table> getTableObjectsByName(java.lang.String dbName, java.util.List<java.lang.String> tableNames) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException
getTableObjectsByName in interface IMetaStoreClientdbName - The database the tables are located in.tableNames - The names of the tables to fetchMetaException - Any other errorsInvalidOperationException - The input to this operation is invalid (e.g., the list of tables names is null)UnknownDBException - The requested database could not be fetched.org.apache.thrift.TException - A thrift communication error occurredpublic java.util.List<java.lang.String> listTableNamesByFilter(java.lang.String dbName,
java.lang.String filter,
short maxTables)
throws MetaException,
org.apache.thrift.TException,
InvalidOperationException,
UnknownDBException
listTableNamesByFilter in interface IMetaStoreClientdbName - The name of the database from which you will retrieve the table namesfilter - The filter stringmaxTables - The maximum number of tables returnedMetaExceptionorg.apache.thrift.TExceptionInvalidOperationExceptionUnknownDBExceptionpublic Type getType(java.lang.String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
name - MetaExceptionorg.apache.thrift.TExceptionNoSuchObjectExceptionThriftHiveMetastore.Iface.get_type(java.lang.String)public java.util.List<java.lang.String> getTables(java.lang.String dbname,
java.lang.String tablePattern)
throws MetaException
getTables in interface IMetaStoreClientMetaExceptionpublic java.util.List<java.lang.String> getAllTables(java.lang.String dbname)
throws MetaException
getAllTables in interface IMetaStoreClientMetaExceptionpublic boolean tableExists(java.lang.String databaseName,
java.lang.String tableName)
throws MetaException,
org.apache.thrift.TException,
UnknownDBException
tableExists in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionUnknownDBException@Deprecated
public boolean tableExists(java.lang.String tableName)
throws MetaException,
org.apache.thrift.TException,
UnknownDBException
tableExists in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionUnknownDBExceptionpublic java.util.List<java.lang.String> listPartitionNames(java.lang.String dbName,
java.lang.String tblName,
short max)
throws MetaException,
org.apache.thrift.TException
listPartitionNames in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic java.util.List<java.lang.String> listPartitionNames(java.lang.String db_name,
java.lang.String tbl_name,
java.util.List<java.lang.String> part_vals,
short max_parts)
throws MetaException,
org.apache.thrift.TException,
NoSuchObjectException
listPartitionNames in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionNoSuchObjectExceptionpublic void alter_partition(java.lang.String dbName,
java.lang.String tblName,
Partition newPart)
throws InvalidOperationException,
MetaException,
org.apache.thrift.TException
IMetaStoreClientalter_partition in interface IMetaStoreClientdbName - database of the old partitiontblName - table name of the old partitionnewPart - new partitionInvalidOperationException - if the old partition does not existMetaException - if error in updating metadataorg.apache.thrift.TException - if error in communicating with metastore serverpublic void alter_partitions(java.lang.String dbName,
java.lang.String tblName,
java.util.List<Partition> newParts)
throws InvalidOperationException,
MetaException,
org.apache.thrift.TException
IMetaStoreClientalter_partitions in interface IMetaStoreClientdbName - database of the old partitiontblName - table name of the old partitionnewParts - list of partitionsInvalidOperationException - if the old partition does not existMetaException - if error in updating metadataorg.apache.thrift.TException - if error in communicating with metastore serverpublic void alterDatabase(java.lang.String dbName,
Database db)
throws MetaException,
NoSuchObjectException,
org.apache.thrift.TException
alterDatabase in interface IMetaStoreClientMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic java.util.List<FieldSchema> getFields(java.lang.String db, java.lang.String tableName) throws MetaException, org.apache.thrift.TException, UnknownTableException, UnknownDBException
getFields in interface IMetaStoreClientdb - tableName - UnknownTableExceptionUnknownDBExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.get_fields(java.lang.String,
java.lang.String)public void createIndex(Index index, Table indexTable) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
createIndex in interface IMetaStoreClientindex - the index objectindexTable - which stores the index dataInvalidObjectExceptionMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionAlreadyExistsExceptionpublic void alter_index(java.lang.String dbname,
java.lang.String base_tbl_name,
java.lang.String idx_name,
Index new_idx)
throws InvalidOperationException,
MetaException,
org.apache.thrift.TException
alter_index in interface IMetaStoreClientdbname - base_tbl_name - idx_name - new_idx - InvalidOperationExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.alter_index(java.lang.String,
java.lang.String, java.lang.String, org.apache.hadoop.hive.metastore.api.Index)public Index getIndex(java.lang.String dbName, java.lang.String tblName, java.lang.String indexName) throws MetaException, UnknownTableException, NoSuchObjectException, org.apache.thrift.TException
getIndex in interface IMetaStoreClientdbName - tblName - indexName - MetaExceptionUnknownTableExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic java.util.List<java.lang.String> listIndexNames(java.lang.String dbName,
java.lang.String tblName,
short max)
throws MetaException,
org.apache.thrift.TException
listIndexNames in interface IMetaStoreClientdbName - tblName - max - NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic java.util.List<Index> listIndexes(java.lang.String dbName, java.lang.String tblName, short max) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
listIndexes in interface IMetaStoreClientdbName - tblName - max - MetaExceptionorg.apache.thrift.TExceptionNoSuchObjectExceptionpublic boolean updateTableColumnStatistics(ColumnStatistics statsObj) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException, InvalidInputException
updateTableColumnStatistics in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionInvalidInputExceptionpublic boolean updatePartitionColumnStatistics(ColumnStatistics statsObj) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException, InvalidInputException
updatePartitionColumnStatistics in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionInvalidInputExceptionpublic ColumnStatistics getTableColumnStatistics(java.lang.String dbName, java.lang.String tableName, java.lang.String colName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException, InvalidInputException, InvalidObjectException
getTableColumnStatistics in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionInvalidInputExceptionInvalidObjectExceptionpublic ColumnStatistics getPartitionColumnStatistics(java.lang.String dbName, java.lang.String tableName, java.lang.String partName, java.lang.String colName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException, InvalidInputException, InvalidObjectException
getPartitionColumnStatistics in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionInvalidInputExceptionInvalidObjectExceptionpublic boolean deletePartitionColumnStatistics(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
java.lang.String colName)
throws NoSuchObjectException,
InvalidObjectException,
MetaException,
org.apache.thrift.TException,
InvalidInputException
deletePartitionColumnStatistics in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionInvalidInputExceptionpublic boolean deleteTableColumnStatistics(java.lang.String dbName,
java.lang.String tableName,
java.lang.String colName)
throws NoSuchObjectException,
InvalidObjectException,
MetaException,
org.apache.thrift.TException,
InvalidInputException
deleteTableColumnStatistics in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionInvalidInputExceptionpublic java.util.List<FieldSchema> getSchema(java.lang.String db, java.lang.String tableName) throws MetaException, org.apache.thrift.TException, UnknownTableException, UnknownDBException
getSchema in interface IMetaStoreClientdb - tableName - UnknownTableExceptionUnknownDBExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.get_schema(java.lang.String,
java.lang.String)public java.lang.String getConfigValue(java.lang.String name,
java.lang.String defaultValue)
throws org.apache.thrift.TException,
ConfigValSecurityException
getConfigValue in interface IMetaStoreClientname - name of the configuration property to get the value ofdefaultValue - the value to return if property with the given name doesn't existorg.apache.thrift.TExceptionConfigValSecurityExceptionpublic Partition getPartition(java.lang.String db, java.lang.String tableName, java.lang.String partName) throws MetaException, org.apache.thrift.TException, UnknownTableException, NoSuchObjectException
getPartition in interface IMetaStoreClientpartName - - partition name i.e. 'ds=2010-02-03/ts=2010-02-03 18%3A16%3A01'MetaExceptionorg.apache.thrift.TExceptionUnknownTableExceptionNoSuchObjectExceptionThriftHiveMetastore.Iface.get_partition(java.lang.String,
java.lang.String, java.util.List)public Partition appendPartitionByName(java.lang.String dbName, java.lang.String tableName, java.lang.String partName) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionpublic Partition appendPartitionByName(java.lang.String dbName, java.lang.String tableName, java.lang.String partName, EnvironmentContext envContext) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean dropPartitionByName(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
boolean deleteData)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean dropPartitionByName(java.lang.String dbName,
java.lang.String tableName,
java.lang.String partName,
boolean deleteData,
EnvironmentContext envContext)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic java.util.List<java.lang.String> partitionNameToVals(java.lang.String name)
throws MetaException,
org.apache.thrift.TException
partitionNameToVals in interface IMetaStoreClientname - the partition name e.g. ("ds=2010-03-03/hr=12")MetaExceptionorg.apache.thrift.TExceptionpublic java.util.Map<java.lang.String,java.lang.String> partitionNameToSpec(java.lang.String name)
throws MetaException,
org.apache.thrift.TException
partitionNameToSpec in interface IMetaStoreClientname - the partition name e.g. ("ds=2010-03-03/hr=12")MetaExceptionorg.apache.thrift.TExceptionpublic boolean dropIndex(java.lang.String dbName,
java.lang.String tblName,
java.lang.String name,
boolean deleteData)
throws NoSuchObjectException,
MetaException,
org.apache.thrift.TException
dropIndex in interface IMetaStoreClientname - index nameNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean grant_role(java.lang.String roleName,
java.lang.String userName,
PrincipalType principalType,
java.lang.String grantor,
PrincipalType grantorType,
boolean grantOption)
throws MetaException,
org.apache.thrift.TException
grant_role in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic boolean create_role(Role role) throws MetaException, org.apache.thrift.TException
create_role in interface IMetaStoreClientrole - role objectMetaExceptionorg.apache.thrift.TExceptionpublic boolean drop_role(java.lang.String roleName)
throws MetaException,
org.apache.thrift.TException
drop_role in interface IMetaStoreClientroleName - role nameMetaExceptionorg.apache.thrift.TExceptionpublic java.util.List<Role> list_roles(java.lang.String principalName, PrincipalType principalType) throws MetaException, org.apache.thrift.TException
list_roles in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic java.util.List<java.lang.String> listRoleNames()
throws MetaException,
org.apache.thrift.TException
IMetaStoreClientlistRoleNames in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic boolean grant_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException
grant_privileges in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic boolean revoke_role(java.lang.String roleName,
java.lang.String userName,
PrincipalType principalType)
throws MetaException,
org.apache.thrift.TException
revoke_role in interface IMetaStoreClientroleName - role nameuserName - user nameMetaExceptionorg.apache.thrift.TExceptionpublic boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException
revoke_privileges in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, java.lang.String userName, java.util.List<java.lang.String> groupNames) throws MetaException, org.apache.thrift.TException
get_privilege_set in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic java.util.List<HiveObjectPrivilege> list_privileges(java.lang.String principalName, PrincipalType principalType, HiveObjectRef hiveObject) throws MetaException, org.apache.thrift.TException
list_privileges in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic java.lang.String getDelegationToken(java.lang.String renewerKerberosPrincipalName)
throws MetaException,
org.apache.thrift.TException,
java.io.IOException
MetaExceptionorg.apache.thrift.TExceptionjava.io.IOExceptionpublic java.lang.String getDelegationToken(java.lang.String owner,
java.lang.String renewerKerberosPrincipalName)
throws MetaException,
org.apache.thrift.TException
getDelegationToken in interface IMetaStoreClientowner - the intended owner for the tokenMetaExceptionorg.apache.thrift.TExceptionpublic long renewDelegationToken(java.lang.String tokenStrForm)
throws MetaException,
org.apache.thrift.TException
renewDelegationToken in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic void cancelDelegationToken(java.lang.String tokenStrForm)
throws MetaException,
org.apache.thrift.TException
cancelDelegationToken in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic static IMetaStoreClient newSynchronizedClient(IMetaStoreClient client)
IMetaStoreClient.
This may be used by multi-threaded applications until we have
fixed all reentrancy bugs.client - unsynchronized clientpublic void markPartitionForEvent(java.lang.String db_name,
java.lang.String tbl_name,
java.util.Map<java.lang.String,java.lang.String> partKVs,
PartitionEventType eventType)
throws MetaException,
org.apache.thrift.TException,
NoSuchObjectException,
UnknownDBException,
UnknownTableException,
InvalidPartitionException,
UnknownPartitionException
markPartitionForEvent in interface IMetaStoreClientMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionUnknownTableExceptionUnknownDBExceptionUnknownPartitionExceptionInvalidPartitionExceptionpublic boolean isPartitionMarkedForEvent(java.lang.String db_name,
java.lang.String tbl_name,
java.util.Map<java.lang.String,java.lang.String> partKVs,
PartitionEventType eventType)
throws MetaException,
NoSuchObjectException,
UnknownTableException,
UnknownDBException,
org.apache.thrift.TException,
InvalidPartitionException,
UnknownPartitionException
isPartitionMarkedForEvent in interface IMetaStoreClientMetaExceptionNoSuchObjectExceptionUnknownTableExceptionUnknownDBExceptionorg.apache.thrift.TExceptionUnknownPartitionExceptionInvalidPartitionExceptionCopyright © 2012 The Apache Software Foundation