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
MetaException
public HiveMetaStoreClient(HiveConf conf, HiveMetaHookLoader hookLoader) throws MetaException
MetaException
public void reconnect() throws MetaException
IMetaStoreClient
reconnect
in interface IMetaStoreClient
MetaException
public 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 IMetaStoreClient
dbname
- tbl_name
- new_tbl
- InvalidOperationException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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
InvalidOperationException
MetaException
org.apache.thrift.TException
public 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
IMetaStoreClient
renamePartition
in interface IMetaStoreClient
dbname
- name
- part_vals
- newPart
- InvalidOperationException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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.IOException
public void close()
close
in interface IMetaStoreClient
public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
IMetaStoreClient
add_partition
in interface IMetaStoreClient
new_part
- InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
public int add_partitions(java.util.List<Partition> new_parts) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
IMetaStoreClient
add_partitions
in interface IMetaStoreClient
new_parts
- InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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 IMetaStoreClient
table_name
- db_name
- part_vals
- InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
public Partition appendPartition(java.lang.String dbName, java.lang.String tableName, java.lang.String partName, EnvironmentContext envContext) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
partitionSpecs
- partitions specs of the parent partition to be exchangeddestDb
- the db of the destination tabledestinationTableName
- the destination table nameMetaException
NoSuchObjectException
InvalidObjectException
org.apache.thrift.TException
public void validatePartitionNameCharacters(java.util.List<java.lang.String> partVals) throws org.apache.thrift.TException, MetaException
validatePartitionNameCharacters
in interface IMetaStoreClient
org.apache.thrift.TException
MetaException
public void createDatabase(Database db) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
createDatabase
in interface IMetaStoreClient
db
- AlreadyExistsException
InvalidObjectException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.Iface.create_database(Database)
public void createTable(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
createTable
in interface IMetaStoreClient
tbl
- MetaException
NoSuchObjectException
org.apache.thrift.TException
AlreadyExistsException
InvalidObjectException
ThriftHiveMetastore.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
AlreadyExistsException
InvalidObjectException
MetaException
NoSuchObjectException
org.apache.thrift.TException
public boolean createType(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
type
- AlreadyExistsException
InvalidObjectException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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 IMetaStoreClient
name
- NoSuchObjectException
InvalidOperationException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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 IMetaStoreClient
NoSuchObjectException
InvalidOperationException
MetaException
org.apache.thrift.TException
public void dropDatabase(java.lang.String name, boolean deleteData, boolean ignoreUnknownDb, boolean cascade) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException
dropDatabase
in interface IMetaStoreClient
NoSuchObjectException
InvalidOperationException
MetaException
org.apache.thrift.TException
public 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
- NoSuchObjectException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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
NoSuchObjectException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
NoSuchObjectException
MetaException
org.apache.thrift.TException
public 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
NoSuchObjectException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
db_name
- tbl_name
- part_vals
- deleteData
- delete the underlying data or just delete the table in metadataNoSuchObjectException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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
NoSuchObjectException
MetaException
org.apache.thrift.TException
public void dropTable(java.lang.String dbname, java.lang.String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
dropTable
in interface IMetaStoreClient
name
- dbname
- NoSuchObjectException
ExistingDependentsException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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 IMetaStoreClient
tableName
- 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
IMetaStoreClient
dropTable
in interface IMetaStoreClient
dbname
- name
- deleteData
- delete the underlying data or just delete the table in metadataNoSuchObjectException
ExistingDependentsException
MetaException
org.apache.thrift.TException
java.lang.UnsupportedOperationException
ThriftHiveMetastore.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
MetaException
org.apache.thrift.TException
NoSuchObjectException
java.lang.UnsupportedOperationException
public boolean dropType(java.lang.String type) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
type
- MetaException
org.apache.thrift.TException
NoSuchObjectException
ThriftHiveMetastore.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
- MetaException
org.apache.thrift.TException
ThriftHiveMetastore.Iface.get_type_all(java.lang.String)
public java.util.List<java.lang.String> getDatabases(java.lang.String databasePattern) throws MetaException
getDatabases
in interface IMetaStoreClient
MetaException
public java.util.List<java.lang.String> getAllDatabases() throws MetaException
getAllDatabases
in interface IMetaStoreClient
MetaException
public 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 IMetaStoreClient
tbl_name
- db_name
- max_parts
- NoSuchObjectException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
NoSuchObjectException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
NoSuchObjectException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
NoSuchObjectException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
db_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 passedMetaException
NoSuchObjectException
org.apache.thrift.TException
public Database getDatabase(java.lang.String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClient
getDatabase
in interface IMetaStoreClient
name
- NoSuchObjectException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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 IMetaStoreClient
tbl_name
- db_name
- part_vals
- MetaException
org.apache.thrift.TException
NoSuchObjectException
ThriftHiveMetastore.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
IMetaStoreClient
getPartitionsByNames
in interface IMetaStoreClient
db_name
- database nametbl_name
- table namepart_names
- list of partition namesNoSuchObjectException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
MetaException
UnknownTableException
NoSuchObjectException
org.apache.thrift.TException
public Table getTable(java.lang.String dbname, java.lang.String name) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
IMetaStoreClient
getTable
in interface IMetaStoreClient
name
- dbname
- NoSuchObjectException
MetaException
org.apache.thrift.TException
NoSuchObjectException
ThriftHiveMetastore.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 IMetaStoreClient
tableName
- 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 IMetaStoreClient
dbName
- 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 IMetaStoreClient
dbName
- The name of the database from which you will retrieve the table namesfilter
- The filter stringmaxTables
- The maximum number of tables returnedMetaException
org.apache.thrift.TException
InvalidOperationException
UnknownDBException
public Type getType(java.lang.String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
name
- MetaException
org.apache.thrift.TException
NoSuchObjectException
ThriftHiveMetastore.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 IMetaStoreClient
MetaException
public java.util.List<java.lang.String> getAllTables(java.lang.String dbname) throws MetaException
getAllTables
in interface IMetaStoreClient
MetaException
public boolean tableExists(java.lang.String databaseName, java.lang.String tableName) throws MetaException, org.apache.thrift.TException, UnknownDBException
tableExists
in interface IMetaStoreClient
MetaException
org.apache.thrift.TException
UnknownDBException
@Deprecated public boolean tableExists(java.lang.String tableName) throws MetaException, org.apache.thrift.TException, UnknownDBException
tableExists
in interface IMetaStoreClient
MetaException
org.apache.thrift.TException
UnknownDBException
public 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 IMetaStoreClient
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
MetaException
org.apache.thrift.TException
NoSuchObjectException
public void alter_partition(java.lang.String dbName, java.lang.String tblName, Partition newPart) throws InvalidOperationException, MetaException, org.apache.thrift.TException
IMetaStoreClient
alter_partition
in interface IMetaStoreClient
dbName
- 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
IMetaStoreClient
alter_partitions
in interface IMetaStoreClient
dbName
- 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 IMetaStoreClient
MetaException
NoSuchObjectException
org.apache.thrift.TException
public java.util.List<FieldSchema> getFields(java.lang.String db, java.lang.String tableName) throws MetaException, org.apache.thrift.TException, UnknownTableException, UnknownDBException
getFields
in interface IMetaStoreClient
db
- tableName
- UnknownTableException
UnknownDBException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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 IMetaStoreClient
index
- the index objectindexTable
- which stores the index dataInvalidObjectException
MetaException
NoSuchObjectException
org.apache.thrift.TException
AlreadyExistsException
public 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 IMetaStoreClient
dbname
- base_tbl_name
- idx_name
- new_idx
- InvalidOperationException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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 IMetaStoreClient
dbName
- tblName
- indexName
- MetaException
UnknownTableException
NoSuchObjectException
org.apache.thrift.TException
public 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 IMetaStoreClient
dbName
- tblName
- max
- NoSuchObjectException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
dbName
- tblName
- max
- MetaException
org.apache.thrift.TException
NoSuchObjectException
public boolean updateTableColumnStatistics(ColumnStatistics statsObj) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException, InvalidInputException
updateTableColumnStatistics
in interface IMetaStoreClient
NoSuchObjectException
InvalidObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException, InvalidInputException
updatePartitionColumnStatistics
in interface IMetaStoreClient
NoSuchObjectException
InvalidObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
public 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 IMetaStoreClient
NoSuchObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
InvalidObjectException
public 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 IMetaStoreClient
NoSuchObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
InvalidObjectException
public 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 IMetaStoreClient
NoSuchObjectException
InvalidObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
public 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 IMetaStoreClient
NoSuchObjectException
InvalidObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
public java.util.List<FieldSchema> getSchema(java.lang.String db, java.lang.String tableName) throws MetaException, org.apache.thrift.TException, UnknownTableException, UnknownDBException
getSchema
in interface IMetaStoreClient
db
- tableName
- UnknownTableException
UnknownDBException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.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 IMetaStoreClient
name
- 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.TException
ConfigValSecurityException
public 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 IMetaStoreClient
partName
- - partition name i.e. 'ds=2010-02-03/ts=2010-02-03 18%3A16%3A01'MetaException
org.apache.thrift.TException
UnknownTableException
NoSuchObjectException
ThriftHiveMetastore.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
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
public Partition appendPartitionByName(java.lang.String dbName, java.lang.String tableName, java.lang.String partName, EnvironmentContext envContext) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
public boolean dropPartitionByName(java.lang.String dbName, java.lang.String tableName, java.lang.String partName, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectException
MetaException
org.apache.thrift.TException
public 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
NoSuchObjectException
MetaException
org.apache.thrift.TException
public java.util.List<java.lang.String> partitionNameToVals(java.lang.String name) throws MetaException, org.apache.thrift.TException
partitionNameToVals
in interface IMetaStoreClient
name
- the partition name e.g. ("ds=2010-03-03/hr=12")MetaException
org.apache.thrift.TException
public java.util.Map<java.lang.String,java.lang.String> partitionNameToSpec(java.lang.String name) throws MetaException, org.apache.thrift.TException
partitionNameToSpec
in interface IMetaStoreClient
name
- the partition name e.g. ("ds=2010-03-03/hr=12")MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
name
- index nameNoSuchObjectException
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
MetaException
org.apache.thrift.TException
public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException
create_role
in interface IMetaStoreClient
role
- role objectMetaException
org.apache.thrift.TException
public boolean drop_role(java.lang.String roleName) throws MetaException, org.apache.thrift.TException
drop_role
in interface IMetaStoreClient
roleName
- role nameMetaException
org.apache.thrift.TException
public java.util.List<Role> list_roles(java.lang.String principalName, PrincipalType principalType) throws MetaException, org.apache.thrift.TException
list_roles
in interface IMetaStoreClient
MetaException
org.apache.thrift.TException
public java.util.List<java.lang.String> listRoleNames() throws MetaException, org.apache.thrift.TException
IMetaStoreClient
listRoleNames
in interface IMetaStoreClient
MetaException
org.apache.thrift.TException
public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException
grant_privileges
in interface IMetaStoreClient
MetaException
org.apache.thrift.TException
public boolean revoke_role(java.lang.String roleName, java.lang.String userName, PrincipalType principalType) throws MetaException, org.apache.thrift.TException
revoke_role
in interface IMetaStoreClient
roleName
- role nameuserName
- user nameMetaException
org.apache.thrift.TException
public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException
revoke_privileges
in interface IMetaStoreClient
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
MetaException
org.apache.thrift.TException
public java.util.List<HiveObjectPrivilege> list_privileges(java.lang.String principalName, PrincipalType principalType, HiveObjectRef hiveObject) throws MetaException, org.apache.thrift.TException
list_privileges
in interface IMetaStoreClient
MetaException
org.apache.thrift.TException
public java.lang.String getDelegationToken(java.lang.String renewerKerberosPrincipalName) throws MetaException, org.apache.thrift.TException, java.io.IOException
MetaException
org.apache.thrift.TException
java.io.IOException
public java.lang.String getDelegationToken(java.lang.String owner, java.lang.String renewerKerberosPrincipalName) throws MetaException, org.apache.thrift.TException
getDelegationToken
in interface IMetaStoreClient
owner
- the intended owner for the tokenMetaException
org.apache.thrift.TException
public long renewDelegationToken(java.lang.String tokenStrForm) throws MetaException, org.apache.thrift.TException
renewDelegationToken
in interface IMetaStoreClient
MetaException
org.apache.thrift.TException
public void cancelDelegationToken(java.lang.String tokenStrForm) throws MetaException, org.apache.thrift.TException
cancelDelegationToken
in interface IMetaStoreClient
MetaException
org.apache.thrift.TException
public 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 IMetaStoreClient
MetaException
NoSuchObjectException
org.apache.thrift.TException
UnknownTableException
UnknownDBException
UnknownPartitionException
InvalidPartitionException
public 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 IMetaStoreClient
MetaException
NoSuchObjectException
UnknownTableException
UnknownDBException
org.apache.thrift.TException
UnknownPartitionException
InvalidPartitionException
Copyright © 2012 The Apache Software Foundation