@InterfaceAudience.Public @InterfaceStability.Evolving public class HiveMetaStoreClient extends Object implements IMetaStoreClient, AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
HiveMetaStoreClient.MetastoreMapIterable<K,V> |
IMetaStoreClient.IncompatibleMetastoreException, IMetaStoreClient.NotificationFilter| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.conf.Configuration |
conf |
protected static org.slf4j.Logger |
LOG |
static String |
MANUALLY_INITIATED_COMPACTION |
static String |
RENAME_PARTITION_MAKE_COPY |
static String |
SKIP_DROP_PARTITION |
static ClientCapabilities |
TEST_VERSION |
static String |
TRUNCATE_SKIP_DATA_DELETION |
static ClientCapabilities |
VERSION
Capabilities of the current client.
|
| Constructor and Description |
|---|
HiveMetaStoreClient(org.apache.hadoop.conf.Configuration conf) |
HiveMetaStoreClient(org.apache.hadoop.conf.Configuration conf,
HiveMetaHookLoader hookLoader) |
HiveMetaStoreClient(org.apache.hadoop.conf.Configuration conf,
HiveMetaHookLoader hookLoader,
Boolean allowEmbedded) |
| Modifier and Type | Method and Description |
|---|---|
AbortCompactResponse |
abortCompactions(AbortCompactionRequest request) |
void |
abortTxns(AbortTxnsRequest abortTxnsRequest)
Abort a list of transactions with additional information of
errorcodes as defined in TxnErrorMsg.java.
|
void |
abortTxns(List<Long> txnids)
Abort a list of transactions.
|
Partition |
add_partition(Partition new_part)
Add a partition to the table.
|
Partition |
add_partition(Partition new_part,
EnvironmentContext envContext) |
int |
add_partitions_pspec(PartitionSpecProxy partitionSpec)
Add a partitions using a spec proxy.
|
int |
add_partitions(List<Partition> new_parts)
Add partitions to the table.
|
List<Partition> |
add_partitions(List<Partition> parts,
boolean ifNotExists,
boolean needResults)
Add partitions to the table.
|
void |
addCheckConstraint(List<SQLCheckConstraint> checkConstraints) |
void |
addDefaultConstraint(List<SQLDefaultConstraint> defaultConstraints) |
void |
addDynamicPartitions(long txnId,
long writeId,
String dbName,
String tableName,
List<String> partNames)
Deprecated.
|
void |
addDynamicPartitions(long txnId,
long writeId,
String dbName,
String tableName,
List<String> partNames,
DataOperationType operationType)
Send a list of partitions to the metastore to indicate which partitions were loaded
dynamically.
|
void |
addForeignKey(List<SQLForeignKey> foreignKeyCols)
Add a foreign key
|
int |
addMasterKey(String key) |
void |
addNotNullConstraint(List<SQLNotNullConstraint> notNullConstraintCols)
Add a not null constraint
|
void |
addPackage(AddPackageRequest request) |
void |
addPrimaryKey(List<SQLPrimaryKey> primaryKeyCols)
Add a primary key.
|
void |
addReplicationMetrics(ReplicationMetricList replicationMetricList)
Adds replication metrics for the replication policies.
|
void |
addRuntimeStat(RuntimeStat stat)
Adds a RuntimeStat for metastore persistence.
|
void |
addSchemaVersion(SchemaVersion schemaVersion)
Add a new version to an existing schema.
|
void |
addSerDe(SerDeInfo serDeInfo)
Add a serde.
|
boolean |
addToken(String tokenIdentifier,
String delegationToken) |
void |
addUniqueConstraint(List<SQLUniqueConstraint> uniqueConstraintCols)
Add a unique constraint
|
void |
addWriteIdsToMinHistory(long txnId,
Map<String,Long> writeIds)
Persists minOpenWriteId list to identify obsolete directories eligible for cleanup
|
void |
addWriteNotificationLog(WriteNotificationLogRequest rqst)
Add a event related to write operations in an ACID table.
|
void |
addWriteNotificationLogInBatch(WriteNotificationLogBatchRequest rqst)
Add a batch of event related to write operations in an ACID table.
|
long |
allocateTableWriteId(long txnId,
String dbName,
String tableName)
Allocate a per table write ID and associate it with the given transaction.
|
long |
allocateTableWriteId(long txnId,
String dbName,
String tableName,
boolean shouldRealloc)
Allocate a per table write ID and associate it with the given transaction.
|
List<TxnToWriteId> |
allocateTableWriteIdsBatch(List<Long> txnIds,
String dbName,
String tableName)
Allocate a per table write ID and associate it with the given transaction.
|
void |
alter_partition(String dbName,
String tblName,
Partition newPart)
updates a partition to new partition
|
void |
alter_partition(String dbName,
String tblName,
Partition newPart,
EnvironmentContext environmentContext)
updates a partition to new partition
|
void |
alter_partition(String catName,
String dbName,
String tblName,
Partition newPart,
EnvironmentContext environmentContext)
updates a partition to new partition
|
void |
alter_partition(String catName,
String dbName,
String tblName,
Partition newPart,
EnvironmentContext environmentContext,
String writeIdList) |
void |
alter_partitions(String dbName,
String tblName,
List<Partition> newParts)
Deprecated.
|
void |
alter_partitions(String dbName,
String tblName,
List<Partition> newParts,
EnvironmentContext environmentContext)
updates a list of partitions
|
void |
alter_partitions(String dbName,
String tblName,
List<Partition> newParts,
EnvironmentContext environmentContext,
String writeIdList,
long writeId) |
void |
alter_partitions(String catName,
String dbName,
String tblName,
List<Partition> newParts,
EnvironmentContext environmentContext,
String writeIdList,
long writeId)
updates a list of partitions
|
void |
alter_table_with_environmentContext(String dbname,
String tbl_name,
Table new_tbl,
EnvironmentContext envContext)
Alter a table.
|
void |
alter_table(String catName,
String dbName,
String tblName,
Table newTable,
EnvironmentContext envContext)
Alter a table.
|
void |
alter_table(String catName,
String dbName,
String tbl_name,
Table new_tbl,
EnvironmentContext envContext,
String validWriteIds) |
void |
alter_table(String dbname,
String tbl_name,
Table new_tbl)
Alter a table
|
void |
alter_table(String defaultDatabaseName,
String tblName,
Table table,
boolean cascade) |
void |
alterCatalog(String catalogName,
Catalog newCatalog)
Alter an existing catalog.
|
void |
alterDatabase(String dbName,
Database db)
Alter a database.
|
void |
alterDatabase(String catName,
String dbName,
Database newDb)
Alter a database.
|
void |
alterDataConnector(String name,
DataConnector connector)
Alter an existing dataconnector.
|
void |
alterFunction(String dbName,
String funcName,
Function newFunction)
Alter a function.
|
void |
alterFunction(String catName,
String dbName,
String funcName,
Function newFunction)
Alter a function.
|
void |
alterISchema(String catName,
String dbName,
String schemaName,
ISchema newSchema)
Alter an existing schema.
|
WMFullResourcePlan |
alterResourcePlan(String resourcePlanName,
String ns,
WMNullableResourcePlan resourcePlan,
boolean canActivateDisabled,
boolean isForceDeactivate,
boolean isReplace) |
void |
alterWMPool(WMNullablePool pool,
String poolPath) |
void |
alterWMTrigger(WMTrigger trigger) |
Partition |
appendPartition(String db_name,
String table_name,
List<String> part_vals)
/**
Add a partition to a table and get back the resulting Partition object.
|
Partition |
appendPartition(String dbName,
String tableName,
List<String> partVals,
EnvironmentContext ec)
Deprecated.
|
Partition |
appendPartition(String dbName,
String tableName,
String partName)
Add a partition to a table and get back the resulting Partition object.
|
Partition |
appendPartition(String catName,
String dbName,
String tableName,
List<String> partVals)
Add a partition to a table and get back the resulting Partition object.
|
Partition |
appendPartition(String catName,
String dbName,
String tableName,
String name)
Add a partition to a table and get back the resulting Partition object.
|
Partition |
appendPartitionByName(String dbName,
String tableName,
String partName) |
Partition |
appendPartitionByName(String dbName,
String tableName,
String partName,
EnvironmentContext envContext) |
protected PartitionsByExprRequest |
buildPartitionsByExprRequest(String catName,
String db_name,
String tbl_name,
byte[] expr,
String default_partition_name,
int max_parts) |
boolean |
cacheFileMetadata(String dbName,
String tableName,
String partName,
boolean allParts) |
void |
cancelDelegationToken(String tokenStrForm) |
LockResponse |
checkLock(long lockid)
Check the status of a set of locks requested via a
IMetaStoreClient.lock(org.apache.hadoop.hive.metastore.api.LockRequest) call. |
void |
clearFileMetadata(List<Long> fileIds)
Cleares the file metadata cache for respective file IDs.
|
void |
close()
close connection to meta store
|
void |
commitTxn(CommitTxnRequest rqst)
Commit a transaction.
|
void |
commitTxn(long txnid)
Commit a transaction.
|
void |
commitTxnWithKeyValue(long txnid,
long tableId,
String key,
String value)
Like commitTxn but it will atomically store as well a key and a value.
|
void |
compact(String dbname,
String tableName,
String partitionName,
CompactionType type)
Deprecated.
|
void |
compact(String dbname,
String tableName,
String partitionName,
CompactionType type,
Map<String,String> tblproperties)
Deprecated.
|
CompactionResponse |
compact2(CompactionRequest request)
Send a request to compact a table or partition.
|
CompactionResponse |
compact2(String dbname,
String tableName,
String partitionName,
CompactionType type,
Map<String,String> tblproperties)
Send a request to compact a table or partition.
|
boolean |
create_role(Role role) |
protected void |
create_table(CreateTableRequest request) |
void |
createCatalog(Catalog catalog)
Create a new catalog.
|
void |
createDatabase(Database db)
Create a new Database
|
void |
createDataConnector(DataConnector connector)
Create a new DataConnector // TODO
|
void |
createFunction(Function func)
Create a new function.
|
protected org.apache.http.impl.client.HttpClientBuilder |
createHttpClientBuilder() |
void |
createISchema(ISchema schema)
Create a new schema.
|
void |
createOrDropTriggerToPoolMapping(String resourcePlanName,
String triggerName,
String poolPath,
boolean shouldDrop,
String ns) |
void |
createOrUpdateWMMapping(WMMapping mapping,
boolean isUpdate) |
void |
createResourcePlan(WMResourcePlan resourcePlan,
String copyFromName) |
void |
createStoredProcedure(StoredProcedure proc) |
void |
createTable(CreateTableRequest request) |
void |
createTable(Table tbl) |
void |
createTable(Table tbl,
EnvironmentContext envContext) |
void |
createTableWithConstraints(Table tbl,
List<SQLPrimaryKey> primaryKeys,
List<SQLForeignKey> foreignKeys,
List<SQLUniqueConstraint> uniqueConstraints,
List<SQLNotNullConstraint> notNullConstraints,
List<SQLDefaultConstraint> defaultConstraints,
List<SQLCheckConstraint> checkConstraints) |
boolean |
createType(Type type) |
void |
createWMPool(WMPool pool) |
void |
createWMTrigger(WMTrigger trigger) |
protected Partition |
deepCopy(Partition partition) |
protected PrincipalPrivilegeSet |
deepCopy(PrincipalPrivilegeSet pps) |
protected Table |
deepCopy(Table table) |
protected List<FieldSchema> |
deepCopyFieldSchemas(List<FieldSchema> schemas) |
protected List<Partition> |
deepCopyPartitions(List<Partition> partitions) |
boolean |
deletePartitionColumnStatistics(String dbName,
String tableName,
String partName,
String colName,
String engine)
Delete partition level column statistics given dbName, tableName, partName and colName, or
all columns in a partition.
|
boolean |
deletePartitionColumnStatistics(String catName,
String dbName,
String tableName,
String partName,
String colName,
String engine)
Delete partition level column statistics given dbName, tableName, partName and colName, or
all columns in a partition.
|
boolean |
deleteTableColumnStatistics(String dbName,
String tableName,
String colName,
String engine)
Delete table level column statistics given dbName, tableName and colName, or all columns in
a table.
|
boolean |
deleteTableColumnStatistics(String catName,
String dbName,
String tableName,
String colName,
String engine)
Delete table level column statistics given dbName, tableName and colName, or all columns in
a table.
|
boolean |
drop_role(String roleName) |
protected void |
drop_table_with_environment_context(String catName,
String dbname,
String name,
boolean deleteData,
EnvironmentContext envContext) |
void |
dropCatalog(String catName)
Drop a catalog.
|
void |
dropConstraint(String dbName,
String tableName,
String constraintName)
Drop a constraint.
|
void |
dropConstraint(String catName,
String dbName,
String tableName,
String constraintName)
Drop a constraint.
|
void |
dropDatabase(DropDatabaseRequest req) |
void |
dropDatabase(String name)
Drop a database.
|
void |
dropDatabase(String name,
boolean deleteData,
boolean ignoreUnknownDb)
Drop a database.
|
void |
dropDatabase(String name,
boolean deleteData,
boolean ignoreUnknownDb,
boolean cascade)
Drop a database.
|
void |
dropDataConnector(String name,
boolean ifNotExists,
boolean checkReferences)
Drop an existing DataConnector by name // TODO
|
void |
dropFunction(String dbName,
String funcName)
Drop a function.
|
void |
dropFunction(String catName,
String dbName,
String funcName)
Drop a function.
|
void |
dropISchema(String catName,
String dbName,
String name)
Drop an existing schema.
|
void |
dropPackage(DropPackageRequest request) |
boolean |
dropPartition(String dbName,
String tableName,
List<String> partVals)
Deprecated.
|
boolean |
dropPartition(String db_name,
String tbl_name,
List<String> part_vals,
boolean deleteData)
Drop a partition.
|
boolean |
dropPartition(String db_name,
String tbl_name,
List<String> part_vals,
EnvironmentContext env_context)
Deprecated.
|
boolean |
dropPartition(String db_name,
String tbl_name,
List<String> part_vals,
PartitionDropOptions options)
Drop a partition with the option to purge the partition data directly,
rather than to move data to trash.
|
boolean |
dropPartition(String dbName,
String tableName,
String partName,
boolean deleteData)
Drop a partition.
|
boolean |
dropPartition(String dbName,
String tableName,
String partName,
boolean dropData,
EnvironmentContext ec)
Deprecated.
|
boolean |
dropPartition(String catName,
String db_name,
String tbl_name,
List<String> part_vals,
boolean deleteData)
Drop a partition.
|
boolean |
dropPartition(String catName,
String db_name,
String tbl_name,
List<String> part_vals,
PartitionDropOptions options)
Drop a partition with the option to purge the partition data directly,
rather than to move data to trash.
|
boolean |
dropPartition(String catName,
String db_name,
String tbl_name,
String name,
boolean deleteData)
Drop a partition.
|
boolean |
dropPartitionByName(String dbName,
String tableName,
String partName,
boolean deleteData) |
boolean |
dropPartitionByName(String dbName,
String tableName,
String partName,
boolean deleteData,
EnvironmentContext envContext) |
List<Partition> |
dropPartitions(String dbName,
String tblName,
List<org.apache.commons.lang3.tuple.Pair<Integer,byte[]>> partExprs,
boolean deleteData,
boolean ifExists)
Drop partitions based on an expression.
|
List<Partition> |
dropPartitions(String dbName,
String tblName,
List<org.apache.commons.lang3.tuple.Pair<Integer,byte[]>> partExprs,
boolean deleteData,
boolean ifExists,
boolean needResult)
Drop partitions based on an expression.
|
List<Partition> |
dropPartitions(String dbName,
String tblName,
List<org.apache.commons.lang3.tuple.Pair<Integer,byte[]>> partExprs,
PartitionDropOptions options)
Generalization of dropPartitions(),
|
List<Partition> |
dropPartitions(String catName,
String dbName,
String tblName,
List<org.apache.commons.lang3.tuple.Pair<Integer,byte[]>> partExprs,
PartitionDropOptions options)
Generalization of dropPartitions(),
|
void |
dropResourcePlan(String resourcePlanName,
String ns) |
void |
dropSchemaVersion(String catName,
String dbName,
String schemaName,
int version)
Drop a version of a schema.
|
void |
dropStoredProcedure(StoredProcedureRequest request) |
void |
dropTable(String dbname,
String name)
Drop the table.
|
void |
dropTable(String dbname,
String name,
boolean deleteData,
boolean ignoreUnknownTab)
Drop the table.
|
void |
dropTable(String dbname,
String name,
boolean deleteData,
boolean ignoreUnknownTab,
boolean ifPurge)
Drop the table.
|
void |
dropTable(String catName,
String dbName,
String tableName,
boolean deleteData,
boolean ignoreUnknownTable,
boolean ifPurge)
Drop a table.
|
void |
dropTable(String catName,
String dbname,
String name,
boolean deleteData,
boolean ignoreUnknownTab,
EnvironmentContext envContext)
Drop the table and choose whether to: delete the underlying table data;
throw if the table doesn't exist; save the data in the trash.
|
void |
dropTable(Table tbl,
boolean deleteData,
boolean ignoreUnknownTbl,
boolean ifPurge) |
boolean |
dropType(String type) |
void |
dropWMMapping(WMMapping mapping) |
void |
dropWMPool(String resourcePlanName,
String poolPath,
String ns) |
void |
dropWMTrigger(String resourcePlanName,
String triggerName,
String ns) |
Partition |
exchange_partition(Map<String,String> partitionSpecs,
String sourceDb,
String sourceTable,
String destDb,
String destinationTableName)
Exchange the partition between two tables
|
Partition |
exchange_partition(Map<String,String> partitionSpecs,
String sourceCat,
String sourceDb,
String sourceTable,
String destCat,
String destDb,
String destTableName)
Move a partition from one table to another
|
List<Partition> |
exchange_partitions(Map<String,String> partitionSpecs,
String sourceDb,
String sourceTable,
String destDb,
String destinationTableName)
Exchange the partitions between two tables
|
List<Partition> |
exchange_partitions(Map<String,String> partitionSpecs,
String sourceCat,
String sourceDb,
String sourceTable,
String destCat,
String destDb,
String destTableName)
With the one partitionSpecs to exchange, multiple partitions could be exchanged.
|
List<String> |
findColumnsWithStats(CompactionInfoStruct cr)
Get columns.
|
OptionalCompactionInfoStruct |
findNextCompact(FindNextCompactRequest rqst)
Get the next compaction job to do.
|
OptionalCompactionInfoStruct |
findNextCompact(String workerId)
Deprecated.
|
Package |
findPackage(GetPackageRequest request) |
FireEventResponse |
fireListenerEvent(FireEventRequest rqst)
Request that the metastore fire an event.
|
void |
flushCache()
Flush any catalog objects held by the metastore implementation.
|
GetPrincipalsInRoleResponse |
get_principals_in_role(GetPrincipalsInRoleRequest req)
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 userName,
List<String> groupNames)
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
|
WMFullResourcePlan |
getActiveResourcePlan(String ns) |
AggrStats |
getAggrColStatsFor(String dbName,
String tblName,
List<String> colNames,
List<String> partNames,
String engine)
Get aggregated column stats for a set of partitions.
|
AggrStats |
getAggrColStatsFor(String dbName,
String tblName,
List<String> colNames,
List<String> partNames,
String engine,
String writeIdList) |
AggrStats |
getAggrColStatsFor(String catName,
String dbName,
String tblName,
List<String> colNames,
List<String> partNames,
String engine)
Get aggregated column stats for a set of partitions.
|
AggrStats |
getAggrColStatsFor(String catName,
String dbName,
String tblName,
List<String> colNames,
List<String> partNames,
String engine,
String writeIdList) |
protected AggrStats |
getAggrStatsForInternal(PartitionsStatsRequest req) |
List<String> |
getAllDatabases()
Get the names of all databases in the MetaStore.
|
List<String> |
getAllDatabases(String catName)
Get all databases in a catalog.
|
List<String> |
getAllDataConnectorNames()
Get the names of all dataconnectors in the MetaStore.
|
GetAllFunctionsResponse |
getAllFunctions()
Get all functions in the default catalog.
|
List<Table> |
getAllMaterializedViewObjectsForRewriting()
Retrieve all materialized views that have rewriting enabled.
|
List<WMResourcePlan> |
getAllResourcePlans(String ns) |
List<String> |
getAllStoredProcedures(ListStoredProcedureRequest request) |
SQLAllTableConstraints |
getAllTableConstraints(AllTableConstraintsRequest req)
Api to fetch all table constraints at once
|
List<String> |
getAllTables(String dbname)
Get the names of all tables in the specified database.
|
List<String> |
getAllTables(String catName,
String dbName)
Get the names of all tables in the specified database.
|
List<String> |
getAllTokenIdentifiers() |
List<WriteEventInfo> |
getAllWriteEventInfo(GetAllWriteEventInfoRequest request)
Get acid write events of a specific transaction.
|
Catalog |
getCatalog(String catName)
Get a catalog object.
|
List<String> |
getCatalogs()
Get a list of all catalogs known to the system.
|
List<SQLCheckConstraint> |
getCheckConstraints(CheckConstraintsRequest req) |
String |
getConfigValue(String name,
String defaultValue) |
protected String |
getConfigValueInternal(String name,
String defaultValue) |
CurrentNotificationEventId |
getCurrentNotificationEventId()
Get the last used notification event id.
|
Database |
getDatabase(String name)
Get a Database Object in the default catalog
|
Database |
getDatabase(String catalogName,
String databaseName)
Get a database.
|
protected Database |
getDatabaseInternal(GetDatabaseRequest request) |
List<String> |
getDatabases(String databasePattern)
Get the names of all databases in the default catalog that match the given pattern.
|
List<String> |
getDatabases(String catName,
String databasePattern)
Get all databases in a catalog whose names match a pattern.
|
DataConnector |
getDataConnector(String name)
Get the dataconnector by name
|
List<SQLDefaultConstraint> |
getDefaultConstraints(DefaultConstraintsRequest req) |
String |
getDelegationToken(String renewerKerberosPrincipalName) |
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)
Get schema for a table, excluding the partition columns.
|
List<FieldSchema> |
getFields(String catName,
String db,
String tableName)
Get schema for a table, excluding the partition columns.
|
GetFieldsResponse |
getFieldsRequest(GetFieldsRequest req)
Get schema for a table, excluding the partition columns.
|
Iterable<Map.Entry<Long,ByteBuffer>> |
getFileMetadata(List<Long> fileIds)
Gets file metadata, as cached by metastore, for respective file IDs.
|
Iterable<Map.Entry<Long,MetadataPpdResult>> |
getFileMetadataBySarg(List<Long> fileIds,
ByteBuffer sarg,
boolean doGetFooters) |
List<SQLForeignKey> |
getForeignKeys(ForeignKeysRequest req)
Get a foreign key for a table.
|
protected ForeignKeysResponse |
getForeignKeysInternal(ForeignKeysRequest req) |
Function |
getFunction(String dbName,
String funcName)
Get a function.
|
Function |
getFunction(String catName,
String dbName,
String funcName)
Get a function.
|
List<String> |
getFunctions(String dbName,
String pattern)
Get all functions matching a pattern
|
List<String> |
getFunctions(String catName,
String dbName,
String pattern)
Get all functions matching a pattern
|
ISchema |
getISchema(String catName,
String dbName,
String name)
Fetch a schema.
|
GetLatestCommittedCompactionInfoResponse |
getLatestCommittedCompactionInfo(GetLatestCommittedCompactionInfoRequest request)
Get one latest record of SUCCEEDED or READY_FOR_CLEANING compaction for a table/partition.
|
long |
getLatestTxnIdInConflict(long txnId)
Checks if there is a conflicting transaction
|
String[] |
getMasterKeys() |
Materialization |
getMaterializationInvalidationInfo(CreationMetadata cm,
String validTxnList)
Returns the invalidation information for the materialized views given as input.
|
List<String> |
getMaterializedViewsForRewriting(String dbName)
Get materialized views that have rewriting enabled.
|
List<String> |
getMaterializedViewsForRewriting(String catName,
String dbname)
Get materialized views that have rewriting enabled.
|
long |
getMaxAllocatedWriteId(String dbName,
String tableName)
Get the maximum allocated writeId for the given table
|
String |
getMetaConf(String key)
get current meta variable
|
String |
getMetastoreDbUuid()
Gets the unique id of the backing database instance used for storing metadata
|
NotificationEventResponse |
getNextNotification(long lastEventId,
int maxEvents,
IMetaStoreClient.NotificationFilter filter)
Get the next set of notifications from the database.
|
NotificationEventResponse |
getNextNotification(NotificationEventRequest request,
boolean allowGapsInEventIds,
IMetaStoreClient.NotificationFilter filter)
Get the next set of notifications from the database.
|
NotificationEventsCountResponse |
getNotificationEventsCount(NotificationEventsCountRequest rqst)
Get the number of events from given eventID for the input database.
|
List<SQLNotNullConstraint> |
getNotNullConstraints(NotNullConstraintsRequest req)
Get a not null constraint for a table.
|
protected NotNullConstraintsResponse |
getNotNullConstraintsInternal(NotNullConstraintsRequest req) |
int |
getNumPartitionsByFilter(String db_name,
String tbl_name,
String filter)
Get number of partitions matching specified filter
|
int |
getNumPartitionsByFilter(String catName,
String dbName,
String tableName,
String filter)
Get number of partitions matching specified filter
|
GetOpenTxnsResponse |
getOpenTxns() |
Partition |
getPartition(String db_name,
String tbl_name,
List<String> part_vals)
Get a partition.
|
Partition |
getPartition(String db,
String tableName,
String partName)
Get a Partition by name.
|
Partition |
getPartition(String catName,
String dbName,
String tblName,
List<String> partVals)
Get a partition.
|
Partition |
getPartition(String catName,
String dbName,
String tblName,
String name)
Get a Partition by name.
|
Map<String,List<ColumnStatisticsObj>> |
getPartitionColumnStatistics(String dbName,
String tableName,
List<String> partNames,
List<String> colNames,
String engine)
Get the column statistics for a set of columns in a partition.
|
Map<String,List<ColumnStatisticsObj>> |
getPartitionColumnStatistics(String dbName,
String tableName,
List<String> partNames,
List<String> colNames,
String engine,
String validWriteIdList) |
Map<String,List<ColumnStatisticsObj>> |
getPartitionColumnStatistics(String catName,
String dbName,
String tableName,
List<String> partNames,
List<String> colNames,
String engine)
Get the column statistics for a set of columns in a partition.
|
Map<String,List<ColumnStatisticsObj>> |
getPartitionColumnStatistics(String catName,
String dbName,
String tableName,
List<String> partNames,
List<String> colNames,
String engine,
String validWriteIdList) |
GetPartitionResponse |
getPartitionRequest(GetPartitionRequest req)
Get a partition.
|
protected PartitionsByExprResult |
getPartitionsByExprInternal(PartitionsByExprRequest req) |
GetPartitionsByNamesResult |
getPartitionsByNames(GetPartitionsByNamesRequest req)
Get partitions by a list of partition names.
|
List<Partition> |
getPartitionsByNames(String db_name,
String tbl_name,
List<String> part_names)
Get partitions by a list of partition names.
|
List<Partition> |
getPartitionsByNames(String catName,
String db_name,
String tbl_name,
List<String> part_names)
Deprecated.
|
protected GetPartitionsByNamesResult |
getPartitionsByNamesInternal(GetPartitionsByNamesRequest gpbnr) |
PartitionsResponse |
getPartitionsRequest(PartitionsRequest req)
Get partitions by a list of partition names.
|
protected PartitionsSpecByExprResult |
getPartitionsSpecByExprInternal(PartitionsByExprRequest req) |
GetPartitionsResponse |
getPartitionsWithSpecs(GetPartitionsRequest request)
Generic Partition request API, providing different ways of filtering and controlling output.
|
Partition |
getPartitionWithAuthInfo(String db_name,
String tbl_name,
List<String> part_vals,
String user_name,
List<String> group_names)
Get a Partition along with authorization information.
|
Partition |
getPartitionWithAuthInfo(String catName,
String dbName,
String tableName,
List<String> pvals,
String userName,
List<String> groupNames)
Get a Partition along with authorization information.
|
List<SQLPrimaryKey> |
getPrimaryKeys(PrimaryKeysRequest req)
Get a primary key for a table.
|
protected PrimaryKeysResponse |
getPrimaryKeysInternal(PrimaryKeysRequest req) |
static String[] |
getProcessorCapabilities() |
static String |
getProcessorIdentifier() |
Map<String,Map<String,String>> |
getProperties(String nameSpace,
String mapPrefix,
String mapPredicate,
String... selection)
Gets properties.
|
ReplicationMetricList |
getReplicationMetrics(GetReplicationMetricsRequest replicationMetricsRequest) |
WMFullResourcePlan |
getResourcePlan(String resourcePlanName,
String ns) |
List<RuntimeStat> |
getRuntimeStats(int maxWeight,
int maxCreateTime)
Reads runtime statistics.
|
ScheduledQuery |
getScheduledQuery(ScheduledQueryKey scheduleKey)
Returns details about a scheduled query by name.
|
List<FieldSchema> |
getSchema(String db,
String tableName)
Get schema for a table, including the partition columns.
|
List<FieldSchema> |
getSchema(String catName,
String db,
String tableName)
Get schema for a table, including the partition columns.
|
List<SchemaVersion> |
getSchemaAllVersions(String catName,
String dbName,
String schemaName)
Get all the extant versions of a schema.
|
FindSchemasByColsResp |
getSchemaByCols(FindSchemasByColsRqst rqst)
Find all schema versions that have columns that match a query.
|
SchemaVersion |
getSchemaLatestVersion(String catName,
String dbName,
String schemaName)
Get the latest version of a schema.
|
GetSchemaResponse |
getSchemaRequest(GetSchemaRequest req)
Get schema for a table, including the partition columns.
|
SchemaVersion |
getSchemaVersion(String catName,
String dbName,
String schemaName,
int version)
Get a specific version of a schema.
|
SerDeInfo |
getSerDe(String serDeName)
Fetch a serde.
|
String |
getServerVersion()
Gets the version string of the metastore server which this client is connected to
|
StoredProcedure |
getStoredProcedure(StoredProcedureRequest request) |
Table |
getTable(GetTableRequest getTableRequest) |
Table |
getTable(String dbname,
String name)
Deprecated.
use getTable(GetTableRequest getTableRequest)
|
Table |
getTable(String dbname,
String name,
boolean getColumnStats,
String engine)
Deprecated.
use getTable(GetTableRequest getTableRequest)
|
Table |
getTable(String catName,
String dbName,
String tableName)
Deprecated.
use getTable(GetTableRequest getTableRequest)
|
Table |
getTable(String catName,
String dbName,
String tableName,
boolean getColumnStats,
String engine)
Deprecated.
use getTable(GetTableRequest getTableRequest)
|
Table |
getTable(String catName,
String dbName,
String tableName,
String validWriteIdList)
Deprecated.
use getTable(GetTableRequest getTableRequest)
|
Table |
getTable(String catName,
String dbName,
String tableName,
String validWriteIdList,
boolean getColumnStats,
String engine)
Deprecated.
use getTable(GetTableRequest getTableRequest)
|
List<ColumnStatisticsObj> |
getTableColumnStatistics(String dbName,
String tableName,
List<String> colNames,
String engine)
Get the column statistics for a set of columns in a table.
|
List<ColumnStatisticsObj> |
getTableColumnStatistics(String dbName,
String tableName,
List<String> colNames,
String engine,
String validWriteIdList) |
List<ColumnStatisticsObj> |
getTableColumnStatistics(String catName,
String dbName,
String tableName,
List<String> colNames,
String engine)
Get the column statistics for a set of columns in a table.
|
List<ColumnStatisticsObj> |
getTableColumnStatistics(String catName,
String dbName,
String tableName,
List<String> colNames,
String engine,
String validWriteIdList) |
protected TableStatsResult |
getTableColumnStatisticsInternal(TableStatsRequest rqst) |
protected GetTableResult |
getTableInternal(GetTableRequest req) |
List<TableMeta> |
getTableMeta(String dbPatterns,
String tablePatterns,
List<String> tableTypes)
Fetches just table name and comments.
|
List<TableMeta> |
getTableMeta(String catName,
String dbPatterns,
String tablePatterns,
List<String> tableTypes)
Fetches just table name and comments.
|
List<Table> |
getTableObjectsByName(String dbName,
List<String> tableNames)
Get tables as objects (rather than just fetching their names).
|
List<Table> |
getTableObjectsByName(String catName,
String dbName,
List<String> tableNames)
Get tables as objects (rather than just fetching their names).
|
List<String> |
getTables(String dbname,
String tablePattern)
Get the names of all tables in the specified database that satisfy the supplied
table name pattern.
|
List<Table> |
getTables(String catName,
String dbName,
List<String> tableNames,
GetProjectionsSpec projectionsSpec)
Get tables as objects (rather than just fetching their names).
|
List<String> |
getTables(String catName,
String dbName,
String tablePattern)
Get the names of all tables in the specified database that satisfy the supplied
table name pattern.
|
List<String> |
getTables(String catName,
String dbName,
String tablePattern,
TableType tableType)
Get the names of all tables in the specified database that satisfy the supplied
table name pattern and table type (MANAGED_TABLE || EXTERNAL_TABLE || VIRTUAL_VIEW)
|
List<String> |
getTables(String dbname,
String tablePattern,
TableType tableType)
Get the names of all tables in the specified database that satisfy the supplied
table name pattern and table type (MANAGED_TABLE || EXTERNAL_TABLE || VIRTUAL_VIEW)
|
List<ExtendedTableInfo> |
getTablesExt(String catName,
String dbName,
String tablePattern,
int requestedFields,
int limit)
Get the names of all the tables along with extended table metadata
|
String |
getToken(String tokenIdentifier) |
String |
getTokenStrForm() |
Table |
getTranslateTableDryrun(Table tbl)
Dry run that translates table
*
* @param tbl
* a table object
* @throws HiveException
|
List<WMTrigger> |
getTriggersForResourcePlan(String resourcePlan,
String ns) |
org.apache.thrift.transport.TTransport |
getTTransport() |
Type |
getType(String name) |
Map<String,Type> |
getTypeAll(String name) |
List<SQLUniqueConstraint> |
getUniqueConstraints(UniqueConstraintsRequest req)
Get a unique constraint for a table.
|
protected UniqueConstraintsResponse |
getUniqueConstraintsInternal(UniqueConstraintsRequest req) |
ValidTxnList |
getValidTxns()
Get a structure that details valid transactions.
|
ValidTxnList |
getValidTxns(long currentTxn)
Get a structure that details valid transactions.
|
ValidTxnList |
getValidTxns(long currentTxn,
List<TxnType> excludeTxnTypes)
Get a structure that details valid transactions.
|
protected String |
getValidWriteIdList(String dbName,
String tblName)
This method is called to get the ValidWriteIdList in order to send the same in HMS get_* APIs,
if the validWriteIdList is not explicitly passed (as a method argument) to the HMS APIs.
|
List<TableValidWriteIds> |
getValidWriteIds(List<String> tablesList,
String validTxnList)
Get a structure that details valid write ids list for all tables read by current txn.
|
ValidWriteIdList |
getValidWriteIds(String fullTableName)
Get a structure that details valid write ids.
|
ValidWriteIdList |
getValidWriteIds(String fullTableName,
Long writeId)
Get a structure that details valid write ids.
|
protected GetValidWriteIdsResponse |
getValidWriteIdsInternal(GetValidWriteIdsRequest rqst) |
boolean |
grant_privileges(PrivilegeBag privileges) |
boolean |
grant_role(String roleName,
String userName,
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.
|
boolean |
heartbeatLockMaterializationRebuild(String dbName,
String tableName,
long txnId)
Method to refresh the acquisition of a given materialization rebuild lock.
|
HeartbeatTxnRangeResponse |
heartbeatTxnRange(long min,
long max)
Send heartbeats for a range of transactions.
|
void |
insertTable(Table table,
boolean overwrite)
Performs the commit/rollback to the metadata storage for insert operator from external storage handler.
|
boolean |
isCompatibleWith(org.apache.hadoop.conf.Configuration conf)
Returns whether current client is compatible with conf argument or not
|
boolean |
isLocalMetaStore()
Returns true if the current client is using an in process metastore (local metastore).
|
boolean |
isPartitionMarkedForEvent(String db_name,
String tbl_name,
Map<String,String> partKVs,
PartitionEventType eventType)
Determine whether a partition has been marked with a particular event type.
|
boolean |
isPartitionMarkedForEvent(String catName,
String db_name,
String tbl_name,
Map<String,String> partKVs,
PartitionEventType eventType)
Determine whether a partition has been marked with a particular event type.
|
boolean |
isSameConfObj(org.apache.hadoop.conf.Configuration c) |
List<HiveObjectPrivilege> |
list_privileges(String principalName,
PrincipalType principalType,
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<String> |
listPackages(ListPackageRequest request) |
List<String> |
listPartitionNames(PartitionsByExprRequest req)
Get a list of partition names matching the specified filter and return in order if specified.
|
List<String> |
listPartitionNames(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts)
Get a list of partition names matching a partial specification of the partition values.
|
List<String> |
listPartitionNames(String dbName,
String tblName,
short max)
List Names of partitions in a table.
|
List<String> |
listPartitionNames(String catName,
String dbName,
String tableName,
int maxParts)
List Names of partitions in a table.
|
List<String> |
listPartitionNames(String catName,
String db_name,
String tbl_name,
List<String> part_vals,
int max_parts)
Get a list of partition names matching a partial specification of the partition values.
|
protected List<String> |
listPartitionNamesInternal(String catName,
String dbName,
String tableName,
int maxParts) |
protected List<String> |
listPartitionNamesInternal(String catName,
String db_name,
String tbl_name,
List<String> part_vals,
int max_parts) |
GetPartitionNamesPsResponse |
listPartitionNamesRequest(GetPartitionNamesPsRequest req)
List Names of partitions in a table.
|
protected GetPartitionNamesPsResponse |
listPartitionNamesRequestInternal(GetPartitionNamesPsRequest req) |
List<Partition> |
listPartitions(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts)
Get a list of partitions based on a (possibly partial) list of partition values.
|
List<Partition> |
listPartitions(String db_name,
String tbl_name,
short max_parts)
Get a list of partittions for a table.
|
List<Partition> |
listPartitions(String catName,
String db_name,
String tbl_name,
int max_parts)
Get a list of partittions for a table.
|
List<Partition> |
listPartitions(String catName,
String db_name,
String tbl_name,
List<String> part_vals,
int max_parts)
Get a list of partitions based on a (possibly partial) list of partition values.
|
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
|
boolean |
listPartitionsByExpr(String catName,
String db_name,
String tbl_name,
byte[] expr,
String default_partition_name,
int 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
|
List<Partition> |
listPartitionsByFilter(String catName,
String db_name,
String tbl_name,
String filter,
int max_parts)
Get list of partitions matching specified filter
|
PartitionSpecProxy |
listPartitionSpecs(String dbName,
String tableName,
int maxParts)
Get a list of partitions from a table, returned in the form of PartitionSpecProxy
|
PartitionSpecProxy |
listPartitionSpecs(String catName,
String dbName,
String tableName,
int maxParts)
Get a list of partitions from a table, returned in the form of PartitionSpecProxy
|
PartitionSpecProxy |
listPartitionSpecsByFilter(String db_name,
String tbl_name,
String filter,
int max_parts)
Get a list of partitions in a PartitionSpec, using a filter to select which partitions to
fetch.
|
PartitionSpecProxy |
listPartitionSpecsByFilter(String catName,
String db_name,
String tbl_name,
String filter,
int max_parts)
Get a list of partitions in a PartitionSpec, using a filter to select which partitions to
fetch.
|
boolean |
listPartitionsSpecByExpr(PartitionsByExprRequest req,
List<PartitionSpec> result)
Get list of
PartitionSpec matching specified serialized expression. |
List<Partition> |
listPartitionsWithAuthInfo(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts,
String user_name,
List<String> group_names)
List partitions along with privilege information for a user or groups
|
List<Partition> |
listPartitionsWithAuthInfo(String db_name,
String tbl_name,
short max_parts,
String user_name,
List<String> group_names)
List partitions, fetching the authorization information along with the partitions.
|
List<Partition> |
listPartitionsWithAuthInfo(String catName,
String dbName,
String tableName,
int maxParts,
String userName,
List<String> groupNames)
List partitions, fetching the authorization information along with the partitions.
|
List<Partition> |
listPartitionsWithAuthInfo(String catName,
String dbName,
String tableName,
List<String> partialPvals,
int maxParts,
String userName,
List<String> groupNames)
List partitions along with privilege information for a user or groups
|
protected List<Partition> |
listPartitionsWithAuthInfoInternal(String catName,
String dbName,
String tableName,
int maxParts,
String userName,
List<String> groupNames) |
protected List<Partition> |
listPartitionsWithAuthInfoInternal(String catName,
String dbName,
String tableName,
List<String> partialPvals,
int maxParts,
String userName,
List<String> groupNames) |
GetPartitionsPsWithAuthResponse |
listPartitionsWithAuthInfoRequest(GetPartitionsPsWithAuthRequest req)
List partitions, fetching the authorization information along with the partitions.
|
protected GetPartitionsPsWithAuthResponse |
listPartitionsWithAuthInfoRequestInternal(GetPartitionsPsWithAuthRequest req) |
PartitionValuesResponse |
listPartitionValues(PartitionValuesRequest request)
Get a list of partition values
|
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.
|
List<String> |
listTableNamesByFilter(String catName,
String dbName,
String filter,
int maxTables)
Get a list of table names that match a filter.
|
LockResponse |
lock(LockRequest request)
Request a set of locks.
|
LockResponse |
lockMaterializationRebuild(String dbName,
String tableName,
long txnId)
Acquire the materialization rebuild lock for a given view.
|
void |
mapSchemaVersionToSerde(String catName,
String dbName,
String schemaName,
int version,
String serdeName)
Map a schema version to a serde.
|
void |
markCleaned(CompactionInfoStruct cr)
Mark a finished compaction as cleaned.
|
void |
markCompacted(CompactionInfoStruct cr)
Mark a finished compaction as compacted.
|
void |
markFailed(CompactionInfoStruct cr)
Mark a finished compaction as failed.
|
void |
markPartitionForEvent(String db_name,
String tbl_name,
Map<String,String> partKVs,
PartitionEventType eventType)
Mark an event as having occurred on a partition.
|
void |
markPartitionForEvent(String catName,
String db_name,
String tbl_name,
Map<String,String> partKVs,
PartitionEventType eventType)
Mark an event as having occurred on a partition.
|
void |
markRefused(CompactionInfoStruct cr)
Mark a compaction as refused (to run).
|
static IMetaStoreClient |
newSynchronizedClient(IMetaStoreClient client)
Creates a synchronized wrapper for any
IMetaStoreClient. |
long |
openTxn(String user)
Initiate a transaction.
|
long |
openTxn(String user,
TxnType txnType)
Initiate a transaction with given type.
|
OpenTxnsResponse |
openTxns(String user,
int numTxns)
Initiate a batch of transactions.
|
Map<String,String> |
partitionNameToSpec(String name) |
List<String> |
partitionNameToVals(String name) |
void |
putFileMetadata(List<Long> fileIds,
List<ByteBuffer> metadata)
Adds file metadata for respective file IDs to metadata cache in metastore.
|
void |
reconnect()
Tries to reconnect this MetaStoreClient to the MetaStore.
|
CmRecycleResponse |
recycleDirToCmPath(CmRecycleRequest request)
Recycles the files recursively from the input path to the cmroot directory either by copying or moving it.
|
boolean |
refresh_privileges(HiveObjectRef objToRefresh,
String authorizer,
PrivilegeBag grantPrivileges) |
void |
removeCompactionMetricsData(CompactionMetricsDataRequest request)
Remove records from the compaction metrics cache matching the filter criteria passed in as parameters
|
boolean |
removeMasterKey(Integer keySeq) |
boolean |
removeToken(String tokenIdentifier) |
void |
renamePartition(String dbname,
String tableName,
List<String> part_vals,
Partition newPart)
Deprecated.
|
void |
renamePartition(String catName,
String dbname,
String tableName,
List<String> part_vals,
Partition newPart,
String validWriteIds,
long txnId,
boolean makeCopy) |
long |
renewDelegationToken(String tokenStrForm) |
List<TxnToWriteId> |
replAllocateTableWriteIdsBatch(String dbName,
String tableName,
String replPolicy,
List<TxnToWriteId> srcTxnToWriteIdList)
Allocate a per table write ID and associate it with the given transaction.
|
List<Long> |
replOpenTxn(String replPolicy,
List<Long> srcTxnIds,
String user,
TxnType txnType)
Initiate a repl replayed or hive replication transaction (dump/load).
|
void |
replRollbackTxn(long srcTxnId,
String replPolicy,
TxnType txnType)
Rollback a transaction.
|
void |
replTableWriteIdState(String validWriteIdList,
String dbName,
String tableName,
List<String> partNames)
Replicate Table Write Ids state to mark aborted write ids and writeid high water mark.
|
boolean |
revoke_privileges(PrivilegeBag privileges,
boolean grantOption) |
boolean |
revoke_role(String roleName,
String userName,
PrincipalType principalType,
boolean grantOption) |
void |
rollbackTxn(AbortTxnRequest abortTxnRequest)
Rollback a transaction.
|
void |
rollbackTxn(long txnid)
Rollback a transaction.
|
void |
scheduledQueryMaintenance(ScheduledQueryMaintenanceRequest request)
Carries out maintenance of scheduled queries (insert/update/drop).
|
ScheduledQueryPollResponse |
scheduledQueryPoll(ScheduledQueryPollRequest request)
Checks whenever a query is available for execution.
|
void |
scheduledQueryProgress(ScheduledQueryProgressInfo info)
Registers the progress a scheduled query being executed.
|
void |
seedTxnId(long seedTxnId)
Seed or increment the global txnId to the given value.
|
void |
seedWriteId(String dbName,
String tableName,
long seedWriteId)
Seed an ACID table with the given writeId.
|
void |
setHadoopJobid(String jobId,
long cqId)
Set the hadoop id for a compaction.
|
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)
Set table or partition column statistics.
|
static void |
setProcessorCapabilities(String[] capabilities) |
static void |
setProcessorIdentifier(String id) |
boolean |
setProperties(String nameSpace,
Map<String,String> properties)
Sets properties.
|
void |
setSchemaVersionState(String catName,
String dbName,
String schemaName,
int version,
SchemaVersionState state)
Set the state of a schema version.
|
ShowCompactResponse |
showCompactions()
Get a list of all compactions.
|
ShowCompactResponse |
showCompactions(ShowCompactRequest request)
Get a list of compactions for the given request object.
|
ShowLocksResponse |
showLocks()
Deprecated.
|
ShowLocksResponse |
showLocks(ShowLocksRequest request)
Show all currently held and waiting locks.
|
GetOpenTxnsInfoResponse |
showTxns()
Show the list of currently open transactions.
|
boolean |
submitForCleanup(CompactionRequest rqst,
long highestWriteId,
long txnId)
Submit a request for performing cleanup of output directory.
|
boolean |
tableExists(String databaseName,
String tableName)
Check whether a table exists in the default catalog.
|
boolean |
tableExists(String catName,
String dbName,
String tableName)
Check whether a table exists.
|
void |
truncateTable(String dbName,
String tableName,
List<String> partNames)
Truncate the table/partitions in the DEFAULT database.
|
void |
truncateTable(String dbName,
String tableName,
List<String> partNames,
String validWriteIds,
long writeId) |
void |
truncateTable(String dbName,
String tableName,
List<String> partNames,
String validWriteIds,
long writeId,
boolean deleteData) |
void |
truncateTable(String catName,
String dbName,
String tableName,
List<String> partNames)
Truncate the table/partitions in the DEFAULT database.
|
void |
unlock(long lockid)
Unlock a set of locks.
|
boolean |
updateCompactionMetricsData(CompactionMetricsDataStruct struct)
Create, update or delete one record in the compaction metrics cache.
|
void |
updateCompactorState(CompactionInfoStruct cr,
long txnId)
Set the compaction highest write id.
|
void |
updateCreationMetadata(String dbName,
String tableName,
CreationMetadata cm)
Updates the creation metadata for the materialized view.
|
void |
updateCreationMetadata(String catName,
String dbName,
String tableName,
CreationMetadata cm)
Updates the creation metadata for the materialized view.
|
void |
updateMasterKey(Integer seqNo,
String key) |
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 |
updateTransactionalStatistics(UpdateTransactionalStatsRequest req) |
void |
validatePartitionNameCharacters(List<String> partVals) |
WMValidateResourcePlanResponse |
validateResourcePlan(String resourcePlanName,
String ns) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitalter_partition, alter_partitions, alter_table, dropDatabase, dropDatabase, dropDatabase, dropPartitions, dropPartitions, dropTable, dropTable, renamePartitionpublic static final String MANUALLY_INITIATED_COMPACTION
public static final String TRUNCATE_SKIP_DATA_DELETION
public static final String SKIP_DROP_PARTITION
public static final String RENAME_PARTITION_MAKE_COPY
public static final ClientCapabilities VERSION
public static final ClientCapabilities TEST_VERSION
protected final org.apache.hadoop.conf.Configuration conf
protected static final org.slf4j.Logger LOG
public HiveMetaStoreClient(org.apache.hadoop.conf.Configuration conf)
throws MetaException
MetaExceptionpublic HiveMetaStoreClient(org.apache.hadoop.conf.Configuration conf,
HiveMetaHookLoader hookLoader)
throws MetaException
MetaExceptionpublic HiveMetaStoreClient(org.apache.hadoop.conf.Configuration conf,
HiveMetaHookLoader hookLoader,
Boolean allowEmbedded)
throws MetaException
MetaExceptionpublic org.apache.thrift.transport.TTransport getTTransport()
public boolean isLocalMetaStore()
IMetaStoreClientisLocalMetaStore in interface IMetaStoreClientpublic boolean isCompatibleWith(org.apache.hadoop.conf.Configuration conf)
IMetaStoreClientisCompatibleWith in interface IMetaStoreClientpublic void setHiveAddedJars(String addedJars)
IMetaStoreClientsetHiveAddedJars in interface IMetaStoreClientaddedJars - the hive.added.jars.path. It is qualified paths separated by commas.public void reconnect()
throws MetaException
IMetaStoreClientreconnect in interface IMetaStoreClientMetaExceptionpublic void alter_table(String dbname, String tbl_name, Table new_tbl) throws org.apache.thrift.TException
IMetaStoreClientalter_table in interface IMetaStoreClientdbname - database nametbl_name - table namenew_tbl - new table object, should be complete representation of the table, not just the
things you want to change.InvalidOperationException - something is wrong with the new table object or an
operation was attempted that is not allowed (such as changing partition columns).MetaException - something went wrong, usually in the RDBMSorg.apache.thrift.TException - general thrift exceptionpublic void alter_table(String defaultDatabaseName, String tblName, Table table, boolean cascade) throws org.apache.thrift.TException
alter_table in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic void alter_table_with_environmentContext(String dbname, String tbl_name, Table new_tbl, EnvironmentContext envContext) throws InvalidOperationException, MetaException, org.apache.thrift.TException
IMetaStoreClientalter_table_with_environmentContext in interface IMetaStoreClientdbname - database nametbl_name - table namenew_tbl - new table object, should be complete representation of the table, not just the
things you want to change.envContext - options for the alter.InvalidOperationException - something is wrong with the new table object or an
operation was attempted that is not allowed (such as changing partition columns).MetaException - something went wrong, usually in the RDBMSorg.apache.thrift.TException - general thrift exceptionpublic void alter_table(String catName, String dbName, String tblName, Table newTable, EnvironmentContext envContext) throws org.apache.thrift.TException
IMetaStoreClientalter_table in interface IMetaStoreClientcatName - catalog name.dbName - database name.tblName - table name.newTable - new table object, should be complete representation of the table, not just the
things you want to change.envContext - options for the alter.InvalidOperationException - something is wrong with the new table object or an
operation was attempted that is not allowed (such as changing partition columns).MetaException - something went wrong, usually in the RDBMSorg.apache.thrift.TException - general thrift exceptionpublic void alter_table(String catName, String dbName, String tbl_name, Table new_tbl, EnvironmentContext envContext, String validWriteIds) throws InvalidOperationException, MetaException, org.apache.thrift.TException
alter_table in interface IMetaStoreClientInvalidOperationExceptionMetaExceptionorg.apache.thrift.TException@Deprecated public void renamePartition(String dbname, String tableName, List<String> part_vals, Partition newPart) throws org.apache.thrift.TException
IMetaStoreClientrenamePartition in interface IMetaStoreClientdbname - database of the old partitiontableName - table name of the old partitionpart_vals - values of the old partitionnewPart - new partitionInvalidOperationException - if srcFs and destFs are different, or trying to rename to an already existing partition nameMetaException - if error in updating metadataorg.apache.thrift.TException - if error in communicating with metastore serverpublic void renamePartition(String catName, String dbname, String tableName, List<String> part_vals, Partition newPart, String validWriteIds, long txnId, boolean makeCopy) throws org.apache.thrift.TException
renamePartition in interface IMetaStoreClientorg.apache.thrift.TExceptionprotected org.apache.http.impl.client.HttpClientBuilder createHttpClientBuilder()
throws MetaException
MetaExceptionpublic String getTokenStrForm() throws IOException
getTokenStrForm in interface IMetaStoreClientIOExceptionpublic void close()
IMetaStoreClientclose in interface AutoCloseableclose in interface IMetaStoreClientpublic static void setProcessorCapabilities(String[] capabilities)
public static void setProcessorIdentifier(String id)
public static String[] getProcessorCapabilities()
public static String getProcessorIdentifier()
public void setMetaConf(String key, String value) throws org.apache.thrift.TException
IMetaStoreClientsetMetaConf in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic String getMetaConf(String key) throws org.apache.thrift.TException
IMetaStoreClientgetMetaConf in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic void createCatalog(Catalog catalog) throws org.apache.thrift.TException
IMetaStoreClientcreateCatalog in interface IMetaStoreClientcatalog - catalog object to create.AlreadyExistsException - A catalog of this name already exists.InvalidObjectException - There is something wrong with the passed in catalog object.MetaException - something went wrong, usually either in the database or trying to
create the directory for the catalog.org.apache.thrift.TException - general thrift exception.public void alterCatalog(String catalogName, Catalog newCatalog) throws org.apache.thrift.TException
IMetaStoreClientalterCatalog in interface IMetaStoreClientcatalogName - the name of the catalog to alter.newCatalog - the new catalog object. All relevant details of the catalog should be
set, don't rely on the system to figure out what you changed and only copy
that in.NoSuchObjectException - no catalog of this name existsInvalidObjectException - an attempt was made to make an unsupported change (such as
catalog name).MetaException - usually indicates a database errororg.apache.thrift.TException - general thrift exceptionpublic Catalog getCatalog(String catName) throws org.apache.thrift.TException
IMetaStoreClientgetCatalog in interface IMetaStoreClientcatName - Name of the catalog to fetch.NoSuchObjectException - no catalog of this name exists.MetaException - something went wrong, usually in the database.org.apache.thrift.TException - general thrift exception.public List<String> getCatalogs() throws org.apache.thrift.TException
IMetaStoreClientgetCatalogs in interface IMetaStoreClientMetaException - something went wrong, usually in the database.org.apache.thrift.TException - general thrift exception.public void dropCatalog(String catName) throws org.apache.thrift.TException
IMetaStoreClientdropCatalog in interface IMetaStoreClientcatName - name of the catalog to dropNoSuchObjectException - no catalog of this name exists.InvalidOperationException - The catalog is not empty and cannot be dropped.MetaException - something went wrong, usually in the database.org.apache.thrift.TException - general thrift exception.public Partition add_partition(Partition new_part) throws org.apache.thrift.TException
IMetaStoreClientadd_partition in interface IMetaStoreClientnew_part - InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.add_partition(org.apache.hadoop.hive.metastore.api.Partition)public Partition add_partition(Partition new_part, EnvironmentContext envContext) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic int add_partitions(List<Partition> new_parts) throws org.apache.thrift.TException
IMetaStoreClientadd_partitions in interface IMetaStoreClientnew_parts - InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.add_partitions(List)public List<Partition> add_partitions(List<Partition> parts, boolean ifNotExists, boolean needResults) throws org.apache.thrift.TException
IMetaStoreClientadd_partitions in interface IMetaStoreClientparts - The partitions to addifNotExists - only add partitions if they don't existneedResults - Whether the results are neededorg.apache.thrift.TExceptionpublic int add_partitions_pspec(PartitionSpecProxy partitionSpec) throws org.apache.thrift.TException
IMetaStoreClientadd_partitions_pspec in interface IMetaStoreClientpartitionSpec - partition spec proxyInvalidObjectException - the partitionSpec is malformed.AlreadyExistsException - one or more of the partitions already exist.MetaException - error accessing the RDBMS or storage.org.apache.thrift.TException - thrift transport errorpublic Partition appendPartition(String db_name, String table_name, List<String> part_vals) throws org.apache.thrift.TException
IMetaStoreClientappendPartition in interface IMetaStoreClientdb_name - database nametable_name - table namepart_vals - partition valuesInvalidObjectException - no such tableAlreadyExistsException - a partition with these values already existsMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic Partition appendPartition(String dbName, String tableName, String partName) throws org.apache.thrift.TException
IMetaStoreClientappendPartition in interface IMetaStoreClientdbName - database name.tableName - table name.partName - name of the partition, should be in the form partkey=partval.InvalidObjectException - No such table.AlreadyExistsException - Partition of this name already exists.MetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic Partition appendPartition(String catName, String dbName, String tableName, String name) throws org.apache.thrift.TException
IMetaStoreClientappendPartition in interface IMetaStoreClientcatName - catalog name.dbName - database name.tableName - table name.name - name of the partition, should be in the form partkey=partval.InvalidObjectException - No such table.AlreadyExistsException - Partition of this name already exists.MetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic Partition appendPartition(String catName, String dbName, String tableName, List<String> partVals) throws org.apache.thrift.TException
IMetaStoreClientappendPartition in interface IMetaStoreClientcatName - catalog namedbName - database nametableName - table namepartVals - partition valuesInvalidObjectException - no such tableAlreadyExistsException - a partition with these values already existsMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport error@Deprecated public Partition appendPartition(String dbName, String tableName, List<String> partVals, EnvironmentContext ec) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic Partition exchange_partition(Map<String,String> partitionSpecs, String sourceDb, String sourceTable, String destDb, String destinationTableName) throws org.apache.thrift.TException
exchange_partition in interface IMetaStoreClientpartitionSpecs - partitions specs of the parent partition to be exchangeddestDb - the db of the destination tabledestinationTableName - the destination table namesourceDb - database of the source tablesourceTable - name of the source tableMetaException - error accessing the RDBMS or storageNoSuchObjectException - no such table, for either source or destination tableInvalidObjectException - error in partition specificationsorg.apache.thrift.TException - thrift transport errorpublic Partition exchange_partition(Map<String,String> partitionSpecs, String sourceCat, String sourceDb, String sourceTable, String destCat, String destDb, String destTableName) throws org.apache.thrift.TException
IMetaStoreClientexchange_partition in interface IMetaStoreClientpartitionSpecs - key value pairs that describe the partition to be moved.sourceCat - catalog of the source tablesourceDb - database of the source tablesourceTable - name of the source tabledestCat - catalog of the destination table, for now must the same as sourceCatdestDb - database of the destination tabledestTableName - name of the destination tableMetaException - error accessing the RDBMS or storageNoSuchObjectException - no such table, for either source or destination tableInvalidObjectException - error in partition specificationsorg.apache.thrift.TException - thrift transport errorpublic List<Partition> exchange_partitions(Map<String,String> partitionSpecs, String sourceDb, String sourceTable, String destDb, String destinationTableName) throws org.apache.thrift.TException
exchange_partitions in interface IMetaStoreClientpartitionSpecs - partitions specs of the parent partition to be exchangeddestDb - the db of the destination tabledestinationTableName - the destination table namesourceDb - database of the source tablesourceTable - name of the source tableMetaException - error accessing the RDBMS or storageNoSuchObjectException - no such table, for either source or destination tableInvalidObjectException - error in partition specificationsorg.apache.thrift.TException - thrift transport errorpublic Map<String,List<ColumnStatisticsObj>> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNames, List<String> colNames, String engine, String validWriteIdList) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
getPartitionColumnStatistics in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic Map<String,List<ColumnStatisticsObj>> getPartitionColumnStatistics(String catName, String dbName, String tableName, List<String> partNames, List<String> colNames, String engine, String validWriteIdList) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
getPartitionColumnStatistics in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic AggrStats getAggrColStatsFor(String dbName, String tblName, List<String> colNames, List<String> partNames, String engine, String writeIdList) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
getAggrColStatsFor in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic AggrStats getAggrColStatsFor(String catName, String dbName, String tblName, List<String> colNames, List<String> partNames, String engine, String writeIdList) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
getAggrColStatsFor in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionprotected AggrStats getAggrStatsForInternal(PartitionsStatsRequest req) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<Partition> exchange_partitions(Map<String,String> partitionSpecs, String sourceCat, String sourceDb, String sourceTable, String destCat, String destDb, String destTableName) throws org.apache.thrift.TException
IMetaStoreClientexchange_partitions in interface IMetaStoreClientpartitionSpecs - key value pairs that describe the partition(s) to be moved.sourceCat - catalog of the source tablesourceDb - database of the source tablesourceTable - name of the source tabledestCat - catalog of the destination table, for now must the same as sourceCatdestDb - database of the destination tabledestTableName - name of the destination tableMetaException - error accessing the RDBMS or storageNoSuchObjectException - no such table, for either source or destination tableInvalidObjectException - error in partition specificationsorg.apache.thrift.TException - thrift transport errorpublic void validatePartitionNameCharacters(List<String> partVals) throws org.apache.thrift.TException, MetaException
validatePartitionNameCharacters in interface IMetaStoreClientorg.apache.thrift.TExceptionMetaExceptionpublic void createDatabase(Database db) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
createDatabase in interface IMetaStoreClientdb - AlreadyExistsExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.create_database(Database)public void createDataConnector(DataConnector connector) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
createDataConnector in interface IMetaStoreClientconnector - AlreadyExistsExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.create_dataconnector(DataConnector)public void dropDataConnector(String name, boolean ifNotExists, boolean checkReferences) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException
dropDataConnector in interface IMetaStoreClientname - name of the dataconnector to drop.ifNotExists - if specified, drop will not throw an exception if the connector does not exist.checkReferences - drop only if there are no dbs referencing this connector.NoSuchObjectExceptionInvalidOperationExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void alterDataConnector(String name, DataConnector connector) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
alterDataConnector in interface IMetaStoreClientname - dataconnector name.connector - new dataconnector object.NoSuchObjectException - No dataconnector with this name exists.MetaException - Operation could not be completed, usually in the RDBMS.org.apache.thrift.TException - thrift transport layer error.public DataConnector getDataConnector(String name) throws MetaException, org.apache.thrift.TException
getDataConnector in interface IMetaStoreClientMetaException - error complete the operationorg.apache.thrift.TException - thrift transport errorpublic List<String> getAllDataConnectorNames() throws MetaException, org.apache.thrift.TException
getAllDataConnectorNames in interface IMetaStoreClientMetaException - error accessing RDBMS.org.apache.thrift.TException - thrift transport errorpublic Table getTranslateTableDryrun(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
getTranslateTableDryrun in interface IMetaStoreClientAlreadyExistsExceptionInvalidObjectExceptionMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic void createTable(Table tbl) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
createTable in interface IMetaStoreClienttbl - MetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionAlreadyExistsExceptionInvalidObjectException#create_table(org.apache.hadoop.hive.metastore.api.CreateTableRequest)public void createTable(Table tbl, EnvironmentContext envContext) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
AlreadyExistsExceptionInvalidObjectExceptionMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic void createTable(CreateTableRequest request) throws InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
createTable in interface IMetaStoreClientrequest - MetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionInvalidObjectExceptionAlreadyExistsExceptionpublic void createTableWithConstraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys, List<SQLUniqueConstraint> uniqueConstraints, List<SQLNotNullConstraint> notNullConstraints, List<SQLDefaultConstraint> defaultConstraints, List<SQLCheckConstraint> checkConstraints) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
createTableWithConstraints in interface IMetaStoreClientAlreadyExistsExceptionInvalidObjectExceptionMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic void dropConstraint(String dbName, String tableName, String constraintName) throws org.apache.thrift.TException
IMetaStoreClientdropConstraint in interface IMetaStoreClientdbName - database nametableName - table nameconstraintName - name of the constraintMetaException - RDBMS access errorNoSuchObjectException - no such constraint existsorg.apache.thrift.TException - thrift transport errorpublic void dropConstraint(String catName, String dbName, String tableName, String constraintName) throws org.apache.thrift.TException
IMetaStoreClientdropConstraint in interface IMetaStoreClientcatName - catalog namedbName - database nametableName - table nameconstraintName - name of the constraintMetaException - RDBMS access errorNoSuchObjectException - no such constraint existsorg.apache.thrift.TException - thrift transport errorpublic void addPrimaryKey(List<SQLPrimaryKey> primaryKeyCols) throws org.apache.thrift.TException
IMetaStoreClientaddPrimaryKey in interface IMetaStoreClientprimaryKeyCols - Primary key columns.MetaException - error reading or writing to the RDBMS or a primary key already existsNoSuchObjectException - no such table existsorg.apache.thrift.TException - thrift transport errorpublic void addForeignKey(List<SQLForeignKey> foreignKeyCols) throws org.apache.thrift.TException
IMetaStoreClientaddForeignKey in interface IMetaStoreClientforeignKeyCols - Foreign key definitionMetaException - error reading or writing to the RDBMS or foreign key already existsNoSuchObjectException - one of the tables in the foreign key does not exist.org.apache.thrift.TException - thrift transport errorpublic void addUniqueConstraint(List<SQLUniqueConstraint> uniqueConstraintCols) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientaddUniqueConstraint in interface IMetaStoreClientuniqueConstraintCols - Unique constraint definitionNoSuchObjectException - no such tableMetaException - error reading or writing to the RDBMS or unique constraint already existsorg.apache.thrift.TException - thrift transport errorpublic void addNotNullConstraint(List<SQLNotNullConstraint> notNullConstraintCols) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientaddNotNullConstraint in interface IMetaStoreClientnotNullConstraintCols - Notnull constraint definitionNoSuchObjectException - no such tableMetaException - error reading or writing to the RDBMS or not null constraint already
existsorg.apache.thrift.TException - thrift transport errorpublic void addDefaultConstraint(List<SQLDefaultConstraint> defaultConstraints) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
addDefaultConstraint in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void addCheckConstraint(List<SQLCheckConstraint> checkConstraints) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
addCheckConstraint in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean createType(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, org.apache.thrift.TException
type - AlreadyExistsExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.create_type(org.apache.hadoop.hive.metastore.api.Type)public void dropDatabase(String name) throws NoSuchObjectException, InvalidOperationException, MetaException, org.apache.thrift.TException
IMetaStoreClientdropDatabase in interface IMetaStoreClientname - NoSuchObjectExceptionInvalidOperationExceptionMetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.drop_database(java.lang.String, boolean, boolean)public void dropDatabase(String name, boolean deleteData, boolean ignoreUnknownDb) throws org.apache.thrift.TException
IMetaStoreClientdropDatabase in interface IMetaStoreClientname - name of the database to drop.deleteData - whether to drop the underlying HDFS directory.ignoreUnknownDb - whether to ignore an attempt to drop a non-existant databaseNoSuchObjectException - No database of this name exists in the specified catalog and
ignoreUnknownDb is false.InvalidOperationException - The database cannot be dropped because it is not empty.MetaException - something went wrong, usually either in the RDMBS or in storage.org.apache.thrift.TException - general thrift error.public void dropDatabase(String name, boolean deleteData, boolean ignoreUnknownDb, boolean cascade) throws org.apache.thrift.TException
IMetaStoreClientdropDatabase in interface IMetaStoreClientname - database name.deleteData - whether to drop the underlying HDFS directory.ignoreUnknownDb - whether to ignore an attempt to drop a non-existant databasecascade - whether to drop contained tables, etc. If this is false and there are
objects still in the database the drop will fail.NoSuchObjectException - No database of this name exists in the specified catalog and
ignoreUnknownDb is false.InvalidOperationException - The database contains objects and cascade is false.MetaException - something went wrong, usually either in the RDBMS or storage.org.apache.thrift.TException - general thrift error.public void dropDatabase(DropDatabaseRequest req) throws org.apache.thrift.TException
dropDatabase in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic boolean dropPartition(String dbName, String tableName, String partName, boolean deleteData) throws org.apache.thrift.TException
IMetaStoreClientdropPartition in interface IMetaStoreClientdbName - database name.tableName - table name.partName - partition name.deleteData - whether to delete the data or just the metadata.NoSuchObjectException - no such partition.MetaException - error accessing the RDBMS or storageorg.apache.thrift.TException - thrift transport errorpublic boolean dropPartition(String catName, String db_name, String tbl_name, String name, boolean deleteData) throws org.apache.thrift.TException
IMetaStoreClientdropPartition in interface IMetaStoreClientcatName - catalog name.db_name - database name.tbl_name - table name.name - partition name.deleteData - whether to delete the data or just the metadata.NoSuchObjectException - no such partition.MetaException - error accessing the RDBMS or storageorg.apache.thrift.TException - thrift transport error@Deprecated public boolean dropPartition(String db_name, String tbl_name, List<String> part_vals, EnvironmentContext env_context) throws org.apache.thrift.TException
org.apache.thrift.TException@Deprecated public boolean dropPartition(String dbName, String tableName, String partName, boolean dropData, EnvironmentContext ec) throws org.apache.thrift.TException
org.apache.thrift.TException@Deprecated public boolean dropPartition(String dbName, String tableName, List<String> partVals) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic boolean dropPartition(String db_name, String tbl_name, List<String> part_vals, boolean deleteData) throws org.apache.thrift.TException
IMetaStoreClientdropPartition in interface IMetaStoreClientdb_name - database nametbl_name - table namepart_vals - partition values, in the same order as the partition keysdeleteData - delete the underlying data or just delete the partition in metadataNoSuchObjectException - partition does not existMetaException - error accessing the RDBMS or the storage.org.apache.thrift.TException - thrift transport errorpublic boolean dropPartition(String catName, String db_name, String tbl_name, List<String> part_vals, boolean deleteData) throws org.apache.thrift.TException
IMetaStoreClientdropPartition in interface IMetaStoreClientcatName - catalog name.db_name - database nametbl_name - table namepart_vals - partition values, in the same order as the partition keysdeleteData - delete the underlying data or just delete the partition in metadataNoSuchObjectException - partition does not existMetaException - error accessing the RDBMS or the storage.org.apache.thrift.TException - thrift transport errorpublic boolean dropPartition(String db_name, String tbl_name, List<String> part_vals, PartitionDropOptions options) throws org.apache.thrift.TException
IMetaStoreClientdropPartition in interface IMetaStoreClientdb_name - Name of the database.tbl_name - Name of the table.part_vals - Specification of the partitions being dropped.options - PartitionDropOptions for the operation.NoSuchObjectException - partition does not existMetaException - error accessing the RDBMS or the storage.org.apache.thrift.TException - thrift transport error.public boolean dropPartition(String catName, String db_name, String tbl_name, List<String> part_vals, PartitionDropOptions options) throws org.apache.thrift.TException
IMetaStoreClientdropPartition in interface IMetaStoreClientcatName - catalog name.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.NoSuchObjectException - partition does not existMetaException - error accessing the RDBMS or the storage.org.apache.thrift.TException - thrift transport error.public List<Partition> dropPartitions(String dbName, String tblName, List<org.apache.commons.lang3.tuple.Pair<Integer,byte[]>> partExprs, PartitionDropOptions options) throws org.apache.thrift.TException
IMetaStoreClientdropPartitions in interface IMetaStoreClientdbName - Name of the databasetblName - Name of the tablepartExprs - Partition-specificationoptions - Boolean options for dropping partitionsNoSuchObjectException - No partition matches the expression(s), and ifExists was false.MetaException - error access the RDBMS or storage.org.apache.thrift.TException - On failurepublic List<Partition> dropPartitions(String dbName, String tblName, List<org.apache.commons.lang3.tuple.Pair<Integer,byte[]>> partExprs, boolean deleteData, boolean ifExists, boolean needResult) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientdropPartitions in interface IMetaStoreClientdbName - database name.tblName - table name.partExprs - I don't understand this fully, so can't completely explain it. The second
half of the object pair is an expression used to determine which partitions
to drop. The first half has something to do with archive level, but I
don't understand what. I'm also not sure what happens if you pass multiple
expressions.deleteData - whether to delete the data as well as the metadata.ifExists - if true, it is not an error if no partitions match the expression(s).needResult - if true, the list of deleted partitions will be returned, if not, null
will be returned.NoSuchObjectException - No partition matches the expression(s), and ifExists was false.MetaException - error access the RDBMS or storage.org.apache.thrift.TException - Thrift transport error.public List<Partition> dropPartitions(String dbName, String tblName, List<org.apache.commons.lang3.tuple.Pair<Integer,byte[]>> partExprs, boolean deleteData, boolean ifExists) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientdropPartitions in interface IMetaStoreClientdbName - database name.tblName - table name.partExprs - I don't understand this fully, so can't completely explain it. The second
half of the object pair is an expression used to determine which partitions
to drop. The first half has something to do with archive level, but I
don't understand what. I'm also not sure what happens if you pass multiple
expressions.deleteData - whether to delete the data as well as the metadata.ifExists - if true, it is not an error if no partitions match the expression(s).NoSuchObjectException - No partition matches the expression(s), and ifExists was false.MetaException - error access the RDBMS or storage.org.apache.thrift.TException - Thrift transport error.public List<Partition> dropPartitions(String catName, String dbName, String tblName, List<org.apache.commons.lang3.tuple.Pair<Integer,byte[]>> partExprs, PartitionDropOptions options) throws org.apache.thrift.TException
IMetaStoreClientdropPartitions in interface IMetaStoreClientcatName - catalog namedbName - Name of the databasetblName - Name of the tablepartExprs - Partition-specificationoptions - Boolean options for dropping partitionsNoSuchObjectException - No partition matches the expression(s), and ifExists was false.MetaException - error access the RDBMS or storage.org.apache.thrift.TException - On failurepublic void dropTable(String dbname, String name, boolean deleteData, boolean ignoreUnknownTab) throws MetaException, org.apache.thrift.TException, NoSuchObjectException, UnsupportedOperationException
IMetaStoreClientdropTable in interface IMetaStoreClientdbname - The database for this tablename - 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 occurredUnsupportedOperationExceptionpublic void dropTable(String dbname, String name, boolean deleteData, boolean ignoreUnknownTab, boolean ifPurge) throws org.apache.thrift.TException
IMetaStoreClientdropTable in interface IMetaStoreClientdbname - The database for this tablename - The table to dropdeleteData - Should we delete the underlying dataignoreUnknownTab - don't throw if the requested table doesn't existifPurge - completely purge the table (skipping trash) while removing data from warehouseMetaException - Could not drop table properly.NoSuchObjectException - The table wasn't found.org.apache.thrift.TException - A thrift communication error occurredpublic void dropTable(Table tbl, boolean deleteData, boolean ignoreUnknownTbl, boolean ifPurge) throws org.apache.thrift.TException
dropTable in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic void dropTable(String dbname, String name) throws org.apache.thrift.TException
IMetaStoreClientdropTable in interface IMetaStoreClientdbname - The database for this tablename - The table to dropMetaException - Could not drop table properly.NoSuchObjectException - The table wasn't found.org.apache.thrift.TException - A thrift communication error occurredpublic void dropTable(String catName, String dbName, String tableName, boolean deleteData, boolean ignoreUnknownTable, boolean ifPurge) throws org.apache.thrift.TException
IMetaStoreClientdropTable in interface IMetaStoreClientcatName - catalog the table is in.dbName - database the table is in.tableName - table name.deleteData - whether associated data should be deleted.ignoreUnknownTable - whether a non-existent table name should be ignoredifPurge - whether dropped data should be immediately removed rather than placed in HDFS
trash.MetaException - something went wrong, usually in the RDBMS or storage.NoSuchObjectException - No table of this name exists, only thrown if
ignoreUnknownTable is false.org.apache.thrift.TException - general thrift error.public void dropTable(String catName, String dbname, String name, boolean deleteData, boolean ignoreUnknownTab, EnvironmentContext envContext) throws MetaException, org.apache.thrift.TException, NoSuchObjectException, UnsupportedOperationException
catName - catalog namedbname - database namename - table namedeleteData - delete the underlying data or just delete the table in metadataignoreUnknownTab - don't throw if the requested table doesn't existenvContext - for communicating with thriftMetaException - could not drop table properlyNoSuchObjectException - the table wasn't foundorg.apache.thrift.TException - a thrift communication error occurredUnsupportedOperationException - dropping an index table is not allowedThriftHiveMetastore.Iface.drop_table(java.lang.String,
java.lang.String, boolean)public void truncateTable(String dbName, String tableName, List<String> partNames, String validWriteIds, long writeId, boolean deleteData) throws org.apache.thrift.TException
truncateTable in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic void truncateTable(String dbName, String tableName, List<String> partNames, String validWriteIds, long writeId) throws org.apache.thrift.TException
truncateTable in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic void truncateTable(String dbName, String tableName, List<String> partNames) throws org.apache.thrift.TException
IMetaStoreClienttruncateTable in interface IMetaStoreClientdbName - The db to which the table to be truncate belongs totableName - The table to truncatepartNames - List of partitions to truncate. NULL will truncate the whole table/all partitionsMetaException - Failure in the RDBMS or storageorg.apache.thrift.TException - Thrift transport exceptionpublic void truncateTable(String catName, String dbName, String tableName, List<String> partNames) throws org.apache.thrift.TException
IMetaStoreClienttruncateTable in interface IMetaStoreClientcatName - catalog namedbName - The db to which the table to be truncate belongs totableName - The table to truncatepartNames - List of partitions to truncate. NULL will truncate the whole table/all partitionsMetaException - Failure in the RDBMS or storageorg.apache.thrift.TException - Thrift transport exceptionpublic CmRecycleResponse recycleDirToCmPath(CmRecycleRequest request) throws MetaException, org.apache.thrift.TException
recycleDirToCmPath in interface IMetaStoreClientrequest - Inputs for path of the data files to be recycled to cmroot and
isPurge flag when set to true files which needs to be recycled are not moved to TrashMetaExceptionorg.apache.thrift.TExceptionpublic boolean dropType(String type) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
type - MetaExceptionorg.apache.thrift.TExceptionNoSuchObjectExceptionThriftHiveMetastore.Iface.drop_type(java.lang.String)public Map<String,Type> getTypeAll(String name) throws MetaException, org.apache.thrift.TException
name - MetaExceptionorg.apache.thrift.TExceptionThriftHiveMetastore.Iface.get_type_all(java.lang.String)public List<String> getDatabases(String databasePattern) throws org.apache.thrift.TException
IMetaStoreClientgetDatabases in interface IMetaStoreClientdatabasePattern - pattern for the database name to patchMetaException - error accessing RDBMS.org.apache.thrift.TException - thrift transport errorpublic List<String> getDatabases(String catName, String databasePattern) throws org.apache.thrift.TException
IMetaStoreClientgetDatabases in interface IMetaStoreClientcatName - catalog name. Can be null, in which case the default catalog is assumed.databasePattern - pattern for the database name to matchMetaException - error accessing RDBMS.org.apache.thrift.TException - thrift transport errorpublic List<String> getAllDatabases() throws org.apache.thrift.TException
IMetaStoreClientgetAllDatabases in interface IMetaStoreClientMetaException - error accessing RDBMS.org.apache.thrift.TException - thrift transport errorpublic List<String> getAllDatabases(String catName) throws org.apache.thrift.TException
IMetaStoreClientgetAllDatabases in interface IMetaStoreClientcatName - catalog name. Can be null, in which case the default catalog is assumed.MetaException - error accessing RDBMS.org.apache.thrift.TException - thrift transport errorpublic List<Partition> listPartitions(String db_name, String tbl_name, short max_parts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitions in interface IMetaStoreClientdb_name - database nametbl_name - table namemax_parts - maximum number of parts to return, -1 for allNoSuchObjectException - No such table.MetaException - error accessing RDBMS.org.apache.thrift.TException - thrift transport errorpublic List<Partition> listPartitions(String catName, String db_name, String tbl_name, int max_parts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitions in interface IMetaStoreClientcatName - catalog namedb_name - database nametbl_name - table namemax_parts - maximum number of parts to return, -1 for allNoSuchObjectException - No such table.MetaException - error accessing RDBMS.org.apache.thrift.TException - thrift transport errorpublic PartitionSpecProxy listPartitionSpecs(String dbName, String tableName, int maxParts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionSpecs in interface IMetaStoreClientdbName - database name.tableName - table name.maxParts - maximum number of partitions to return, or -1 for allorg.apache.thrift.TException - thrift transport errorpublic PartitionSpecProxy listPartitionSpecs(String catName, String dbName, String tableName, int maxParts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionSpecs in interface IMetaStoreClientcatName - catalog name.dbName - database name.tableName - table name.maxParts - maximum number of partitions to return, or -1 for allorg.apache.thrift.TException - thrift transport errorpublic List<Partition> listPartitions(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitions in interface IMetaStoreClientdb_name - database name.tbl_name - table name.part_vals - partition values, in order of the table partition keys. These can be
partial, or .* to match all values for a particular key.max_parts - maximum number of partitions to return, or -1 for all.NoSuchObjectException - no such table.MetaException - error accessing the database or processing the partition values.org.apache.thrift.TException - thrift transport error.public List<Partition> listPartitions(String catName, String db_name, String tbl_name, List<String> part_vals, int max_parts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitions in interface IMetaStoreClientcatName - catalog name.db_name - database name.tbl_name - table name.part_vals - partition values, in order of the table partition keys. These can be
partial, or .* to match all values for a particular key.max_parts - maximum number of partitions to return, or -1 for all.NoSuchObjectException - no such table.MetaException - error accessing the database or processing the partition values.org.apache.thrift.TException - thrift transport error.public List<Partition> listPartitionsWithAuthInfo(String db_name, String tbl_name, short max_parts, String user_name, List<String> group_names) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionsWithAuthInfo in interface IMetaStoreClientdb_name - database nametbl_name - table namemax_parts - maximum number of partitions to fetch, or -1 for alluser_name - user to fetch privileges forgroup_names - groups to fetch privileges forNoSuchObjectException - no partitions matching the criteria were foundMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic GetPartitionsPsWithAuthResponse listPartitionsWithAuthInfoRequest(GetPartitionsPsWithAuthRequest req) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
IMetaStoreClientlistPartitionsWithAuthInfoRequest in interface IMetaStoreClientMetaException - error accessing the RDBMSNoSuchObjectException - no partitions matching the criteria were foundorg.apache.thrift.TException - thrift transport errorprotected GetPartitionsPsWithAuthResponse listPartitionsWithAuthInfoRequestInternal(GetPartitionsPsWithAuthRequest req) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<Partition> listPartitionsWithAuthInfo(String catName, String dbName, String tableName, int maxParts, String userName, List<String> groupNames) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionsWithAuthInfo in interface IMetaStoreClientcatName - catalog namedbName - database nametableName - table namemaxParts - maximum number of partitions to fetch, or -1 for alluserName - user to fetch privileges forgroupNames - groups to fetch privileges forNoSuchObjectException - no partitions matching the criteria were foundMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorprotected List<Partition> listPartitionsWithAuthInfoInternal(String catName, String dbName, String tableName, int maxParts, String userName, List<String> groupNames) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<Partition> listPartitionsWithAuthInfo(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> group_names) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionsWithAuthInfo in interface IMetaStoreClientdb_name - database nametbl_name - table namepart_vals - partition values, can be partialmax_parts - maximum number of partitions to fetch, or -1 for alluser_name - user to fetch privilege information forgroup_names - group to fetch privilege information forNoSuchObjectException - no partitions matching the criteria were foundMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic List<Partition> listPartitionsWithAuthInfo(String catName, String dbName, String tableName, List<String> partialPvals, int maxParts, String userName, List<String> groupNames) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionsWithAuthInfo in interface IMetaStoreClientdbName - database nametableName - table namepartialPvals - partition values, can be partialmaxParts - maximum number of partitions to fetch, or -1 for alluserName - user to fetch privilege information forgroupNames - group to fetch privilege information forNoSuchObjectException - no partitions matching the criteria were foundMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorprotected List<Partition> listPartitionsWithAuthInfoInternal(String catName, String dbName, String tableName, List<String> partialPvals, int maxParts, String userName, List<String> groupNames) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<Partition> listPartitionsByFilter(String db_name, String tbl_name, String filter, short max_parts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionsByFilter in interface IMetaStoreClientdb_name - the database nametbl_name - the table namefilter - the filter string,
for example "part1 = \"p1_abc\" and part2 <= "\p2_test\"". Filtering can
be done only on string partition keys.max_parts - the maximum number of partitions to return,
all partitions are returned if -1 is passedMetaException - Error accessing the RDBMS or processing the filter.NoSuchObjectException - No such table.org.apache.thrift.TException - thrift transport errorpublic List<Partition> listPartitionsByFilter(String catName, String db_name, String tbl_name, String filter, int max_parts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionsByFilter in interface IMetaStoreClientcatName - catalog name.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 - Error accessing the RDBMS or processing the filter.NoSuchObjectException - No such table.org.apache.thrift.TException - thrift transport errorpublic PartitionSpecProxy listPartitionSpecsByFilter(String db_name, String tbl_name, String filter, int max_parts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionSpecsByFilter in interface IMetaStoreClientdb_name - database nametbl_name - table namefilter - SQL where clause filtermax_parts - maximum number of partitions to fetch, or -1 for allMetaException - error accessing RDBMS or processing the filterNoSuchObjectException - No table matches the requestorg.apache.thrift.TException - thrift transport errorpublic PartitionSpecProxy listPartitionSpecsByFilter(String catName, String db_name, String tbl_name, String filter, int max_parts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionSpecsByFilter in interface IMetaStoreClientcatName - catalog namedb_name - database nametbl_name - table namefilter - SQL where clause filtermax_parts - maximum number of partitions to fetch, or -1 for allMetaException - error accessing RDBMS or processing the filterNoSuchObjectException - No table matches the requestorg.apache.thrift.TException - thrift transport errorpublic 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
IMetaStoreClientlistPartitionsByExpr in interface IMetaStoreClientdb_name - the database nametbl_name - the table nameexpr - expression, serialized from ExprNodeDescdefault_partition_name - Default partition name from configuration. If blank, the
metastore server-side configuration is used.max_parts - the maximum number of partitions to return,
all partitions are returned if -1 is passedresult - the resulting list of partitionsorg.apache.thrift.TException - thrift transport error or error executing the filter.protected PartitionsByExprRequest buildPartitionsByExprRequest(String catName, String db_name, String tbl_name, byte[] expr, String default_partition_name, int max_parts)
protected PartitionsByExprResult getPartitionsByExprInternal(PartitionsByExprRequest req) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic boolean listPartitionsByExpr(String catName, String db_name, String tbl_name, byte[] expr, String default_partition_name, int max_parts, List<Partition> result) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionsByExpr in interface IMetaStoreClientcatName - catalog namedb_name - the database nametbl_name - the table nameexpr - expression, serialized from ExprNodeDescdefault_partition_name - Default partition name from configuration. If blank, the
metastore server-side configuration is used.max_parts - the maximum number of partitions to return,
all partitions are returned if -1 is passedresult - the resulting list of partitionsorg.apache.thrift.TException - thrift transport error or error executing the filter.protected PartitionsSpecByExprResult getPartitionsSpecByExprInternal(PartitionsByExprRequest req) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic boolean listPartitionsSpecByExpr(PartitionsByExprRequest req, List<PartitionSpec> result) throws org.apache.thrift.TException
IMetaStoreClientPartitionSpec matching specified serialized expression.listPartitionsSpecByExpr in interface IMetaStoreClientreq - PartitionsByExprRequest objectorg.apache.thrift.TException - thrift transport error or error executing the filter.public Database getDatabase(String name) throws org.apache.thrift.TException
IMetaStoreClientgetDatabase in interface IMetaStoreClientname - name of the database to fetchNoSuchObjectException - The database does not existMetaException - Could not fetch the databaseorg.apache.thrift.TException - A thrift communication error occurredpublic Database getDatabase(String catalogName, String databaseName) throws org.apache.thrift.TException
IMetaStoreClientgetDatabase in interface IMetaStoreClientcatalogName - catalog name. Can be null, in which case
Warehouse.DEFAULT_CATALOG_NAME will be assumed.databaseName - database nameNoSuchObjectException - No database with this name exists in the specified catalogMetaException - something went wrong, usually in the RDBMSorg.apache.thrift.TException - general thrift errorprotected Database getDatabaseInternal(GetDatabaseRequest request) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic Partition getPartition(String db_name, String tbl_name, List<String> part_vals) throws org.apache.thrift.TException
IMetaStoreClientgetPartition in interface IMetaStoreClientdb_name - database nametbl_name - table namepart_vals - partition values for this partition, must be in the same order as the
partition keys of the table.NoSuchObjectException - no such partitionMetaException - error access the RDBMS.org.apache.thrift.TException - thrift transport errorpublic GetPartitionResponse getPartitionRequest(GetPartitionRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientgetPartitionRequest in interface IMetaStoreClientNoSuchObjectException - no such partitionMetaException - error access the RDBMS.org.apache.thrift.TException - thrift transport errorpublic Partition getPartition(String catName, String dbName, String tblName, List<String> partVals) throws org.apache.thrift.TException
IMetaStoreClientgetPartition in interface IMetaStoreClientcatName - catalog namedbName - database nametblName - table namepartVals - partition values for this partition, must be in the same order as the
partition keys of the table.NoSuchObjectException - no such partitionMetaException - error access the RDBMS.org.apache.thrift.TException - thrift transport errorpublic List<Partition> getPartitionsByNames(String db_name, String tbl_name, List<String> part_names) throws org.apache.thrift.TException
IMetaStoreClientgetPartitionsByNames in interface IMetaStoreClientdb_name - database nametbl_name - table namepart_names - list of partition namesNoSuchObjectException - No such partitionsMetaException - error accessing the RDBMS.org.apache.thrift.TException - thrift transport errorpublic PartitionsResponse getPartitionsRequest(PartitionsRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientgetPartitionsRequest in interface IMetaStoreClientNoSuchObjectException - No such partitionsMetaException - error accessing the RDBMS.org.apache.thrift.TException - thrift transport error@Deprecated public List<Partition> getPartitionsByNames(String catName, String db_name, String tbl_name, List<String> part_names) throws org.apache.thrift.TException
getPartitionsByNames(GetPartitionsByNamesRequest) insteadIMetaStoreClientgetPartitionsByNames in interface IMetaStoreClientcatName - catalog namedb_name - database nametbl_name - table namepart_names - list of partition namesNoSuchObjectException - No such partitionsMetaException - error accessing the RDBMS.org.apache.thrift.TException - thrift transport errorpublic GetPartitionsByNamesResult getPartitionsByNames(GetPartitionsByNamesRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientgetPartitionsByNames in interface IMetaStoreClientreq - GetPartitionsByNamesRequestNoSuchObjectException - No such partitionsMetaException - error accessing the RDBMS.org.apache.thrift.TException - thrift transport errorprotected GetPartitionsByNamesResult getPartitionsByNamesInternal(GetPartitionsByNamesRequest gpbnr) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic PartitionValuesResponse listPartitionValues(PartitionValuesRequest request) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
IMetaStoreClientlistPartitionValues in interface IMetaStoreClientrequest - requestMetaException - error accessing RDBMSorg.apache.thrift.TException - thrift transport errorNoSuchObjectException - no such tablepublic Partition getPartitionWithAuthInfo(String db_name, String tbl_name, List<String> part_vals, String user_name, List<String> group_names) throws org.apache.thrift.TException
IMetaStoreClientgetPartitionWithAuthInfo in interface IMetaStoreClientdb_name - database nametbl_name - table namepart_vals - partition values, must be in the same order as the tables partition keysuser_name - name of the calling usergroup_names - groups the callMetaException - error accessing the RDBMSUnknownTableException - no such tableNoSuchObjectException - no such partitionorg.apache.thrift.TException - thrift transport errorpublic Partition getPartitionWithAuthInfo(String catName, String dbName, String tableName, List<String> pvals, String userName, List<String> groupNames) throws org.apache.thrift.TException
IMetaStoreClientgetPartitionWithAuthInfo in interface IMetaStoreClientcatName - catalog namedbName - database nametableName - table namepvals - partition values, must be in the same order as the tables partition keysuserName - name of the calling usergroupNames - groups the callMetaException - error accessing the RDBMSUnknownTableException - no such tableNoSuchObjectException - no such partitionorg.apache.thrift.TException - thrift transport error@Deprecated public Table getTable(String dbname, String name) throws org.apache.thrift.TException
IMetaStoreClientgetTable in interface IMetaStoreClientdbname - name - org.apache.thrift.TExceptionMetaException - Could not fetch the tableNoSuchObjectException - In case the table wasn't found.@Deprecated public Table getTable(String dbname, String name, boolean getColumnStats, String engine) throws org.apache.thrift.TException
IMetaStoreClientgetTable in interface IMetaStoreClientdbname - name - getColumnStats - get the column stats, if available, when trueengine - engine sending the requestorg.apache.thrift.TExceptionMetaException - Could not fetch the tableNoSuchObjectException - In case the table wasn't found.@Deprecated public Table getTable(String catName, String dbName, String tableName) throws org.apache.thrift.TException
IMetaStoreClientgetTable in interface IMetaStoreClientcatName - catalog the table is in.dbName - database the table is in.tableName - table name.org.apache.thrift.TExceptionMetaException - Something went wrong, usually in the RDBMS.@Deprecated public Table getTable(String catName, String dbName, String tableName, boolean getColumnStats, String engine) throws org.apache.thrift.TException
catName - dbName - tableName - getColumnStats - engine - org.apache.thrift.TExceptionprotected GetTableResult getTableInternal(GetTableRequest req) throws org.apache.thrift.TException
org.apache.thrift.TException@Deprecated public Table getTable(String catName, String dbName, String tableName, String validWriteIdList) throws org.apache.thrift.TException
IMetaStoreClientgetTable in interface IMetaStoreClientcatName - catalog the table is in.dbName - database the table is in.tableName - table name.validWriteIdList - applicable snapshotorg.apache.thrift.TExceptionMetaException - Something went wrong, usually in the RDBMS.@Deprecated public Table getTable(String catName, String dbName, String tableName, String validWriteIdList, boolean getColumnStats, String engine) throws org.apache.thrift.TException
IMetaStoreClientgetTable in interface IMetaStoreClientcatName - catalog the table is in.dbName - database the table is in.tableName - table name.validWriteIdList - applicable snapshotgetColumnStats - get the column stats, if available, when trueengine - engine sending the requestorg.apache.thrift.TExceptionMetaException - Something went wrong, usually in the RDBMS.public Table getTable(GetTableRequest getTableRequest) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
getTable in interface IMetaStoreClientgetTableRequest - request object to query a table in HMSMetaException - Could not fetch the tableorg.apache.thrift.TException - A thrift communication error occurredNoSuchObjectException - In case the table wasn't found.public List<Table> getTableObjectsByName(String dbName, List<String> tableNames) throws org.apache.thrift.TException
IMetaStoreClientgetTableObjectsByName in interface IMetaStoreClientdbName - 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 errorspublic List<Table> getTableObjectsByName(String catName, String dbName, List<String> tableNames) throws org.apache.thrift.TException
IMetaStoreClientgetTableObjectsByName in interface IMetaStoreClientcatName - catalog namedbName - 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 errorspublic List<Table> getTables(String catName, String dbName, List<String> tableNames, GetProjectionsSpec projectionsSpec) throws org.apache.thrift.TException
IMetaStoreClientgetTables in interface IMetaStoreClientcatName - catalog namedbName - The database the tables are located in.tableNames - The names of the tables to fetch.projectionsSpec - The subset of columns that need to be fetched as part of the table object.InvalidOperationException - 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 errorspublic Materialization getMaterializationInvalidationInfo(CreationMetadata cm, String validTxnList) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException
IMetaStoreClientgetMaterializationInvalidationInfo in interface IMetaStoreClientMetaExceptionInvalidOperationExceptionUnknownDBExceptionorg.apache.thrift.TExceptionpublic void updateCreationMetadata(String dbName, String tableName, CreationMetadata cm) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException
IMetaStoreClientupdateCreationMetadata in interface IMetaStoreClientMetaExceptionInvalidOperationExceptionUnknownDBExceptionorg.apache.thrift.TExceptionpublic void updateCreationMetadata(String catName, String dbName, String tableName, CreationMetadata cm) throws MetaException, org.apache.thrift.TException
IMetaStoreClientupdateCreationMetadata in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic List<String> listTableNamesByFilter(String dbName, String filter, short maxTables) throws org.apache.thrift.TException
listTableNamesByFilter in interface IMetaStoreClientdbName - The name of the database from which you will retrieve the table namesfilter - The filter stringmaxTables - The maximum number of tables returnedInvalidOperationException - invalid filterUnknownDBException - no such databaseorg.apache.thrift.TException - thrift transport errorpublic List<String> listTableNamesByFilter(String catName, String dbName, String filter, int maxTables) throws org.apache.thrift.TException
IMetaStoreClientlistTableNamesByFilter in interface IMetaStoreClientcatName - catalog namedbName - The name of the database from which you will retrieve the table namesfilter - The filter stringmaxTables - The maximum number of tables returnedInvalidOperationException - invalid filterUnknownDBException - no such databaseorg.apache.thrift.TException - thrift transport errorpublic Type getType(String name) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
name - MetaExceptionorg.apache.thrift.TExceptionNoSuchObjectExceptionThriftHiveMetastore.Iface.get_type(java.lang.String)public List<String> getTables(String dbname, String tablePattern) throws MetaException
IMetaStoreClientgetTables in interface IMetaStoreClientdbname - database name.tablePattern - pattern for table name to conform toMetaException - error fetching information from the RDBMSpublic List<String> getTables(String catName, String dbName, String tablePattern) throws org.apache.thrift.TException
IMetaStoreClientgetTables in interface IMetaStoreClientcatName - catalog name.dbName - database name.tablePattern - pattern for table name to conform toMetaException - error fetching information from the RDBMSorg.apache.thrift.TException - general thrift errorUnknownDBException - indicated database to search in does not exist.public List<String> getTables(String dbname, String tablePattern, TableType tableType) throws MetaException
IMetaStoreClientgetTables in interface IMetaStoreClientdbname - Name of the database to fetch tables in.tablePattern - pattern to match for table names.tableType - Type of the table in the HMS store. VIRTUAL_VIEW is for views.MetaException - error fetching information from the RDBMSpublic List<String> getTables(String catName, String dbName, String tablePattern, TableType tableType) throws org.apache.thrift.TException
IMetaStoreClientgetTables in interface IMetaStoreClientcatName - catalog name.dbName - Name of the database to fetch tables in.tablePattern - pattern to match for table names.tableType - Type of the table in the HMS store. VIRTUAL_VIEW is for views.MetaException - error fetching information from the RDBMSorg.apache.thrift.TException - thrift transport errorUnknownDBException - indicated database does not exist.public List<ExtendedTableInfo> getTablesExt(String catName, String dbName, String tablePattern, int requestedFields, int limit) throws MetaException, org.apache.thrift.TException
getTablesExt in interface IMetaStoreClientcatName - catalog name.dbName - Name of the database to fetch tables from.tablePattern - pattern to match the tables names.requestedFields - An int bitmask to indicate the depth of the returned objectslimit - Maximum size of the result set. <=0 indicates no limitMetaException - Thrown if there is error on fetching from DBMS.org.apache.thrift.TException - Thrown if there is a thrift transport exception.public List<Table> getAllMaterializedViewObjectsForRewriting() throws org.apache.thrift.TException
IMetaStoreClientgetAllMaterializedViewObjectsForRewriting in interface IMetaStoreClientMetaException - error fetching from the RDBMSorg.apache.thrift.TException - thrift transport errorUnknownDBException - no such databasepublic List<String> getMaterializedViewsForRewriting(String dbName) throws org.apache.thrift.TException
IMetaStoreClientgetMaterializedViewsForRewriting in interface IMetaStoreClientdbName - Name of the database to fetch materialized views from.MetaException - error fetching from the RDBMSorg.apache.thrift.TException - thrift transport errorUnknownDBException - no such databasepublic List<String> getMaterializedViewsForRewriting(String catName, String dbname) throws MetaException
IMetaStoreClientgetMaterializedViewsForRewriting in interface IMetaStoreClientcatName - catalog name.dbname - Name of the database to fetch materialized views from.MetaException - error fetching from the RDBMSpublic List<TableMeta> getTableMeta(String dbPatterns, String tablePatterns, List<String> tableTypes) throws MetaException
IMetaStoreClientgetTableMeta in interface IMetaStoreClientdbPatterns - database pattern to match, or null for all databasestablePatterns - table pattern to match.tableTypes - list of table types to fetch.MetaException - something went wrong with the fetch from the RDBMSpublic List<TableMeta> getTableMeta(String catName, String dbPatterns, String tablePatterns, List<String> tableTypes) throws org.apache.thrift.TException
IMetaStoreClientgetTableMeta in interface IMetaStoreClientcatName - catalog to search in. Search cannot cross catalogs.dbPatterns - database pattern to match, or null for all databasestablePatterns - table pattern to match.tableTypes - list of table types to fetch.MetaException - something went wrong with the fetch from the RDBMSorg.apache.thrift.TException - thrift transport errorUnknownDBException - No databases match the provided pattern.public List<String> getAllTables(String dbname) throws MetaException
IMetaStoreClientgetAllTables in interface IMetaStoreClientdbname - database nameMetaException - something went wrong with the fetch from the RDBMSpublic List<String> getAllTables(String catName, String dbName) throws org.apache.thrift.TException
IMetaStoreClientgetAllTables in interface IMetaStoreClientcatName - catalog namedbName - database nameMetaException - something went wrong with the fetch from the RDBMSorg.apache.thrift.TException - thrift transport errorUnknownDBException - No databases match the provided pattern.public boolean tableExists(String databaseName, String tableName) throws org.apache.thrift.TException
IMetaStoreClienttableExists in interface IMetaStoreClientdatabaseName - database nametableName - table nameMetaException - error fetching form the RDBMSorg.apache.thrift.TException - thrift transport errorUnknownDBException - the indicated database does not exist.public boolean tableExists(String catName, String dbName, String tableName) throws org.apache.thrift.TException
IMetaStoreClienttableExists in interface IMetaStoreClientcatName - catalog namedbName - database nametableName - table nameMetaException - error fetching form the RDBMSorg.apache.thrift.TException - thrift transport errorUnknownDBException - the indicated database does not exist.public List<String> listPartitionNames(String dbName, String tblName, short max) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientlistPartitionNames in interface IMetaStoreClientdbName - database name.tblName - table name.max - maximum number of parts of fetch, or -1 to fetch them all.NoSuchObjectException - No such table.MetaException - Error accessing the RDBMS.org.apache.thrift.TException - thrift transport errorpublic GetPartitionNamesPsResponse listPartitionNamesRequest(GetPartitionNamesPsRequest req) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientlistPartitionNamesRequest in interface IMetaStoreClientNoSuchObjectException - No such table.MetaException - Error accessing the RDBMS.org.apache.thrift.TException - thrift transport errorprotected GetPartitionNamesPsResponse listPartitionNamesRequestInternal(GetPartitionNamesPsRequest req) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<String> listPartitionNames(String catName, String dbName, String tableName, int maxParts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionNames in interface IMetaStoreClientcatName - catalog name.dbName - database name.tableName - table name.maxParts - maximum number of parts of fetch, or -1 to fetch them all.NoSuchObjectException - No such table.MetaException - Error accessing the RDBMS.org.apache.thrift.TException - thrift transport errorprotected List<String> listPartitionNamesInternal(String catName, String dbName, String tableName, int maxParts) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<String> listPartitionNames(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionNames in interface IMetaStoreClientdb_name - database name.tbl_name - table name.part_vals - partial list of partition values. These must be given in the order of the
partition keys. If you wish to accept any value for a particular key you
can pass ".*" for that value in this list.max_parts - maximum number of partition names to return, or -1 to return all that are
found.MetaException - error accessing the RDBMS.org.apache.thrift.TException - thrift transport error.NoSuchObjectException - no such table.public List<String> listPartitionNames(String catName, String db_name, String tbl_name, List<String> part_vals, int max_parts) throws org.apache.thrift.TException
IMetaStoreClientlistPartitionNames in interface IMetaStoreClientcatName - catalog name.db_name - database name.tbl_name - table name.part_vals - partial list of partition values. These must be given in the order of the
partition keys. If you wish to accept any value for a particular key you
can pass ".*" for that value in this list.max_parts - maximum number of partition names to return, or -1 to return all that are
found.MetaException - error accessing the RDBMS.org.apache.thrift.TException - thrift transport error.NoSuchObjectException - no such table.protected List<String> listPartitionNamesInternal(String catName, String db_name, String tbl_name, List<String> part_vals, int max_parts) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<String> listPartitionNames(PartitionsByExprRequest req) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
IMetaStoreClientlistPartitionNames in interface IMetaStoreClientreq - requestMetaException - error accessing the RDBMS.org.apache.thrift.TException - thrift transport error.NoSuchObjectException - no such table.public int getNumPartitionsByFilter(String db_name, String tbl_name, String filter) throws org.apache.thrift.TException
IMetaStoreClientgetNumPartitionsByFilter in interface IMetaStoreClientdb_name - the database nametbl_name - the table namefilter - the filter string,
for example "part1 = \"p1_abc\" and part2 <= "\p2_test\"". Filtering can
be done only on string partition keys.MetaException - error accessing RDBMS or processing the filterNoSuchObjectException - no such tableorg.apache.thrift.TException - thrift transport errorpublic int getNumPartitionsByFilter(String catName, String dbName, String tableName, String filter) throws org.apache.thrift.TException
IMetaStoreClientgetNumPartitionsByFilter in interface IMetaStoreClientcatName - catalog namedbName - the database nametableName - the table namefilter - the filter string,
for example "part1 = \"p1_abc\" and part2 <= "\p2_test\"". Filtering can
be done only on string partition keys.MetaException - error accessing RDBMS or processing the filterNoSuchObjectException - no such tableorg.apache.thrift.TException - thrift transport errorpublic void alter_partition(String dbName, String tblName, Partition newPart) throws InvalidOperationException, MetaException, org.apache.thrift.TException
IMetaStoreClientalter_partition in interface IMetaStoreClientdbName - database of the old partitiontblName - table name of the old partitionnewPart - new partitionInvalidOperationException - if the old partition does not existMetaException - if error in updating metadataorg.apache.thrift.TException - if error in communicating with metastore serverpublic void alter_partition(String dbName, String tblName, Partition newPart, EnvironmentContext environmentContext) throws InvalidOperationException, MetaException, org.apache.thrift.TException
IMetaStoreClientalter_partition in interface IMetaStoreClientdbName - database of the old partitiontblName - table name of the old partitionnewPart - new partitionInvalidOperationException - if the old partition does not existMetaException - if error in updating metadataorg.apache.thrift.TException - if error in communicating with metastore serverpublic void alter_partition(String catName, String dbName, String tblName, Partition newPart, EnvironmentContext environmentContext) throws org.apache.thrift.TException
IMetaStoreClientalter_partition in interface IMetaStoreClientcatName - catalog name.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_partition(String catName, String dbName, String tblName, Partition newPart, EnvironmentContext environmentContext, String writeIdList) throws InvalidOperationException, MetaException, org.apache.thrift.TException
alter_partition in interface IMetaStoreClientInvalidOperationExceptionMetaExceptionorg.apache.thrift.TException@Deprecated public void alter_partitions(String dbName, String tblName, List<Partition> newParts) throws org.apache.thrift.TException
IMetaStoreClientalter_partitions in interface IMetaStoreClientdbName - database of the old partitiontblName - table name of the old partitionnewParts - list of partitionsInvalidOperationException - if the old partition does not existMetaException - if error in updating metadataorg.apache.thrift.TException - if error in communicating with metastore serverpublic void alter_partitions(String dbName, String tblName, List<Partition> newParts, EnvironmentContext environmentContext) throws org.apache.thrift.TException
IMetaStoreClientalter_partitions in interface IMetaStoreClientdbName - database of the old partitiontblName - table name of the old partitionnewParts - list of partitionsenvironmentContext - key value pairs to pass to alter function.InvalidOperationException - 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(String dbName, String tblName, List<Partition> newParts, EnvironmentContext environmentContext, String writeIdList, long writeId) throws InvalidOperationException, MetaException, org.apache.thrift.TException
alter_partitions in interface IMetaStoreClientInvalidOperationExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void alter_partitions(String catName, String dbName, String tblName, List<Partition> newParts, EnvironmentContext environmentContext, String writeIdList, long writeId) throws org.apache.thrift.TException
IMetaStoreClientalter_partitions in interface IMetaStoreClientcatName - catalog name.dbName - database of the old partitiontblName - table name of the old partitionnewParts - list of partitionsenvironmentContext - key value pairs to pass to alter function.InvalidOperationException - if the old partition does not existMetaException - if error in updating metadataorg.apache.thrift.TException - if error in communicating with metastore serverpublic void alterDatabase(String dbName, Database db) throws org.apache.thrift.TException
IMetaStoreClientalterDatabase in interface IMetaStoreClientdbName - database name.db - new database object.NoSuchObjectException - No database of this name exists in the specified catalog.MetaException - something went wrong, usually in the RDBMS.org.apache.thrift.TException - general thrift error.public void alterDatabase(String catName, String dbName, Database newDb) throws org.apache.thrift.TException
IMetaStoreClientalterDatabase in interface IMetaStoreClientcatName - Catalog name. This can be null, in which case
Warehouse.DEFAULT_CATALOG_NAME will be assumed.dbName - database name.newDb - new database object.NoSuchObjectException - No database of this name exists in the specified catalog.MetaException - something went wrong, usually in the RDBMS.org.apache.thrift.TException - general thrift error.public List<FieldSchema> getFields(String db, String tableName) throws org.apache.thrift.TException
IMetaStoreClientgetFields in interface IMetaStoreClientdb - database nametableName - table nameUnknownTableException - no such tableUnknownDBException - no such databaseMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic List<FieldSchema> getFields(String catName, String db, String tableName) throws org.apache.thrift.TException
IMetaStoreClientgetFields in interface IMetaStoreClientcatName - catalog namedb - database nametableName - table nameUnknownTableException - no such tableUnknownDBException - no such databaseMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic GetFieldsResponse getFieldsRequest(GetFieldsRequest req) throws MetaException, org.apache.thrift.TException, UnknownTableException, UnknownDBException
IMetaStoreClientgetFieldsRequest in interface IMetaStoreClientMetaException - error accessing the RDBMSUnknownTableException - no such tableUnknownDBException - no such databaseorg.apache.thrift.TException - thrift transport errorpublic List<SQLPrimaryKey> getPrimaryKeys(PrimaryKeysRequest req) throws org.apache.thrift.TException
IMetaStoreClientgetPrimaryKeys in interface IMetaStoreClientreq - Request infoMetaException - error reading the RDBMSNoSuchObjectException - no primary key exists on this table, or maybe no such tableorg.apache.thrift.TException - thrift transport errorprotected PrimaryKeysResponse getPrimaryKeysInternal(PrimaryKeysRequest req) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<SQLForeignKey> getForeignKeys(ForeignKeysRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
IMetaStoreClientgetForeignKeys in interface IMetaStoreClientreq - Request infoMetaException - error reading the RDBMSNoSuchObjectException - no foreign key exists on this table, or maybe no such tableorg.apache.thrift.TException - thrift transport errorprotected ForeignKeysResponse getForeignKeysInternal(ForeignKeysRequest req) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<SQLUniqueConstraint> getUniqueConstraints(UniqueConstraintsRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
IMetaStoreClientgetUniqueConstraints in interface IMetaStoreClientreq - Request infoMetaException - error reading the RDBMSNoSuchObjectException - no unique constraint on this table, or maybe no such tableorg.apache.thrift.TException - thrift transport errorprotected UniqueConstraintsResponse getUniqueConstraintsInternal(UniqueConstraintsRequest req) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<SQLNotNullConstraint> getNotNullConstraints(NotNullConstraintsRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
IMetaStoreClientgetNotNullConstraints in interface IMetaStoreClientreq - Request infoMetaException - error reading the RDBMSNoSuchObjectException - no not null constraint on this table, or maybe no such tableorg.apache.thrift.TException - thrift transport errorprotected NotNullConstraintsResponse getNotNullConstraintsInternal(NotNullConstraintsRequest req) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<SQLDefaultConstraint> getDefaultConstraints(DefaultConstraintsRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
getDefaultConstraints in interface IMetaStoreClientMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic List<SQLCheckConstraint> getCheckConstraints(CheckConstraintsRequest req) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
getCheckConstraints in interface IMetaStoreClientMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic SQLAllTableConstraints getAllTableConstraints(AllTableConstraintsRequest req) throws MetaException, org.apache.thrift.TException
getAllTableConstraints in interface IMetaStoreClientreq - request infoMetaExceptionorg.apache.thrift.TExceptionNoSuchObjectExceptionpublic boolean updateTableColumnStatistics(ColumnStatistics statsObj) throws org.apache.thrift.TException
updateTableColumnStatistics in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionInvalidInputExceptionpublic boolean updatePartitionColumnStatistics(ColumnStatistics statsObj) throws org.apache.thrift.TException
IMetaStoreClientupdatePartitionColumnStatistics in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionInvalidInputExceptionpublic boolean setPartitionColumnStatistics(SetPartitionsStatsRequest request) throws org.apache.thrift.TException
IMetaStoreClientsetPartitionColumnStatistics in interface IMetaStoreClientrequest - request object, contains all the table, partition, and statistics informationNoSuchObjectException - the table, partition, or columns specified do not exist.InvalidObjectException - the stats object is not valid.MetaException - error accessing the RDBMS.org.apache.thrift.TException - thrift transport error.InvalidInputException - the input is invalid (eg, a null table name)public void flushCache()
IMetaStoreClientflushCache in interface IMetaStoreClientpublic List<ColumnStatisticsObj> getTableColumnStatistics(String dbName, String tableName, List<String> colNames, String engine) throws org.apache.thrift.TException
IMetaStoreClientIMetaStoreClient.getPartitionColumnStatistics(String, String, List, List, String).getTableColumnStatistics in interface IMetaStoreClientdbName - database nametableName - table namecolNames - list of column namesengine - engine sending the requestNoSuchObjectException - no such tableMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic List<ColumnStatisticsObj> getTableColumnStatistics(String catName, String dbName, String tableName, List<String> colNames, String engine) throws org.apache.thrift.TException
IMetaStoreClientIMetaStoreClient.getPartitionColumnStatistics(String, String, String, List, List, String).getTableColumnStatistics in interface IMetaStoreClientcatName - catalog namedbName - database nametableName - table namecolNames - list of column namesengine - engine sending the requestNoSuchObjectException - no such tableMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorprotected TableStatsResult getTableColumnStatisticsInternal(TableStatsRequest rqst) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<ColumnStatisticsObj> getTableColumnStatistics(String dbName, String tableName, List<String> colNames, String engine, String validWriteIdList) throws org.apache.thrift.TException
getTableColumnStatistics in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic List<ColumnStatisticsObj> getTableColumnStatistics(String catName, String dbName, String tableName, List<String> colNames, String engine, String validWriteIdList) throws org.apache.thrift.TException
getTableColumnStatistics in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic Map<String,List<ColumnStatisticsObj>> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNames, List<String> colNames, String engine) throws org.apache.thrift.TException
IMetaStoreClientgetPartitionColumnStatistics in interface IMetaStoreClientdbName - database nametableName - table namepartNames - partition names. Since these are names they should be of the form
"key1=value1[/key2=value2...]"colNames - list of column namesengine - engine sending the requestNoSuchObjectException - no such partitionMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic Map<String,List<ColumnStatisticsObj>> getPartitionColumnStatistics(String catName, String dbName, String tableName, List<String> partNames, List<String> colNames, String engine) throws org.apache.thrift.TException
IMetaStoreClientgetPartitionColumnStatistics in interface IMetaStoreClientcatName - catalog namedbName - database nametableName - table namepartNames - partition names. Since these are names they should be of the form
"key1=value1[/key2=value2...]"colNames - list of column namesengine - engine sending the requestNoSuchObjectException - no such partitionMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic boolean deletePartitionColumnStatistics(String dbName, String tableName, String partName, String colName, String engine) throws org.apache.thrift.TException
IMetaStoreClientdeletePartitionColumnStatistics in interface IMetaStoreClientdbName - database name.tableName - table name.partName - partition name.colName - column name, or null for all columnsengine - engine, or null for all enginesNoSuchObjectException - no such partition existsInvalidObjectException - error dropping the stats dataMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorInvalidInputException - input is invalid or null.public boolean deletePartitionColumnStatistics(String catName, String dbName, String tableName, String partName, String colName, String engine) throws org.apache.thrift.TException
IMetaStoreClientdeletePartitionColumnStatistics in interface IMetaStoreClientcatName - catalog name.dbName - database name.tableName - table name.partName - partition name.colName - column name, or null for all columnsengine - engine, or null for all enginesNoSuchObjectException - no such partition existsInvalidObjectException - error dropping the stats dataMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorInvalidInputException - input is invalid or null.public boolean deleteTableColumnStatistics(String dbName, String tableName, String colName, String engine) throws org.apache.thrift.TException
IMetaStoreClientdeleteTableColumnStatistics in interface IMetaStoreClientdbName - database nametableName - table namecolName - column name, or null to drop stats for all columnsengine - engine, or null for all enginesNoSuchObjectException - No such tableMetaException - error accessing the RDBMSInvalidObjectException - error dropping the statsorg.apache.thrift.TException - thrift transport errorInvalidInputException - bad input, like a null table name.public boolean deleteTableColumnStatistics(String catName, String dbName, String tableName, String colName, String engine) throws org.apache.thrift.TException
IMetaStoreClientdeleteTableColumnStatistics in interface IMetaStoreClientcatName - catalog namedbName - database nametableName - table namecolName - column name, or null to drop stats for all columnsengine - engine, or null for all enginesNoSuchObjectException - No such tableMetaException - error accessing the RDBMSInvalidObjectException - error dropping the statsorg.apache.thrift.TException - thrift transport errorInvalidInputException - bad input, like a null table name.public void updateTransactionalStatistics(UpdateTransactionalStatsRequest req) throws org.apache.thrift.TException
updateTransactionalStatistics in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic List<FieldSchema> getSchema(String db, String tableName) throws org.apache.thrift.TException
IMetaStoreClientgetSchema in interface IMetaStoreClientdb - database nametableName - table nameUnknownTableException - no such tableUnknownDBException - no such databaseMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic List<FieldSchema> getSchema(String catName, String db, String tableName) throws org.apache.thrift.TException
IMetaStoreClientgetSchema in interface IMetaStoreClientcatName - catalog namedb - database nametableName - table nameUnknownTableException - no such tableUnknownDBException - no such databaseMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic GetSchemaResponse getSchemaRequest(GetSchemaRequest req) throws MetaException, org.apache.thrift.TException, UnknownTableException, UnknownDBException
IMetaStoreClientgetSchemaRequest in interface IMetaStoreClientMetaException - error accessing the RDBMSUnknownTableException - no such tableUnknownDBException - no such databaseorg.apache.thrift.TException - thrift transport errorpublic String getConfigValue(String name, String defaultValue) throws org.apache.thrift.TException, ConfigValSecurityException
getConfigValue in interface IMetaStoreClientname - name of the configuration property to get the value ofdefaultValue - the value to return if property with the given name doesn't existorg.apache.thrift.TExceptionConfigValSecurityExceptionprotected String getConfigValueInternal(String name, String defaultValue) throws org.apache.thrift.TException, ConfigValSecurityException
org.apache.thrift.TExceptionConfigValSecurityExceptionpublic Partition getPartition(String db, String tableName, String partName) throws org.apache.thrift.TException
IMetaStoreClientgetPartition in interface IMetaStoreClientdb - database name.tableName - table name.partName - - partition name i.e. 'ds=2010-02-03/ts=2010-02-03 18%3A16%3A01'MetaException - error access the RDBMS.org.apache.thrift.TException - thrift transport errorpublic Partition getPartition(String catName, String dbName, String tblName, String name) throws org.apache.thrift.TException
IMetaStoreClientgetPartition in interface IMetaStoreClientcatName - catalog name.dbName - database name.tblName - table name.name - - partition name i.e. 'ds=2010-02-03/ts=2010-02-03 18%3A16%3A01'MetaException - error access the RDBMS.org.apache.thrift.TException - thrift transport errorpublic Partition appendPartitionByName(String dbName, String tableName, String partName) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionpublic Partition appendPartitionByName(String dbName, String tableName, String partName, EnvironmentContext envContext) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
InvalidObjectExceptionAlreadyExistsExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean dropPartitionByName(String dbName, String tableName, String partName, boolean deleteData) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean dropPartitionByName(String dbName, String tableName, String partName, boolean deleteData, EnvironmentContext envContext) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
NoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic List<String> partitionNameToVals(String name) throws MetaException, org.apache.thrift.TException
partitionNameToVals in interface IMetaStoreClientname - the partition name e.g. ("ds=2010-03-03/hr=12")MetaExceptionorg.apache.thrift.TExceptionpublic Map<String,String> partitionNameToSpec(String name) throws MetaException, org.apache.thrift.TException
partitionNameToSpec in interface IMetaStoreClientname - the partition name e.g. ("ds=2010-03-03/hr=12")MetaExceptionorg.apache.thrift.TExceptionprotected PrincipalPrivilegeSet deepCopy(PrincipalPrivilegeSet pps)
protected List<FieldSchema> deepCopyFieldSchemas(List<FieldSchema> schemas)
public boolean grant_role(String roleName, String userName, PrincipalType principalType, String grantor, PrincipalType grantorType, boolean grantOption) throws MetaException, org.apache.thrift.TException
grant_role in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic boolean create_role(Role role) throws MetaException, org.apache.thrift.TException
create_role in interface IMetaStoreClientrole - role objectMetaExceptionorg.apache.thrift.TExceptionpublic boolean drop_role(String roleName) throws MetaException, org.apache.thrift.TException
drop_role in interface IMetaStoreClientroleName - role nameMetaExceptionorg.apache.thrift.TExceptionpublic List<Role> list_roles(String principalName, PrincipalType principalType) throws MetaException, org.apache.thrift.TException
list_roles in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic List<String> listRoleNames() throws MetaException, org.apache.thrift.TException
IMetaStoreClientlistRoleNames in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic GetPrincipalsInRoleResponse get_principals_in_role(GetPrincipalsInRoleRequest req) throws MetaException, org.apache.thrift.TException
IMetaStoreClientget_principals_in_role in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic GetRoleGrantsForPrincipalResponse get_role_grants_for_principal(GetRoleGrantsForPrincipalRequest getRolePrincReq) throws MetaException, org.apache.thrift.TException
IMetaStoreClientget_role_grants_for_principal in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic boolean grant_privileges(PrivilegeBag privileges) throws MetaException, org.apache.thrift.TException
grant_privileges in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic boolean revoke_role(String roleName, String userName, PrincipalType principalType, boolean grantOption) throws MetaException, org.apache.thrift.TException
revoke_role in interface IMetaStoreClientroleName - role nameuserName - user nameMetaExceptionorg.apache.thrift.TExceptionpublic boolean revoke_privileges(PrivilegeBag privileges, boolean grantOption) throws MetaException, org.apache.thrift.TException
revoke_privileges in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic boolean refresh_privileges(HiveObjectRef objToRefresh, String authorizer, PrivilegeBag grantPrivileges) throws MetaException, org.apache.thrift.TException
refresh_privileges in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String userName, List<String> groupNames) throws MetaException, org.apache.thrift.TException
IMetaStoreClientget_privilege_set in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic List<HiveObjectPrivilege> list_privileges(String principalName, PrincipalType principalType, HiveObjectRef hiveObject) throws MetaException, org.apache.thrift.TException
IMetaStoreClientlist_privileges in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic String getDelegationToken(String renewerKerberosPrincipalName) throws MetaException, org.apache.thrift.TException, IOException
MetaExceptionorg.apache.thrift.TExceptionIOExceptionpublic String getDelegationToken(String owner, String renewerKerberosPrincipalName) throws MetaException, org.apache.thrift.TException
IMetaStoreClientgetDelegationToken in interface IMetaStoreClientowner - the intended owner for the tokenMetaExceptionorg.apache.thrift.TExceptionpublic long renewDelegationToken(String tokenStrForm) throws MetaException, org.apache.thrift.TException
renewDelegationToken in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic void cancelDelegationToken(String tokenStrForm) throws MetaException, org.apache.thrift.TException
cancelDelegationToken in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic boolean addToken(String tokenIdentifier, String delegationToken) throws org.apache.thrift.TException
addToken in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic boolean removeToken(String tokenIdentifier) throws org.apache.thrift.TException
removeToken in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic String getToken(String tokenIdentifier) throws org.apache.thrift.TException
getToken in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic List<String> getAllTokenIdentifiers() throws org.apache.thrift.TException
getAllTokenIdentifiers in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic int addMasterKey(String key) throws MetaException, org.apache.thrift.TException
addMasterKey in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic void updateMasterKey(Integer seqNo, String key) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
updateMasterKey in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic boolean removeMasterKey(Integer keySeq) throws org.apache.thrift.TException
removeMasterKey in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic String[] getMasterKeys() throws org.apache.thrift.TException
getMasterKeys in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic GetOpenTxnsResponse getOpenTxns() throws org.apache.thrift.TException
getOpenTxns in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic ValidTxnList getValidTxns() throws org.apache.thrift.TException
IMetaStoreClientgetValidTxns in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic ValidTxnList getValidTxns(long currentTxn) throws org.apache.thrift.TException
IMetaStoreClientgetValidTxns in interface IMetaStoreClientcurrentTxn - 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.TExceptionpublic ValidTxnList getValidTxns(long currentTxn, List<TxnType> excludeTxnTypes) throws org.apache.thrift.TException
IMetaStoreClientgetValidTxns in interface IMetaStoreClientcurrentTxn - The current transaction of the caller. This will be removed from the
exceptions list so that the caller sees records from his own transaction.excludeTxnTypes - list of transaction types that should be excluded from the valid transaction list.org.apache.thrift.TExceptionpublic ValidWriteIdList getValidWriteIds(String fullTableName) throws org.apache.thrift.TException
IMetaStoreClientgetValidWriteIds in interface IMetaStoreClientfullTableName - full table name of format <db_name>.<table_name>org.apache.thrift.TExceptionpublic ValidWriteIdList getValidWriteIds(String fullTableName, Long writeId) throws org.apache.thrift.TException
IMetaStoreClientgetValidWriteIds in interface IMetaStoreClientfullTableName - full table name of format <db_name>.<table_name>writeId - The write id to get the corresponding txnorg.apache.thrift.TExceptionpublic List<TableValidWriteIds> getValidWriteIds(List<String> tablesList, String validTxnList) throws org.apache.thrift.TException
IMetaStoreClientgetValidWriteIds in interface IMetaStoreClienttablesList - list of tables (format: <db_name>.<table_name>) read from the current transaction
for which needs to populate the valid write idsvalidTxnList - snapshot of valid txns for the current txnorg.apache.thrift.TExceptionprotected GetValidWriteIdsResponse getValidWriteIdsInternal(GetValidWriteIdsRequest rqst) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic void addWriteIdsToMinHistory(long txnId,
Map<String,Long> writeIds)
throws org.apache.thrift.TException
IMetaStoreClientaddWriteIdsToMinHistory in interface IMetaStoreClienttxnId - transaction identifierwriteIds - list of minOpenWriteIdorg.apache.thrift.TExceptionpublic long openTxn(String user) throws org.apache.thrift.TException
IMetaStoreClientopenTxn in interface IMetaStoreClientuser - 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.TExceptionpublic long openTxn(String user, TxnType txnType) throws org.apache.thrift.TException
IMetaStoreClientopenTxn in interface IMetaStoreClientuser - User who is opening this transaction.txnType - Type of needed transaction.org.apache.thrift.TExceptionpublic List<Long> replOpenTxn(String replPolicy, List<Long> srcTxnIds, String user, TxnType txnType) throws org.apache.thrift.TException
IMetaStoreClientreplOpenTxn in interface IMetaStoreClientreplPolicy - Contains replication policy to uniquely identify the source cluster in case of repl replayed txns
or database under replication name for hive replication txnssrcTxnIds - The list of transaction ids at the source cluster in case of repl replayed transactions
or null in case of hive replication transactions.user - The user who has fired the command.txnType - Type of transaction to open: REPL_CREATED for repl replayed transactions
DEFAULT for hive replication transactions.org.apache.thrift.TExceptionpublic OpenTxnsResponse openTxns(String user, int numTxns) throws org.apache.thrift.TException
IMetaStoreClientIncreasing 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.
openTxns in interface IMetaStoreClientuser - 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.TExceptionpublic void rollbackTxn(long txnid)
throws NoSuchTxnException,
org.apache.thrift.TException
IMetaStoreClientrollbackTxn in interface IMetaStoreClienttxnid - 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.TExceptionpublic void rollbackTxn(AbortTxnRequest abortTxnRequest) throws NoSuchTxnException, org.apache.thrift.TException
IMetaStoreClientrollbackTxn in interface IMetaStoreClientabortTxnRequest - AbortTxnRequest object containing transaction id and
error codes.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.TExceptionpublic void replRollbackTxn(long srcTxnId,
String replPolicy,
TxnType txnType)
throws NoSuchTxnException,
org.apache.thrift.TException
IMetaStoreClientreplRollbackTxn in interface IMetaStoreClientsrcTxnId - id of transaction at source while is rolled back and to be replicated
or null in case of hive replication transactionsreplPolicy - Contains replication policy to uniquely identify the source cluster in case of repl replayed txns
or database under replication name for hive replication txnstxnType - Type of transaction to Rollback: REPL_CREATED for repl replayed transactions
DEFAULT for hive replication transactions.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.TExceptionpublic void commitTxn(long txnid)
throws NoSuchTxnException,
TxnAbortedException,
org.apache.thrift.TException
IMetaStoreClientcommitTxn in interface IMetaStoreClienttxnid - 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.TExceptionpublic void commitTxnWithKeyValue(long txnid,
long tableId,
String key,
String value)
throws NoSuchTxnException,
TxnAbortedException,
org.apache.thrift.TException
IMetaStoreClientcommitTxnWithKeyValue in interface IMetaStoreClienttxnid - id of transaction to be committed.tableId - id of the table to associate the key/value withkey - key to be committed. It must start with "_meta". The reason
for this is to prevent important keys being updated, like owner.value - value 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.TExceptionpublic void commitTxn(CommitTxnRequest rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException
IMetaStoreClientcommitTxn in interface IMetaStoreClientrqst - Information containing the txn info and write event information
of transaction at source which is committed and to be replicatedNoSuchTxnException - 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.TExceptionpublic GetOpenTxnsInfoResponse showTxns() throws org.apache.thrift.TException
IMetaStoreClientIMetaStoreClient.getValidTxns().showTxns in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic void abortTxns(List<Long> txnids) throws NoSuchTxnException, org.apache.thrift.TException
IMetaStoreClientabortTxns in interface IMetaStoreClientorg.apache.thrift.TExceptionNoSuchTxnExceptionpublic void abortTxns(AbortTxnsRequest abortTxnsRequest) throws NoSuchTxnException, org.apache.thrift.TException
IMetaStoreClientabortTxns in interface IMetaStoreClientabortTxnsRequest - Information containing txnIds and error codesorg.apache.thrift.TExceptionNoSuchTxnExceptionpublic void replTableWriteIdState(String validWriteIdList, String dbName, String tableName, List<String> partNames) throws org.apache.thrift.TException
IMetaStoreClientreplTableWriteIdState in interface IMetaStoreClientvalidWriteIdList - Snapshot of writeid list when the table/partition is dumped.dbName - Database nametableName - Table which is written.partNames - List of partitions being written.org.apache.thrift.TException - in case of failure to replicate the writeid statepublic long allocateTableWriteId(long txnId,
String dbName,
String tableName)
throws org.apache.thrift.TException
IMetaStoreClientallocateTableWriteId in interface IMetaStoreClienttxnId - id of transaction to which the allocated write ID to be associated.dbName - name of DB in which the table belongs.tableName - table to which the write ID to be allocatedorg.apache.thrift.TExceptionpublic long allocateTableWriteId(long txnId,
String dbName,
String tableName,
boolean shouldRealloc)
throws org.apache.thrift.TException
IMetaStoreClientallocateTableWriteId in interface IMetaStoreClienttxnId - id of transaction to which the allocated write ID to be associated.dbName - name of DB in which the table belongs.tableName - table to which the write ID to be allocatedshouldRealloc - should we reallocate already mapped writeId (if true) or reuse (if false)org.apache.thrift.TExceptionpublic List<TxnToWriteId> allocateTableWriteIdsBatch(List<Long> txnIds, String dbName, String tableName) throws org.apache.thrift.TException
IMetaStoreClientallocateTableWriteIdsBatch in interface IMetaStoreClienttxnIds - ids of transaction batchto which the allocated write ID to be associated.dbName - name of DB in which the table belongs.tableName - table to which the write ID to be allocatedorg.apache.thrift.TExceptionpublic List<TxnToWriteId> replAllocateTableWriteIdsBatch(String dbName, String tableName, String replPolicy, List<TxnToWriteId> srcTxnToWriteIdList) throws org.apache.thrift.TException
IMetaStoreClientreplAllocateTableWriteIdsBatch in interface IMetaStoreClientdbName - name of DB in which the table belongs.tableName - table to which the write ID to be allocatedreplPolicy - Used by replication task to identify the source cluster.srcTxnToWriteIdList - List of txn to write id map sent from the source cluster.org.apache.thrift.TExceptionpublic long getMaxAllocatedWriteId(String dbName, String tableName) throws org.apache.thrift.TException
IMetaStoreClientgetMaxAllocatedWriteId in interface IMetaStoreClientdbName - name of DB in which the table belongs.tableName - table from which the writeId is queriedorg.apache.thrift.TExceptionpublic void seedWriteId(String dbName, String tableName, long seedWriteId) throws org.apache.thrift.TException
IMetaStoreClientseedWriteId in interface IMetaStoreClientdbName - name of DB in which the table belongs.tableName - table to which the writeId will be setseedWriteId - the start value of writeIdorg.apache.thrift.TExceptionpublic void seedTxnId(long seedTxnId)
throws org.apache.thrift.TException
IMetaStoreClientseedTxnId in interface IMetaStoreClientseedTxnId - The seed value for the next transactionsorg.apache.thrift.TExceptionpublic LockResponse lock(LockRequest request) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException
IMetaStoreClientIf 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, IMetaStoreClient.heartbeat(long, long) must be called
on a regular basis to avoid the lock being timed out by the system.
lock in interface IMetaStoreClientrequest - The lock request. LockRequestBuilder can be used
construct this request.IMetaStoreClient.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.TExceptionpublic LockResponse checkLock(long lockid) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, org.apache.thrift.TException
IMetaStoreClientIMetaStoreClient.lock(org.apache.hadoop.hive.metastore.api.LockRequest) call.
Once a lock is acquired, IMetaStoreClient.heartbeat(long, long) must be called
on a regular basis to avoid the lock being timed out by the system.checkLock in interface IMetaStoreClientlockid - 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.TExceptionpublic void unlock(long lockid)
throws NoSuchLockException,
TxnOpenException,
org.apache.thrift.TException
IMetaStoreClientunlock in interface IMetaStoreClientlockid - lock id returned by
IMetaStoreClient.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@Deprecated public ShowLocksResponse showLocks() throws org.apache.thrift.TException
IMetaStoreClientshowLocks in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic ShowLocksResponse showLocks(ShowLocksRequest request) throws org.apache.thrift.TException
IMetaStoreClientshowLocks in interface IMetaStoreClientrequest - SHOW LOCK requestorg.apache.thrift.TExceptionpublic void heartbeat(long txnid,
long lockid)
throws NoSuchLockException,
NoSuchTxnException,
TxnAbortedException,
org.apache.thrift.TException
IMetaStoreClientheartbeat in interface IMetaStoreClienttxnid - 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.NoSuchLockException - if the requested lockid does not exist.
This can result from the lock timing out and being unlocked by the system.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.TExceptionpublic HeartbeatTxnRangeResponse heartbeatTxnRange(long min, long max) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException
IMetaStoreClientIMetaStoreClient.heartbeat(long, long).heartbeatTxnRange in interface IMetaStoreClientmin - minimum transaction id to heartbeat, inclusivemax - maximum transaction id to heartbeat, inclusiveorg.apache.thrift.TExceptionNoSuchTxnExceptionTxnAbortedException@Deprecated public void compact(String dbname, String tableName, String partitionName, CompactionType type) throws org.apache.thrift.TException
IMetaStoreClientcompact in interface IMetaStoreClientdbname - 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@Deprecated public void compact(String dbname, String tableName, String partitionName, CompactionType type, Map<String,String> tblproperties) throws org.apache.thrift.TException
compact in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic CompactionResponse compact2(String dbname, String tableName, String partitionName, CompactionType type, Map<String,String> tblproperties) throws org.apache.thrift.TException
IMetaStoreClientcompact2 in interface IMetaStoreClientdbname - 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.tblproperties - the list of tblproperties to override for this compact. Can be null.org.apache.thrift.TExceptionpublic CompactionResponse compact2(CompactionRequest request) throws org.apache.thrift.TException
IMetaStoreClientcompact2 in interface IMetaStoreClientrequest - The CompactionRequest object containing the details required to enqueue
a compaction request.org.apache.thrift.TExceptionpublic ShowCompactResponse showCompactions() throws org.apache.thrift.TException
IMetaStoreClientshowCompactions in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic ShowCompactResponse showCompactions(ShowCompactRequest request) throws org.apache.thrift.TException
IMetaStoreClientshowCompactions in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic boolean submitForCleanup(CompactionRequest rqst, long highestWriteId, long txnId) throws org.apache.thrift.TException
IMetaStoreClientsubmitForCleanup in interface IMetaStoreClientrqst - Request containing the table directory which needs to be cleaned up.highestWriteId - The highest write ID that was used while writing the table directory.txnId - The transaction ID of the query.org.apache.thrift.TExceptionpublic GetLatestCommittedCompactionInfoResponse getLatestCommittedCompactionInfo(GetLatestCommittedCompactionInfoRequest request) throws org.apache.thrift.TException
IMetaStoreClientgetLatestCommittedCompactionInfo in interface IMetaStoreClientrequest - info on which compaction to retrieveorg.apache.thrift.TException@Deprecated public void addDynamicPartitions(long txnId, long writeId, String dbName, String tableName, List<String> partNames) throws org.apache.thrift.TException
addDynamicPartitions in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic void addDynamicPartitions(long txnId,
long writeId,
String dbName,
String tableName,
List<String> partNames,
DataOperationType operationType)
throws org.apache.thrift.TException
IMetaStoreClientaddDynamicPartitions in interface IMetaStoreClienttxnId - id of the transactionwriteId - table write id for this txndbName - database nametableName - table namepartNames - partition name, as constructed by Warehouse.makePartNameorg.apache.thrift.TExceptionpublic void insertTable(Table table, boolean overwrite) throws MetaException
IMetaStoreClientinsertTable in interface IMetaStoreClienttable - table nameoverwrite - true if the insert is overwriteMetaExceptionpublic long getLatestTxnIdInConflict(long txnId)
throws org.apache.thrift.TException
IMetaStoreClientgetLatestTxnIdInConflict in interface IMetaStoreClientorg.apache.thrift.TException@InterfaceAudience.LimitedPrivate(value="HCatalog") public NotificationEventResponse getNextNotification(long lastEventId, int maxEvents, IMetaStoreClient.NotificationFilter filter) throws org.apache.thrift.TException
IMetaStoreClientgetNextNotification in interface IMetaStoreClientlastEventId - 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.TExceptionpublic NotificationEventResponse getNextNotification(NotificationEventRequest request, boolean allowGapsInEventIds, IMetaStoreClient.NotificationFilter filter) throws org.apache.thrift.TException
IMetaStoreClientgetNextNotification in interface IMetaStoreClientrequest - The NotificationEventRequest request to be sent to the server
to fetch the next set of events.allowGapsInEventIds - If this flag is true, the returned event ids may contain
gaps in the event ids. This could happen if on the server
side some of the events since the requested eventId have
been garbage collected. If the flag is false, the method
will throw MetaException if the returned events
from the server are not in sequence from the requested
event id.filter - User provided filter to remove unwanted events. If null, all events will be
returned.org.apache.thrift.TException@InterfaceAudience.LimitedPrivate(value="HCatalog") public CurrentNotificationEventId getCurrentNotificationEventId() throws org.apache.thrift.TException
IMetaStoreClientgetCurrentNotificationEventId in interface IMetaStoreClientorg.apache.thrift.TException@InterfaceAudience.LimitedPrivate(value="HCatalog") public NotificationEventsCountResponse getNotificationEventsCount(NotificationEventsCountRequest rqst) throws org.apache.thrift.TException
IMetaStoreClientgetNotificationEventsCount in interface IMetaStoreClientorg.apache.thrift.TException@InterfaceAudience.LimitedPrivate(value="Apache Hive, HCatalog") public FireEventResponse fireListenerEvent(FireEventRequest rqst) throws org.apache.thrift.TException
IMetaStoreClientfireListenerEvent in interface IMetaStoreClientorg.apache.thrift.TException@InterfaceAudience.LimitedPrivate(value="Apache Hive, HCatalog") public void addWriteNotificationLog(WriteNotificationLogRequest rqst) throws org.apache.thrift.TException
IMetaStoreClientaddWriteNotificationLog in interface IMetaStoreClientrqst - message containing information for acid write operation.org.apache.thrift.TException@InterfaceAudience.LimitedPrivate(value="Apache Hive, HCatalog") public void addWriteNotificationLogInBatch(WriteNotificationLogBatchRequest rqst) throws org.apache.thrift.TException
IMetaStoreClientaddWriteNotificationLogInBatch in interface IMetaStoreClientrqst - message containing information for acid write operations.org.apache.thrift.TExceptionpublic static IMetaStoreClient newSynchronizedClient(IMetaStoreClient client)
IMetaStoreClient.
This may be used by multi-threaded applications until we have
fixed all reentrancy bugs.client - unsynchronized clientpublic void markPartitionForEvent(String db_name, String tbl_name, Map<String,String> partKVs, PartitionEventType eventType) throws org.apache.thrift.TException
IMetaStoreClientmarkPartitionForEvent in interface IMetaStoreClientdb_name - database nametbl_name - table namepartKVs - key value pairs that describe the partitioneventType - type of the eventMetaException - error access the RDBMSNoSuchObjectException - never throws this AFAICTorg.apache.thrift.TException - thrift transport errorUnknownTableException - no such tableUnknownDBException - no such databaseUnknownPartitionException - no such partitionInvalidPartitionException - partition partKVs is invalidpublic void markPartitionForEvent(String catName, String db_name, String tbl_name, Map<String,String> partKVs, PartitionEventType eventType) throws org.apache.thrift.TException
IMetaStoreClientmarkPartitionForEvent in interface IMetaStoreClientcatName - catalog namedb_name - database nametbl_name - table namepartKVs - key value pairs that describe the partitioneventType - type of the eventMetaException - error access the RDBMSNoSuchObjectException - never throws this AFAICTorg.apache.thrift.TException - thrift transport errorUnknownTableException - no such tableUnknownDBException - no such databaseUnknownPartitionException - no such partitionInvalidPartitionException - partition partKVs is invalidpublic boolean isPartitionMarkedForEvent(String db_name, String tbl_name, Map<String,String> partKVs, PartitionEventType eventType) throws org.apache.thrift.TException
IMetaStoreClientisPartitionMarkedForEvent in interface IMetaStoreClientdb_name - database nametbl_name - table name.partKVs - key value pairs that describe the partition.eventType - event typeMetaException - error access the RDBMSNoSuchObjectException - never throws this AFAICTorg.apache.thrift.TException - thrift transport errorUnknownTableException - no such tableUnknownDBException - no such databaseUnknownPartitionException - no such partitionInvalidPartitionException - partition partKVs is invalidpublic boolean isPartitionMarkedForEvent(String catName, String db_name, String tbl_name, Map<String,String> partKVs, PartitionEventType eventType) throws org.apache.thrift.TException
IMetaStoreClientisPartitionMarkedForEvent in interface IMetaStoreClientcatName - catalog namedb_name - database nametbl_name - table name.partKVs - key value pairs that describe the partition.eventType - event typeMetaException - error access the RDBMSNoSuchObjectException - never throws this AFAICTorg.apache.thrift.TException - thrift transport errorUnknownTableException - no such tableUnknownDBException - no such databaseUnknownPartitionException - no such partitionInvalidPartitionException - partition partKVs is invalidpublic void createFunction(Function func) throws org.apache.thrift.TException
IMetaStoreClientcreateFunction in interface IMetaStoreClientfunc - function specificationInvalidObjectException - the function object is invalidMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic void alterFunction(String dbName, String funcName, Function newFunction) throws org.apache.thrift.TException
IMetaStoreClientalterFunction in interface IMetaStoreClientdbName - database name.funcName - function name.newFunction - new function specification. This should be complete, not just the changes.InvalidObjectException - the function object is invalidMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic void alterFunction(String catName, String dbName, String funcName, Function newFunction) throws org.apache.thrift.TException
IMetaStoreClientalterFunction in interface IMetaStoreClientcatName - catalog name.dbName - database name.funcName - function name.newFunction - new function specification. This should be complete, not just the changes.InvalidObjectException - the function object is invalidMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic void dropFunction(String dbName, String funcName) throws org.apache.thrift.TException
IMetaStoreClientdropFunction in interface IMetaStoreClientdbName - database name.funcName - function name.MetaException - error accessing the RDBMSNoSuchObjectException - no such functionInvalidObjectException - not sure when this is thrownInvalidInputException - not sure when this is thrownorg.apache.thrift.TException - thrift transport errorpublic void dropFunction(String catName, String dbName, String funcName) throws org.apache.thrift.TException
IMetaStoreClientdropFunction in interface IMetaStoreClientcatName - catalog name.dbName - database name.funcName - function name.MetaException - error accessing the RDBMSNoSuchObjectException - no such functionInvalidObjectException - not sure when this is thrownInvalidInputException - not sure when this is thrownorg.apache.thrift.TException - thrift transport errorpublic Function getFunction(String dbName, String funcName) throws org.apache.thrift.TException
IMetaStoreClientgetFunction in interface IMetaStoreClientdbName - database name.funcName - function name.MetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic Function getFunction(String catName, String dbName, String funcName) throws org.apache.thrift.TException
IMetaStoreClientgetFunction in interface IMetaStoreClientcatName - catalog name.dbName - database name.funcName - function name.MetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic List<String> getFunctions(String dbName, String pattern) throws org.apache.thrift.TException
IMetaStoreClientgetFunctions in interface IMetaStoreClientdbName - database name.pattern - to match. This is a java regex pattern.MetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic List<String> getFunctions(String catName, String dbName, String pattern) throws org.apache.thrift.TException
IMetaStoreClientgetFunctions in interface IMetaStoreClientcatName - catalog name.dbName - database name.pattern - to match. This is a java regex pattern.MetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorpublic GetAllFunctionsResponse getAllFunctions() throws org.apache.thrift.TException
IMetaStoreClientgetAllFunctions in interface IMetaStoreClientMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport errorprotected void create_table(CreateTableRequest request) throws InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
InvalidObjectExceptionMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionprotected void drop_table_with_environment_context(String catName, String dbname, String name, boolean deleteData, EnvironmentContext envContext) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic AggrStats getAggrColStatsFor(String dbName, String tblName, List<String> colNames, List<String> partNames, String engine) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
IMetaStoreClientgetAggrColStatsFor in interface IMetaStoreClientdbName - database nametblName - table namecolNames - list of column namespartNames - list of partition names (not values).engine - engine sending the requestNoSuchObjectException - no such tableMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport exceptionpublic AggrStats getAggrColStatsFor(String catName, String dbName, String tblName, List<String> colNames, List<String> partNames, String engine) throws org.apache.thrift.TException
IMetaStoreClientgetAggrColStatsFor in interface IMetaStoreClientcatName - catalog namedbName - database nametblName - table namecolNames - list of column namespartNames - list of partition names (not values).engine - engine sending the requestNoSuchObjectException - no such tableMetaException - error accessing the RDBMSorg.apache.thrift.TException - thrift transport exceptionpublic Iterable<Map.Entry<Long,ByteBuffer>> getFileMetadata(List<Long> fileIds) throws org.apache.thrift.TException
IMetaStoreClientgetFileMetadata in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic Iterable<Map.Entry<Long,MetadataPpdResult>> getFileMetadataBySarg(List<Long> fileIds, ByteBuffer sarg, boolean doGetFooters) throws org.apache.thrift.TException
getFileMetadataBySarg in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic void clearFileMetadata(List<Long> fileIds) throws org.apache.thrift.TException
IMetaStoreClientclearFileMetadata in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic void putFileMetadata(List<Long> fileIds, List<ByteBuffer> metadata) throws org.apache.thrift.TException
IMetaStoreClientputFileMetadata in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic boolean isSameConfObj(org.apache.hadoop.conf.Configuration c)
isSameConfObj in interface IMetaStoreClientpublic boolean cacheFileMetadata(String dbName, String tableName, String partName, boolean allParts) throws org.apache.thrift.TException
cacheFileMetadata in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic String getMetastoreDbUuid() throws org.apache.thrift.TException
IMetaStoreClientgetMetastoreDbUuid in interface IMetaStoreClientMetaException - if HMS is not able to fetch the UUID or if there are multiple UUIDs found in the databaseorg.apache.thrift.TException - in case of Thrift errorspublic void createResourcePlan(WMResourcePlan resourcePlan, String copyFromName) throws InvalidObjectException, MetaException, org.apache.thrift.TException
createResourcePlan in interface IMetaStoreClientInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic WMFullResourcePlan getResourcePlan(String resourcePlanName, String ns) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
getResourcePlan in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic List<WMResourcePlan> getAllResourcePlans(String ns) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
getAllResourcePlans in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void dropResourcePlan(String resourcePlanName, String ns) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
dropResourcePlan in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic WMFullResourcePlan alterResourcePlan(String resourcePlanName, String ns, WMNullableResourcePlan resourcePlan, boolean canActivateDisabled, boolean isForceDeactivate, boolean isReplace) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException
alterResourcePlan in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic WMFullResourcePlan getActiveResourcePlan(String ns) throws MetaException, org.apache.thrift.TException
getActiveResourcePlan in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic WMValidateResourcePlanResponse validateResourcePlan(String resourcePlanName, String ns) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException
validateResourcePlan in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void createWMTrigger(WMTrigger trigger) throws InvalidObjectException, MetaException, org.apache.thrift.TException
createWMTrigger in interface IMetaStoreClientInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void alterWMTrigger(WMTrigger trigger) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException
alterWMTrigger in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void dropWMTrigger(String resourcePlanName, String triggerName, String ns) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
dropWMTrigger in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic List<WMTrigger> getTriggersForResourcePlan(String resourcePlan, String ns) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
getTriggersForResourcePlan in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void createWMPool(WMPool pool) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException
createWMPool in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void alterWMPool(WMNullablePool pool, String poolPath) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException
alterWMPool in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void dropWMPool(String resourcePlanName, String poolPath, String ns) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
dropWMPool in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void createOrUpdateWMMapping(WMMapping mapping, boolean isUpdate) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException
createOrUpdateWMMapping in interface IMetaStoreClientNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void dropWMMapping(WMMapping mapping) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
dropWMMapping in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void createOrDropTriggerToPoolMapping(String resourcePlanName, String triggerName, String poolPath, boolean shouldDrop, String ns) throws AlreadyExistsException, NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException
createOrDropTriggerToPoolMapping in interface IMetaStoreClientAlreadyExistsExceptionNoSuchObjectExceptionInvalidObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic void createISchema(ISchema schema) throws org.apache.thrift.TException
IMetaStoreClientcreateISchema in interface IMetaStoreClientschema - schema to createAlreadyExistsException - if a schema of this name already existsNoSuchObjectException - database references by this schema does not existMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic void alterISchema(String catName, String dbName, String schemaName, ISchema newSchema) throws org.apache.thrift.TException
IMetaStoreClientalterISchema in interface IMetaStoreClientcatName - catalog namedbName - database the schema is inschemaName - name of the schemanewSchema - altered schema objectNoSuchObjectException - no schema with this name could be foundMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic ISchema getISchema(String catName, String dbName, String name) throws org.apache.thrift.TException
IMetaStoreClientgetISchema in interface IMetaStoreClientcatName - catalog namedbName - database the schema is inname - name of the schemaNoSuchObjectException - no schema matching this name existsMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic void dropISchema(String catName, String dbName, String name) throws org.apache.thrift.TException
IMetaStoreClientdropISchema in interface IMetaStoreClientcatName - catalog namedbName - database the schema is inname - name of the schema to dropNoSuchObjectException - no schema with this name could be foundInvalidOperationException - attempt to drop a schema that has versionsMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic void addSchemaVersion(SchemaVersion schemaVersion) throws org.apache.thrift.TException
IMetaStoreClientaddSchemaVersion in interface IMetaStoreClientschemaVersion - version object to addAlreadyExistsException - a version of this schema with the same version id already existsNoSuchObjectException - no schema with this name could be foundMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic SchemaVersion getSchemaVersion(String catName, String dbName, String schemaName, int version) throws org.apache.thrift.TException
IMetaStoreClientgetSchemaVersion in interface IMetaStoreClientdbName - database the schema is inschemaName - name of the schemaversion - version of the schemaNoSuchObjectException - no schema matching this name and version existsMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic SchemaVersion getSchemaLatestVersion(String catName, String dbName, String schemaName) throws org.apache.thrift.TException
IMetaStoreClientgetSchemaLatestVersion in interface IMetaStoreClientcatName - catalog namedbName - database the schema is inschemaName - name of the schemaNoSuchObjectException - no versions of schema matching this name existMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic List<SchemaVersion> getSchemaAllVersions(String catName, String dbName, String schemaName) throws org.apache.thrift.TException
IMetaStoreClientgetSchemaAllVersions in interface IMetaStoreClientcatName - catalog namedbName - database the schema is inschemaName - name of the schema.NoSuchObjectException - no versions of schema matching this name existMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic void dropSchemaVersion(String catName, String dbName, String schemaName, int version) throws org.apache.thrift.TException
IMetaStoreClientdropSchemaVersion in interface IMetaStoreClientcatName - catalog namedbName - database the schema is inschemaName - name of the schemaversion - version of the schemaNoSuchObjectException - no matching version of the schema could be foundMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic FindSchemasByColsResp getSchemaByCols(FindSchemasByColsRqst rqst) throws org.apache.thrift.TException
IMetaStoreClientgetSchemaByCols in interface IMetaStoreClientrqst - query, this can include column names, namespaces (actually stored in the
description field in FieldSchema), and types.MetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic void mapSchemaVersionToSerde(String catName, String dbName, String schemaName, int version, String serdeName) throws org.apache.thrift.TException
IMetaStoreClientmapSchemaVersionToSerde in interface IMetaStoreClientcatName - catalog namedbName - database the schema is inschemaName - name of the schemaversion - version of the schemaserdeName - name of the serdeNoSuchObjectException - no matching version of the schema could be found or no serde
of the provided name could be foundMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic void setSchemaVersionState(String catName, String dbName, String schemaName, int version, SchemaVersionState state) throws org.apache.thrift.TException
IMetaStoreClientsetSchemaVersionState in interface IMetaStoreClientcatName - catalog namedbName - database the schema is inschemaName - name of the schemaversion - version of the schemastate - state to set the schema tooNoSuchObjectException - no matching version of the schema could be foundInvalidOperationException - attempt to make a state change that is not validMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic void addSerDe(SerDeInfo serDeInfo) throws org.apache.thrift.TException
IMetaStoreClientaddSerDe in interface IMetaStoreClientserDeInfo - serde to addAlreadyExistsException - serde of this name already existsMetaException - general metastore errororg.apache.thrift.TException - general thrift errorpublic SerDeInfo getSerDe(String serDeName) throws org.apache.thrift.TException
IMetaStoreClientgetSerDe in interface IMetaStoreClientserDeName - name of the serdeNoSuchObjectException - no serde with this name exists.MetaException - general metastore errororg.apache.thrift.TException - general thrift errorprotected String getValidWriteIdList(String dbName, String tblName)
public LockResponse lockMaterializationRebuild(String dbName, String tableName, long txnId) throws org.apache.thrift.TException
IMetaStoreClientlockMaterializationRebuild in interface IMetaStoreClientdbName - db name for the materialized viewtableName - table name for the materialized viewtxnId - transaction id for the rebuildorg.apache.thrift.TExceptionpublic boolean heartbeatLockMaterializationRebuild(String dbName, String tableName, long txnId) throws org.apache.thrift.TException
IMetaStoreClientheartbeatLockMaterializationRebuild in interface IMetaStoreClientdbName - db name for the materialized viewtableName - table name for the materialized viewtxnId - transaction id for the rebuildorg.apache.thrift.TExceptionpublic void addRuntimeStat(RuntimeStat stat) throws org.apache.thrift.TException
IMetaStoreClientaddRuntimeStat in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic List<RuntimeStat> getRuntimeStats(int maxWeight, int maxCreateTime) throws org.apache.thrift.TException
IMetaStoreClientgetRuntimeStats in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic GetPartitionsResponse getPartitionsWithSpecs(GetPartitionsRequest request) throws org.apache.thrift.TException
IMetaStoreClientgetPartitionsWithSpecs in interface IMetaStoreClientorg.apache.thrift.TException@Deprecated public OptionalCompactionInfoStruct findNextCompact(String workerId) throws org.apache.thrift.TException
IMetaStoreClientfindNextCompact in interface IMetaStoreClientworkerId - id of the worker requesting.CompactionInfoStruct.MetaExceptionorg.apache.thrift.TExceptionpublic OptionalCompactionInfoStruct findNextCompact(FindNextCompactRequest rqst) throws org.apache.thrift.TException
IMetaStoreClientfindNextCompact in interface IMetaStoreClientrqst - Information about the worker id and versionCompactionInfoStruct.MetaExceptionorg.apache.thrift.TExceptionpublic void updateCompactorState(CompactionInfoStruct cr, long txnId) throws org.apache.thrift.TException
IMetaStoreClientupdateCompactorState in interface IMetaStoreClientcr - compaction job being done.txnId - transaction id.org.apache.thrift.TExceptionpublic List<String> findColumnsWithStats(CompactionInfoStruct cr) throws org.apache.thrift.TException
IMetaStoreClientfindColumnsWithStats in interface IMetaStoreClientcr - compaction job.org.apache.thrift.TExceptionpublic void markCleaned(CompactionInfoStruct cr) throws MetaException, org.apache.thrift.TException
IMetaStoreClientmarkCleaned in interface IMetaStoreClientcr - compaction job.MetaExceptionorg.apache.thrift.TExceptionpublic void markCompacted(CompactionInfoStruct cr) throws MetaException, org.apache.thrift.TException
IMetaStoreClientmarkCompacted in interface IMetaStoreClientcr - compaction job.MetaExceptionorg.apache.thrift.TExceptionpublic void markFailed(CompactionInfoStruct cr) throws MetaException, org.apache.thrift.TException
IMetaStoreClientmarkFailed in interface IMetaStoreClientcr - compaction job.MetaExceptionorg.apache.thrift.TExceptionpublic void markRefused(CompactionInfoStruct cr) throws MetaException, org.apache.thrift.TException
IMetaStoreClientmarkRefused in interface IMetaStoreClientcr - compaction job.MetaExceptionorg.apache.thrift.TExceptionpublic boolean updateCompactionMetricsData(CompactionMetricsDataStruct struct) throws MetaException, org.apache.thrift.TException
IMetaStoreClientIf the metric is not found in the metrics cache, it will be created.
If the metric is found, it will be updated. This operation uses an optimistic locking mechanism, meaning if another operation changed the value of this metric, the update will abort and won't be retried.
If the new metric value is below CompactionMetricsDataStruct.getThreshold(), it will be deleted.
updateCompactionMetricsData in interface IMetaStoreClientstruct - the object that is used for the update, always non-nullMetaExceptionorg.apache.thrift.TExceptionpublic void removeCompactionMetricsData(CompactionMetricsDataRequest request) throws MetaException, org.apache.thrift.TException
IMetaStoreClientremoveCompactionMetricsData in interface IMetaStoreClientrequest - the request object, that contains the filter parameters, must be non-nullMetaExceptionorg.apache.thrift.TExceptionpublic void setHadoopJobid(String jobId, long cqId) throws MetaException, org.apache.thrift.TException
IMetaStoreClientsetHadoopJobid in interface IMetaStoreClientjobId - mapreduce job id that will do the compaction.cqId - compaction id.MetaExceptionorg.apache.thrift.TExceptionpublic String getServerVersion() throws org.apache.thrift.TException
IMetaStoreClientgetServerVersion in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic ScheduledQuery getScheduledQuery(ScheduledQueryKey scheduleKey) throws org.apache.thrift.TException
IMetaStoreClientgetScheduledQuery in interface IMetaStoreClientNoSuchObjectException - if an object by the given name dosen't exists.org.apache.thrift.TExceptionpublic void scheduledQueryProgress(ScheduledQueryProgressInfo info) throws org.apache.thrift.TException
IMetaStoreClientscheduledQueryProgress in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic ScheduledQueryPollResponse scheduledQueryPoll(ScheduledQueryPollRequest request) throws MetaException, org.apache.thrift.TException
IMetaStoreClientscheduledQueryPoll in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic void scheduledQueryMaintenance(ScheduledQueryMaintenanceRequest request) throws MetaException, org.apache.thrift.TException
IMetaStoreClientscheduledQueryMaintenance in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic void addReplicationMetrics(ReplicationMetricList replicationMetricList) throws MetaException, org.apache.thrift.TException
IMetaStoreClientaddReplicationMetrics in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic ReplicationMetricList getReplicationMetrics(GetReplicationMetricsRequest replicationMetricsRequest) throws MetaException, org.apache.thrift.TException
getReplicationMetrics in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic void createStoredProcedure(StoredProcedure proc) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
createStoredProcedure in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic StoredProcedure getStoredProcedure(StoredProcedureRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
getStoredProcedure in interface IMetaStoreClientMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic void dropStoredProcedure(StoredProcedureRequest request) throws MetaException, NoSuchObjectException, org.apache.thrift.TException
dropStoredProcedure in interface IMetaStoreClientMetaExceptionNoSuchObjectExceptionorg.apache.thrift.TExceptionpublic List<String> getAllStoredProcedures(ListStoredProcedureRequest request) throws MetaException, org.apache.thrift.TException
getAllStoredProcedures in interface IMetaStoreClientMetaExceptionorg.apache.thrift.TExceptionpublic void addPackage(AddPackageRequest request) throws NoSuchObjectException, MetaException, org.apache.thrift.TException
addPackage in interface IMetaStoreClientNoSuchObjectExceptionMetaExceptionorg.apache.thrift.TExceptionpublic Package findPackage(GetPackageRequest request) throws org.apache.thrift.TException
findPackage in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic List<String> listPackages(ListPackageRequest request) throws org.apache.thrift.TException
listPackages in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic void dropPackage(DropPackageRequest request) throws org.apache.thrift.TException
dropPackage in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic List<WriteEventInfo> getAllWriteEventInfo(GetAllWriteEventInfoRequest request) throws org.apache.thrift.TException
IMetaStoreClientgetAllWriteEventInfo in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic AbortCompactResponse abortCompactions(AbortCompactionRequest request) throws org.apache.thrift.TException
abortCompactions in interface IMetaStoreClientorg.apache.thrift.TExceptionpublic boolean setProperties(String nameSpace, Map<String,String> properties) throws org.apache.thrift.TException
IMetaStoreClientsetProperties in interface IMetaStoreClientnameSpace - the property store namespaceproperties - a map keyed by property path mapped to property valuesorg.apache.thrift.TExceptionpublic Map<String,Map<String,String>> getProperties(String nameSpace, String mapPrefix, String mapPredicate, String... selection) throws org.apache.thrift.TException
IMetaStoreClientgetProperties in interface IMetaStoreClientnameSpace - the property store namespace.mapPrefix - the map prefix (ala starts-with) to select mapsmapPredicate - predicate expression on properties to further reduce the selected mapsselection - the list of properties to return, null for allorg.apache.thrift.TExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.