@InterfaceAudience.Public @InterfaceStability.Evolving public interface IMetaStoreClient
Modifier and Type | Interface and Description |
---|---|
static class |
IMetaStoreClient.IncompatibleMetastoreException |
static interface |
IMetaStoreClient.NotificationFilter
A filter provided by the client that determines if a given notification event should be
returned.
|
Modifier and Type | Method and Description |
---|---|
Partition |
add_partition(Partition partition)
Add a partition to the table.
|
int |
add_partitions_pspec(PartitionSpecProxy partitionSpec) |
int |
add_partitions(List<Partition> partitions)
Add partitions to the table.
|
List<Partition> |
add_partitions(List<Partition> partitions,
boolean ifNotExists,
boolean needResults)
Add partitions to the table.
|
void |
addDynamicPartitions(long txnId,
String dbName,
String tableName,
List<String> partNames)
Send a list of partitions to the metastore to indicate which partitions were loaded
dynamically.
|
void |
alter_index(String dbName,
String tblName,
String indexName,
Index index) |
void |
alter_partition(String dbName,
String tblName,
Partition newPart)
updates a partition to new partition
|
void |
alter_partitions(String dbName,
String tblName,
List<Partition> newParts)
updates a list of partitions
|
void |
alter_table(String defaultDatabaseName,
String tblName,
Table table) |
void |
alter_table(String defaultDatabaseName,
String tblName,
Table table,
boolean cascade) |
void |
alterDatabase(String name,
Database db) |
void |
alterFunction(String dbName,
String funcName,
Function newFunction) |
Partition |
appendPartition(String tableName,
String dbName,
List<String> partVals) |
Partition |
appendPartition(String tableName,
String dbName,
String name) |
void |
cancelDelegationToken(String tokenStrForm) |
LockResponse |
checkLock(long lockid)
Check the status of a set of locks requested via a
lock(org.apache.hadoop.hive.metastore.api.LockRequest) call. |
void |
close()
close connection to meta store
|
void |
commitTxn(long txnid)
Commit a transaction.
|
void |
compact(String dbname,
String tableName,
String partitionName,
CompactionType type)
Send a request to compact a table or partition.
|
boolean |
create_role(Role role) |
void |
createDatabase(Database db) |
void |
createFunction(Function func) |
void |
createIndex(Index index,
Table indexTable)
create an index
|
void |
createTable(Table tbl) |
boolean |
deletePartitionColumnStatistics(String dbName,
String tableName,
String partName,
String colName)
Delete partition level column statistics given dbName, tableName, partName and colName
|
boolean |
deleteTableColumnStatistics(String dbName,
String tableName,
String colName)
Delete table level column statistics given dbName, tableName and colName
|
boolean |
drop_role(String role_name) |
void |
dropDatabase(String name) |
void |
dropDatabase(String name,
boolean deleteData,
boolean ignoreUnknownDb) |
void |
dropDatabase(String name,
boolean deleteData,
boolean ignoreUnknownDb,
boolean cascade) |
void |
dropFunction(String dbName,
String funcName) |
boolean |
dropIndex(String db_name,
String tbl_name,
String name,
boolean deleteData) |
boolean |
dropPartition(String db_name,
String tbl_name,
List<String> part_vals,
boolean deleteData) |
boolean |
dropPartition(String db_name,
String tbl_name,
List<String> part_vals,
PartitionDropOptions options)
Method to dropPartitions() with the option to purge the partition data directly,
rather than to move data to trash.
|
boolean |
dropPartition(String db_name,
String tbl_name,
String name,
boolean deleteData) |
List<Partition> |
dropPartitions(String dbName,
String tblName,
List<ObjectPair<Integer,byte[]>> partExprs,
boolean deleteData,
boolean ignoreProtection,
boolean ifExists) |
List<Partition> |
dropPartitions(String dbName,
String tblName,
List<ObjectPair<Integer,byte[]>> partExprs,
boolean deleteData,
boolean ignoreProtection,
boolean ifExists,
boolean needResults) |
List<Partition> |
dropPartitions(String dbName,
String tblName,
List<ObjectPair<Integer,byte[]>> partExprs,
PartitionDropOptions options)
Generalization of dropPartitions(),
|
void |
dropTable(String tableName,
boolean deleteData)
Deprecated.
As of release 0.6.0 replaced by
dropTable(String, String, boolean, boolean) .
This method will be removed in release 0.7.0. |
void |
dropTable(String dbname,
String tableName) |
void |
dropTable(String dbname,
String tableName,
boolean deleteData,
boolean ignoreUnknownTab)
Drop the table.
|
void |
dropTable(String dbname,
String tableName,
boolean deleteData,
boolean ignoreUnknownTab,
boolean ifPurge) |
Partition |
exchange_partition(Map<String,String> partitionSpecs,
String sourceDb,
String sourceTable,
String destdb,
String destTableName) |
FireEventResponse |
fireListenerEvent(FireEventRequest request)
Request that the metastore fire an event.
|
GetPrincipalsInRoleResponse |
get_principals_in_role(GetPrincipalsInRoleRequest getPrincRoleReq)
get all role-grants for users/roles that have been granted the given role
Note that in the returned list of RolePrincipalGrants, the roleName is
redundant as it would match the role_name argument of this function
|
PrincipalPrivilegeSet |
get_privilege_set(HiveObjectRef hiveObject,
String user_name,
List<String> group_names)
Return the privileges that the user, group have directly and indirectly through roles
on the given hiveObject
|
GetRoleGrantsForPrincipalResponse |
get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest getRolePrincReq)
get all role-grants for roles that have been granted to given principal
Note that in the returned list of RolePrincipalGrants, the principal information
redundant as it would match the principal information in request
|
AggrStats |
getAggrColStatsFor(String dbName,
String tblName,
List<String> colNames,
List<String> partName) |
List<String> |
getAllDatabases()
Get the names of all databases in the MetaStore.
|
List<String> |
getAllTables(String dbName)
Get the names of all tables in the specified database.
|
String |
getConfigValue(String name,
String defaultValue) |
CurrentNotificationEventId |
getCurrentNotificationEventId()
Get the last used notification event id.
|
Database |
getDatabase(String databaseName)
Get a Database Object
|
List<String> |
getDatabases(String databasePattern)
Get the names of all databases in the MetaStore that match the given pattern.
|
String |
getDelegationToken(String owner,
String renewerKerberosPrincipalName)
This is expected to be a no-op when in local mode,
which means that the implementation will return null.
|
List<FieldSchema> |
getFields(String db,
String tableName) |
Function |
getFunction(String dbName,
String funcName) |
List<String> |
getFunctions(String dbName,
String pattern) |
Index |
getIndex(String dbName,
String tblName,
String indexName) |
String |
getMetaConf(String key)
get current meta variable
|
NotificationEventResponse |
getNextNotification(long lastEventId,
int maxEvents,
IMetaStoreClient.NotificationFilter filter)
Get the next set of notifications from the database.
|
Partition |
getPartition(String tblName,
String dbName,
List<String> partVals) |
Partition |
getPartition(String dbName,
String tblName,
String name) |
Map<String,List<ColumnStatisticsObj>> |
getPartitionColumnStatistics(String dbName,
String tableName,
List<String> partNames,
List<String> colNames)
Get partitions column statistics given dbName, tableName, multiple partitions and colName-s
|
List<Partition> |
getPartitionsByNames(String db_name,
String tbl_name,
List<String> part_names)
Get partitions by a list of partition names.
|
Partition |
getPartitionWithAuthInfo(String dbName,
String tableName,
List<String> pvals,
String userName,
List<String> groupNames) |
List<FieldSchema> |
getSchema(String db,
String tableName) |
Table |
getTable(String tableName)
Deprecated.
As of release 0.6.0 replaced by
getTable(String, String) .
This method will be removed in release 0.7.0. |
Table |
getTable(String dbName,
String tableName)
Get a table object.
|
List<ColumnStatisticsObj> |
getTableColumnStatistics(String dbName,
String tableName,
List<String> colNames)
Get table column statistics given dbName, tableName and multiple colName-s
|
List<Table> |
getTableObjectsByName(String dbName,
List<String> tableNames) |
List<String> |
getTables(String dbName,
String tablePattern)
Get the names of all tables in the specified database that satisfy the supplied
table name pattern.
|
String |
getTokenStrForm() |
ValidTxnList |
getValidTxns()
Get a structure that details valid transactions.
|
ValidTxnList |
getValidTxns(long currentTxn)
Get a structure that details valid transactions.
|
boolean |
grant_privileges(PrivilegeBag privileges) |
boolean |
grant_role(String role_name,
String user_name,
PrincipalType principalType,
String grantor,
PrincipalType grantorType,
boolean grantOption) |
void |
heartbeat(long txnid,
long lockid)
Send a heartbeat to indicate that the client holding these locks (if
any) and that opened this transaction (if one exists) is still alive.
|
HeartbeatTxnRangeResponse |
heartbeatTxnRange(long min,
long max)
Send heartbeats for a range of transactions.
|
boolean |
isCompatibleWith(HiveConf conf)
Returns whether current client is compatible with conf argument or not
|
boolean |
isPartitionMarkedForEvent(String db_name,
String tbl_name,
Map<String,String> partKVs,
PartitionEventType eventType) |
List<HiveObjectPrivilege> |
list_privileges(String principal_name,
PrincipalType principal_type,
HiveObjectRef hiveObject)
Return the privileges that this principal has directly over the object (not through roles).
|
List<Role> |
list_roles(String principalName,
PrincipalType principalType) |
List<Index> |
listIndexes(String db_name,
String tbl_name,
short max)
list indexes of the give base table
|
List<String> |
listIndexNames(String db_name,
String tbl_name,
short max)
list all the index names of the give base table.
|
List<String> |
listPartitionNames(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts) |
List<String> |
listPartitionNames(String db_name,
String tbl_name,
short max_parts) |
List<Partition> |
listPartitions(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts) |
List<Partition> |
listPartitions(String db_name,
String tbl_name,
short max_parts) |
boolean |
listPartitionsByExpr(String db_name,
String tbl_name,
byte[] expr,
String default_partition_name,
short max_parts,
List<Partition> result)
Get list of partitions matching specified serialized expression
|
List<Partition> |
listPartitionsByFilter(String db_name,
String tbl_name,
String filter,
short max_parts)
Get list of partitions matching specified filter
|
PartitionSpecProxy |
listPartitionSpecs(String dbName,
String tableName,
int maxParts) |
PartitionSpecProxy |
listPartitionSpecsByFilter(String db_name,
String tbl_name,
String filter,
int max_parts) |
List<Partition> |
listPartitionsWithAuthInfo(String dbName,
String tableName,
List<String> partialPvals,
short s,
String userName,
List<String> groupNames) |
List<Partition> |
listPartitionsWithAuthInfo(String dbName,
String tableName,
short s,
String userName,
List<String> groupNames) |
List<String> |
listRoleNames()
list all role names
|
List<String> |
listTableNamesByFilter(String dbName,
String filter,
short maxTables)
Get a list of table names that match a filter.
|
LockResponse |
lock(LockRequest request)
Request a set of locks.
|
void |
markPartitionForEvent(String db_name,
String tbl_name,
Map<String,String> partKVs,
PartitionEventType eventType) |
long |
openTxn(String user)
Initiate a transaction.
|
OpenTxnsResponse |
openTxns(String user,
int numTxns)
Initiate a batch of transactions.
|
Map<String,String> |
partitionNameToSpec(String name) |
List<String> |
partitionNameToVals(String name) |
void |
reconnect()
Tries to reconnect this MetaStoreClient to the MetaStore.
|
void |
renamePartition(String dbname,
String name,
List<String> part_vals,
Partition newPart)
rename a partition to a new partition
|
long |
renewDelegationToken(String tokenStrForm) |
boolean |
revoke_privileges(PrivilegeBag privileges,
boolean grantOption) |
boolean |
revoke_role(String role_name,
String user_name,
PrincipalType principalType,
boolean grantOption) |
void |
rollbackTxn(long txnid)
Rollback a transaction.
|
void |
setHiveAddedJars(String addedJars)
Set added jars path info to MetaStoreClient.
|
void |
setMetaConf(String key,
String value)
set meta variable which is open to end users
|
boolean |
setPartitionColumnStatistics(SetPartitionsStatsRequest request) |
ShowCompactResponse |
showCompactions()
Get a list of all current compactions.
|
ShowLocksResponse |
showLocks()
Show all currently held and waiting locks.
|
GetOpenTxnsInfoResponse |
showTxns()
Show the list of currently open transactions.
|
boolean |
tableExists(String tableName)
Deprecated.
As of release 0.6.0 replaced by
tableExists(String, String) .
This method will be removed in release 0.7.0. |
boolean |
tableExists(String databaseName,
String tableName) |
void |
unlock(long lockid)
Unlock a set of locks.
|
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(List<String> partVals) |
boolean isCompatibleWith(HiveConf conf)
void setHiveAddedJars(String addedJars)
addedJars
- the hive.added.jars.path. It is qualified paths separated by commas.void reconnect() throws MetaException
MetaException
void close()
void setMetaConf(String key, String value) throws MetaException, org.apache.thrift.TException
MetaException
org.apache.thrift.TException
String getMetaConf(String key) throws MetaException, org.apache.thrift.TException
MetaException
org.apache.thrift.TException
List<String> getDatabases(String databasePattern) throws MetaException, org.apache.thrift.TException
databasePattern
- MetaException
org.apache.thrift.TException
List<String> getAllDatabases() throws MetaException, org.apache.thrift.TException
MetaException
org.apache.thrift.TException
List<String> getTables(String dbName, String tablePattern) throws MetaException, org.apache.thrift.TException, UnknownDBException
dbName
- tablePattern
- MetaException
org.apache.thrift.TException
UnknownDBException
List<String> getAllTables(String dbName) throws MetaException, org.apache.thrift.TException, UnknownDBException
dbName
- MetaException
org.apache.thrift.TException
UnknownDBException
List<String> listTableNamesByFilter(String dbName, String filter, short maxTables) throws MetaException, org.apache.thrift.TException, InvalidOperationException, UnknownDBException
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
void dropTable(String dbname, String tableName, boolean deleteData, boolean ignoreUnknownTab) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
dbname
- The database for this tabletableName
- The table to dropdeleteData
- Should we delete the underlying dataignoreUnknownTab
- don't throw if the requested table doesn't existMetaException
- Could not drop table properly.NoSuchObjectException
- The table wasn't found.org.apache.thrift.TException
- A thrift communication error occurredvoid dropTable(String dbname, String tableName, boolean deleteData, boolean ignoreUnknownTab, boolean ifPurge) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
ifPurge
- completely purge the table (skipping trash) while removing data from warehouseMetaException
org.apache.thrift.TException
NoSuchObjectException
dropTable(String, String, boolean, boolean)
@Deprecated void dropTable(String tableName, boolean deleteData) throws MetaException, UnknownTableException, org.apache.thrift.TException, NoSuchObjectException
dropTable(String, String, boolean, boolean)
.
This method will be removed in release 0.7.0.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.void dropTable(String dbname, String tableName) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
MetaException
org.apache.thrift.TException
NoSuchObjectException
dropTable(String, String, boolean, boolean)
boolean tableExists(String databaseName, String tableName) throws MetaException, org.apache.thrift.TException, UnknownDBException
MetaException
org.apache.thrift.TException
UnknownDBException
@Deprecated boolean tableExists(String tableName) throws MetaException, org.apache.thrift.TException, UnknownDBException
tableExists(String, String)
.
This method will be removed in release 0.7.0.tableName
- MetaException
org.apache.thrift.TException
UnknownDBException
@Deprecated Table getTable(String tableName) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
getTable(String, String)
.
This method will be removed in release 0.7.0.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.Database getDatabase(String databaseName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
databaseName
- name of the database to fetchNoSuchObjectException
- The database does not existMetaException
- Could not fetch the databaseorg.apache.thrift.TException
- A thrift communication error occurredTable getTable(String dbName, String tableName) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
dbName
- The database the table is located in.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.List<Table> getTableObjectsByName(String dbName, List<String> tableNames) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException
dbName
- The database the tables are located in.tableNames
- The names of the tables to fetchInvalidOperationException
- 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 occurredMetaException
- Any other errorsPartition appendPartition(String tableName, String dbName, List<String> partVals) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
tableName
- dbName
- partVals
- InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.Iface.append_partition(java.lang.String,
java.lang.String, java.util.List)
Partition appendPartition(String tableName, String dbName, String name) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
Partition add_partition(Partition partition) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
partition
- The partition to addInvalidObjectException
- Could not find table to add toAlreadyExistsException
- Partition already existsMetaException
- Could not add partitionorg.apache.thrift.TException
- Thrift exceptionint add_partitions(List<Partition> partitions) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
partitions
- The partitions to addInvalidObjectException
- Could not find table to add toAlreadyExistsException
- Partition already existsMetaException
- Could not add partitionorg.apache.thrift.TException
- Thrift exceptionint add_partitions_pspec(PartitionSpecProxy partitionSpec) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
List<Partition> add_partitions(List<Partition> partitions, boolean ifNotExists, boolean needResults) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
partitions
- The partitions to addifNotExists
- only add partitions if they don't existneedResults
- Whether the results are neededInvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
Partition getPartition(String tblName, String dbName, List<String> partVals) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
tblName
- dbName
- partVals
- MetaException
org.apache.thrift.TException
NoSuchObjectException
ThriftHiveMetastore.Iface.get_partition(java.lang.String,
java.lang.String, java.util.List)
Partition exchange_partition(Map<String,String> partitionSpecs, String sourceDb, String sourceTable, String destdb, String destTableName) throws MetaException, NoSuchObjectException, InvalidObjectException, org.apache.thrift.TException
partitionSpecs
- sourceDb
- sourceTable
- destdb
- destTableName
- MetaException
NoSuchObjectException
InvalidObjectException
org.apache.thrift.TException
Partition getPartition(String dbName, String tblName, String name) throws MetaException, UnknownTableException, NoSuchObjectException, org.apache.thrift.TException
dbName
- tblName
- name
- - 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)
Partition getPartitionWithAuthInfo(String dbName, String tableName, List<String> pvals, String userName, List<String> groupNames) throws MetaException, UnknownTableException, NoSuchObjectException, org.apache.thrift.TException
dbName
- tableName
- pvals
- userName
- groupNames
- MetaException
UnknownTableException
NoSuchObjectException
org.apache.thrift.TException
List<Partition> listPartitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
tbl_name
- db_name
- max_parts
- NoSuchObjectException
MetaException
org.apache.thrift.TException
PartitionSpecProxy listPartitionSpecs(String dbName, String tableName, int maxParts) throws org.apache.thrift.TException
org.apache.thrift.TException
List<Partition> listPartitions(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectException
MetaException
org.apache.thrift.TException
List<String> listPartitionNames(String db_name, String tbl_name, short max_parts) throws MetaException, org.apache.thrift.TException
MetaException
org.apache.thrift.TException
List<String> listPartitionNames(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
MetaException
org.apache.thrift.TException
NoSuchObjectException
List<Partition> listPartitionsByFilter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
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
PartitionSpecProxy listPartitionSpecsByFilter(String db_name, String tbl_name, String filter, int max_parts) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
MetaException
NoSuchObjectException
org.apache.thrift.TException
boolean listPartitionsByExpr(String db_name, String tbl_name, byte[] expr, String default_partition_name, short max_parts, List<Partition> result) throws org.apache.thrift.TException
db_name
- the database nametbl_name
- the table nameexpr
- expression, serialized from ExprNodeDescmax_parts
- the maximum number of partitions to return,
all partitions are returned if -1 is passeddefault_partition_name
- Default partition name from configuration. If blank, the
metastore server-side configuration is used.result
- the resulting list of partitionsorg.apache.thrift.TException
List<Partition> listPartitionsWithAuthInfo(String dbName, String tableName, short s, String userName, List<String> groupNames) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
dbName
- tableName
- s
- userName
- groupNames
- NoSuchObjectException
MetaException
org.apache.thrift.TException
List<Partition> getPartitionsByNames(String db_name, String tbl_name, List<String> part_names) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
db_name
- database nametbl_name
- table namepart_names
- list of partition namesNoSuchObjectException
MetaException
org.apache.thrift.TException
List<Partition> listPartitionsWithAuthInfo(String dbName, String tableName, List<String> partialPvals, short s, String userName, List<String> groupNames) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
dbName
- tableName
- partialPvals
- s
- userName
- groupNames
- NoSuchObjectException
MetaException
org.apache.thrift.TException
void markPartitionForEvent(String db_name, String tbl_name, Map<String,String> partKVs, PartitionEventType eventType) throws MetaException, NoSuchObjectException, org.apache.thrift.TException, UnknownTableException, UnknownDBException, UnknownPartitionException, InvalidPartitionException
db_name
- tbl_name
- partKVs
- eventType
- MetaException
NoSuchObjectException
org.apache.thrift.TException
UnknownTableException
UnknownDBException
UnknownPartitionException
InvalidPartitionException
boolean isPartitionMarkedForEvent(String db_name, String tbl_name, Map<String,String> partKVs, PartitionEventType eventType) throws MetaException, NoSuchObjectException, org.apache.thrift.TException, UnknownTableException, UnknownDBException, UnknownPartitionException, InvalidPartitionException
db_name
- tbl_name
- partKVs
- eventType
- MetaException
NoSuchObjectException
org.apache.thrift.TException
UnknownTableException
UnknownDBException
UnknownPartitionException
InvalidPartitionException
void validatePartitionNameCharacters(List<String> partVals) throws org.apache.thrift.TException, MetaException
partVals
- org.apache.thrift.TException
MetaException
void createTable(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
tbl
- AlreadyExistsException
InvalidObjectException
MetaException
NoSuchObjectException
org.apache.thrift.TException
ThriftHiveMetastore.Iface.create_table(org.apache.hadoop.hive.metastore.api.Table)
void alter_table(String defaultDatabaseName, String tblName, Table table) throws InvalidOperationException, MetaException, org.apache.thrift.TException
InvalidOperationException
MetaException
org.apache.thrift.TException
void alter_table(String defaultDatabaseName, String tblName, Table table, boolean cascade) throws InvalidOperationException, MetaException, org.apache.thrift.TException
InvalidOperationException
MetaException
org.apache.thrift.TException
void createDatabase(Database db) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
void dropDatabase(String name) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException
NoSuchObjectException
InvalidOperationException
MetaException
org.apache.thrift.TException
void dropDatabase(String name, boolean deleteData, boolean ignoreUnknownDb) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException
NoSuchObjectException
InvalidOperationException
MetaException
org.apache.thrift.TException
void dropDatabase(String name, boolean deleteData, boolean ignoreUnknownDb, boolean cascade) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException
NoSuchObjectException
InvalidOperationException
MetaException
org.apache.thrift.TException
void alterDatabase(String name, Database db) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectException
MetaException
org.apache.thrift.TException
boolean dropPartition(String db_name, String tbl_name, List<String> part_vals, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
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)
boolean dropPartition(String db_name, String tbl_name, List<String> part_vals, PartitionDropOptions options) throws org.apache.thrift.TException
db_name
- Name of the database.tbl_name
- Name of the table.part_vals
- Specification of the partitions being dropped.options
- PartitionDropOptions for the operation.org.apache.thrift.TException
List<Partition> dropPartitions(String dbName, String tblName, List<ObjectPair<Integer,byte[]>> partExprs, boolean deleteData, boolean ignoreProtection, boolean ifExists) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectException
MetaException
org.apache.thrift.TException
List<Partition> dropPartitions(String dbName, String tblName, List<ObjectPair<Integer,byte[]>> partExprs, boolean deleteData, boolean ignoreProtection, boolean ifExists, boolean needResults) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectException
MetaException
org.apache.thrift.TException
List<Partition> dropPartitions(String dbName, String tblName, List<ObjectPair<Integer,byte[]>> partExprs, PartitionDropOptions options) throws org.apache.thrift.TException
dbName
- Name of the databasetblName
- Name of the tablepartExprs
- Partition-specificationoptions
- Boolean options for dropping partitionsorg.apache.thrift.TException
- On failureboolean dropPartition(String db_name, String tbl_name, String name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectException
MetaException
org.apache.thrift.TException
void alter_partition(String dbName, String tblName, Partition newPart) throws InvalidOperationException, MetaException, org.apache.thrift.TException
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 servervoid alter_partitions(String dbName, String tblName, List<Partition> newParts) throws InvalidOperationException, MetaException, org.apache.thrift.TException
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 servervoid renamePartition(String dbname, String name, List<String> part_vals, Partition newPart) throws InvalidOperationException, MetaException, org.apache.thrift.TException
dbname
- database of the old partitionname
- table name of the old partitionpart_vals
- values of the old partitionnewPart
- new partitionInvalidOperationException
- if srcFs and destFs are differentMetaException
- if error in updating metadataorg.apache.thrift.TException
- if error in communicating with metastore serverList<FieldSchema> getFields(String db, String tableName) throws MetaException, org.apache.thrift.TException, UnknownTableException, UnknownDBException
db
- tableName
- UnknownTableException
UnknownDBException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.Iface.get_fields(java.lang.String,
java.lang.String)
List<FieldSchema> getSchema(String db, String tableName) throws MetaException, org.apache.thrift.TException, UnknownTableException, UnknownDBException
db
- tableName
- UnknownTableException
UnknownDBException
MetaException
org.apache.thrift.TException
ThriftHiveMetastore.Iface.get_schema(java.lang.String,
java.lang.String)
String getConfigValue(String name, String defaultValue) throws org.apache.thrift.TException, ConfigValSecurityException
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
List<String> partitionNameToVals(String name) throws MetaException, org.apache.thrift.TException
name
- the partition name e.g. ("ds=2010-03-03/hr=12")MetaException
org.apache.thrift.TException
Map<String,String> partitionNameToSpec(String name) throws MetaException, org.apache.thrift.TException
name
- the partition name e.g. ("ds=2010-03-03/hr=12")MetaException
org.apache.thrift.TException
void createIndex(Index index, Table indexTable) throws InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException, AlreadyExistsException
index
- the index objectInvalidObjectException
MetaException
NoSuchObjectException
org.apache.thrift.TException
AlreadyExistsException
void alter_index(String dbName, String tblName, String indexName, Index index) throws InvalidOperationException, MetaException, org.apache.thrift.TException
InvalidOperationException
MetaException
org.apache.thrift.TException
Index getIndex(String dbName, String tblName, String indexName) throws MetaException, UnknownTableException, NoSuchObjectException, org.apache.thrift.TException
dbName
- tblName
- indexName
- MetaException
UnknownTableException
NoSuchObjectException
org.apache.thrift.TException
List<Index> listIndexes(String db_name, String tbl_name, short max) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
db_name
- tbl_name
- max
- NoSuchObjectException
MetaException
org.apache.thrift.TException
List<String> listIndexNames(String db_name, String tbl_name, short max) throws MetaException, org.apache.thrift.TException
db_name
- tbl_name
- max
- MetaException
org.apache.thrift.TException
boolean dropIndex(String db_name, String tbl_name, String name, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
db_name
- tbl_name
- name
- index namedeleteData
- NoSuchObjectException
MetaException
org.apache.thrift.TException
boolean updateTableColumnStatistics(ColumnStatistics statsObj) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException, InvalidInputException
statsObj
- NoSuchObjectException
InvalidObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
boolean updatePartitionColumnStatistics(ColumnStatistics statsObj) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException, InvalidInputException
statsObj
- NoSuchObjectException
InvalidObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
List<ColumnStatisticsObj> getTableColumnStatistics(String dbName, String tableName, List<String> colNames) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectException
MetaException
org.apache.thrift.TException
Map<String,List<ColumnStatisticsObj>> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNames, List<String> colNames) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectException
MetaException
org.apache.thrift.TException
boolean deletePartitionColumnStatistics(String dbName, String tableName, String partName, String colName) throws NoSuchObjectException, MetaException, InvalidObjectException, org.apache.thrift.TException, InvalidInputException
dbName
- tableName
- partName
- colName
- NoSuchObjectException
InvalidObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
boolean deleteTableColumnStatistics(String dbName, String tableName, String colName) throws NoSuchObjectException, MetaException, InvalidObjectException, org.apache.thrift.TException, InvalidInputException
dbName
- tableName
- colName
- NoSuchObjectException
MetaException
InvalidObjectException
org.apache.thrift.TException
InvalidInputException
boolean create_role(Role role) throws MetaException, org.apache.thrift.TException
role
- role objectMetaException
org.apache.thrift.TException
boolean drop_role(String role_name) throws MetaException, org.apache.thrift.TException
role_name
- role nameMetaException
org.apache.thrift.TException
List<String> listRoleNames() throws MetaException, org.apache.thrift.TException
org.apache.thrift.TException
MetaException
boolean grant_role(String role_name, String user_name, PrincipalType principalType, String grantor, PrincipalType grantorType, boolean grantOption) throws MetaException, org.apache.thrift.TException
role_name
- user_name
- principalType
- grantor
- grantorType
- grantOption
- MetaException
org.apache.thrift.TException
boolean revoke_role(String role_name, String user_name, PrincipalType principalType, boolean grantOption) throws MetaException, org.apache.thrift.TException
role_name
- role nameuser_name
- user nameprincipalType
- MetaException
org.apache.thrift.TException
List<Role> list_roles(String principalName, PrincipalType principalType) throws MetaException, org.apache.thrift.TException
principalName
- principalType
- MetaException
org.apache.thrift.TException
PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List<String> group_names) throws MetaException, org.apache.thrift.TException
hiveObject
- user_name
- group_names
- MetaException
org.apache.thrift.TException
List<HiveObjectPrivilege> list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, org.apache.thrift.TException
principal_name
- principal_type
- hiveObject
- MetaException
org.apache.thrift.TException
boolean grant_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException
privileges
- MetaException
org.apache.thrift.TException
boolean revoke_privileges(PrivilegeBag privileges, boolean grantOption) throws MetaException, org.apache.thrift.TException
privileges
- MetaException
org.apache.thrift.TException
String getDelegationToken(String owner, String renewerKerberosPrincipalName) throws MetaException, org.apache.thrift.TException
owner
- the intended owner for the tokenrenewerKerberosPrincipalName
- MetaException
org.apache.thrift.TException
long renewDelegationToken(String tokenStrForm) throws MetaException, org.apache.thrift.TException
tokenStrForm
- MetaException
org.apache.thrift.TException
void cancelDelegationToken(String tokenStrForm) throws MetaException, org.apache.thrift.TException
tokenStrForm
- MetaException
org.apache.thrift.TException
String getTokenStrForm() throws IOException
IOException
void createFunction(Function func) throws InvalidObjectException, MetaException, org.apache.thrift.TException
InvalidObjectException
MetaException
org.apache.thrift.TException
void alterFunction(String dbName, String funcName, Function newFunction) throws InvalidObjectException, MetaException, org.apache.thrift.TException
InvalidObjectException
MetaException
org.apache.thrift.TException
void dropFunction(String dbName, String funcName) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException
MetaException
NoSuchObjectException
InvalidObjectException
InvalidInputException
org.apache.thrift.TException
Function getFunction(String dbName, String funcName) throws MetaException, org.apache.thrift.TException
MetaException
org.apache.thrift.TException
List<String> getFunctions(String dbName, String pattern) throws MetaException, org.apache.thrift.TException
MetaException
org.apache.thrift.TException
ValidTxnList getValidTxns() throws org.apache.thrift.TException
org.apache.thrift.TException
ValidTxnList getValidTxns(long currentTxn) throws org.apache.thrift.TException
currentTxn
- The current transaction of the caller. This will be removed from the
exceptions list so that the caller sees records from his own transaction.org.apache.thrift.TException
long openTxn(String user) throws org.apache.thrift.TException
user
- User who is opening this transaction. This is the Hive user,
not necessarily the OS user. It is assumed that this user has already been
authenticated and authorized at this point.org.apache.thrift.TException
OpenTxnsResponse openTxns(String user, int numTxns) throws org.apache.thrift.TException
Increasing the number of transactions requested in the batch will allow applications that stream data into Hive to place more commits in a single file, thus reducing load on the namenode and making reads of the data more efficient. However, opening more transactions in a batch will also result in readers needing to keep a larger list of open transactions to ignore, potentially slowing their reads. Users will need to test in their system to understand the optimal number of transactions to request in a batch.
user
- User who is opening this transaction. This is the Hive user,
not necessarily the OS user. It is assumed that this user has already been
authenticated and authorized at this point.numTxns
- number of requested transactions to openorg.apache.thrift.TException
void rollbackTxn(long txnid) throws NoSuchTxnException, org.apache.thrift.TException
txnid
- id of transaction to be rolled back.NoSuchTxnException
- if the requested transaction does not exist.
Note that this can result from the transaction having timed out and been
deleted.org.apache.thrift.TException
void commitTxn(long txnid) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException
txnid
- id of transaction to be committed.NoSuchTxnException
- if the requested transaction does not exist.
This can result fro the transaction having timed out and been deleted by
the compactor.TxnAbortedException
- if the requested transaction has been
aborted. This can result from the transaction timing out.org.apache.thrift.TException
GetOpenTxnsInfoResponse showTxns() throws org.apache.thrift.TException
getValidTxns()
.org.apache.thrift.TException
LockResponse lock(LockRequest request) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException
If the operation requires a transaction (INSERT, UPDATE, or DELETE) that transaction id must be provided as part this lock request. All locks associated with a transaction will be released when that transaction is committed or rolled back.
*Once a lock is acquired, heartbeat(long, long)
must be called
on a regular basis to avoid the lock being timed out by the system.
request
- The lock request. LockRequestBuilder
can be used
construct this request.checkLock(long)
before proceeding. All components of the lock
will have the same state.NoSuchTxnException
- if the requested transaction does not exist.
This can result fro the transaction having timed out and been deleted by
the compactor.TxnAbortedException
- if the requested transaction has been
aborted. This can result from the transaction timing out.org.apache.thrift.TException
LockResponse checkLock(long lockid) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException
lock(org.apache.hadoop.hive.metastore.api.LockRequest)
call.
Once a lock is acquired, heartbeat(long, long)
must be called
on a regular basis to avoid the lock being timed out by the system.lockid
- lock id returned by lock().NoSuchTxnException
- if the requested transaction does not exist.
This can result fro the transaction having timed out and been deleted by
the compactor.TxnAbortedException
- if the requested transaction has been
aborted. This can result from the transaction timing out.NoSuchLockException
- if the requested lockid does not exist.
This can result from the lock timing out and being unlocked by the system.org.apache.thrift.TException
void unlock(long lockid) throws NoSuchLockException, TxnOpenException, org.apache.thrift.TException
lockid
- lock id returned by
lock(org.apache.hadoop.hive.metastore.api.LockRequest)
NoSuchLockException
- if the requested lockid does not exist.
This can result from the lock timing out and being unlocked by the system.TxnOpenException
- if the locks are are associated with a
transaction.org.apache.thrift.TException
ShowLocksResponse showLocks() throws org.apache.thrift.TException
org.apache.thrift.TException
void heartbeat(long txnid, long lockid) throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException
txnid
- the id of the open transaction. If no transaction is open
(it is a DDL or query) then this can be set to 0.lockid
- the id of the locks obtained. If no locks have been
obtained then this can be set to 0.NoSuchTxnException
- if the requested transaction does not exist.
This can result fro the transaction having timed out and been deleted by
the compactor.TxnAbortedException
- if the requested transaction has been
aborted. This can result from the transaction timing out.NoSuchLockException
- if the requested lockid does not exist.
This can result from the lock timing out and being unlocked by the system.org.apache.thrift.TException
HeartbeatTxnRangeResponse heartbeatTxnRange(long min, long max) throws org.apache.thrift.TException
heartbeat(long, long)
.min
- minimum transaction id to heartbeat, inclusivemax
- maximum transaction id to heartbeat, inclusiveorg.apache.thrift.TException
void compact(String dbname, String tableName, String partitionName, CompactionType type) throws org.apache.thrift.TException
dbname
- Name of the database the table is in. If null, this will be assumed to be
'default'.tableName
- Name of the table to be compacted. This cannot be null. If partitionName
is null, this must be a non-partitioned table.partitionName
- Name of the partition to be compactedtype
- Whether this is a major or minor compaction.org.apache.thrift.TException
ShowCompactResponse showCompactions() throws org.apache.thrift.TException
org.apache.thrift.TException
void addDynamicPartitions(long txnId, String dbName, String tableName, List<String> partNames) throws org.apache.thrift.TException
txnId
- id of the transactiondbName
- database nametableName
- table namepartNames
- partition name, as constructed by Warehouse.makePartNameorg.apache.thrift.TException
@InterfaceAudience.LimitedPrivate(value="HCatalog") NotificationEventResponse getNextNotification(long lastEventId, int maxEvents, IMetaStoreClient.NotificationFilter filter) throws org.apache.thrift.TException
lastEventId
- The last event id that was consumed by this reader. The returned
notifications will start at the next eventId available after this eventId.maxEvents
- Maximum number of events to return. If < 1, then all available events will
be returned.filter
- User provided filter to remove unwanted events. If null, all events will be
returned.org.apache.thrift.TException
@InterfaceAudience.LimitedPrivate(value="HCatalog") CurrentNotificationEventId getCurrentNotificationEventId() throws org.apache.thrift.TException
org.apache.thrift.TException
@InterfaceAudience.LimitedPrivate(value="Apache Hive, HCatalog") FireEventResponse fireListenerEvent(FireEventRequest request) throws org.apache.thrift.TException
request
- org.apache.thrift.TException
GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest getPrincRoleReq) throws MetaException, org.apache.thrift.TException
getPrincRoleReq
- MetaException
org.apache.thrift.TException
GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest getRolePrincReq) throws MetaException, org.apache.thrift.TException
getRolePrincReq
- MetaException
org.apache.thrift.TException
AggrStats getAggrColStatsFor(String dbName, String tblName, List<String> colNames, List<String> partName) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectException
MetaException
org.apache.thrift.TException
boolean setPartitionColumnStatistics(SetPartitionsStatsRequest request) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException, InvalidInputException
NoSuchObjectException
InvalidObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
Copyright © 2017 The Apache Software Foundation. All rights reserved.