public class Hive extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Hive.SchemaException |
| Modifier and Type | Method and Description |
|---|---|
void |
abortTransactions(List<Long> txnids) |
void |
addCheckConstraint(List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> checkConstraints) |
void |
addDefaultConstraint(List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> defaultConstraints) |
void |
addForeignKey(List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeyCols) |
void |
addNotNullConstraint(List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> notNullConstraintCols) |
List<org.apache.hadoop.hive.metastore.api.Partition> |
addPartitions(List<org.apache.hadoop.hive.metastore.api.Partition> partitions,
boolean ifNotExists,
boolean needResults) |
void |
addPrimaryKey(List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeyCols) |
void |
addUniqueConstraint(List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uniqueConstraintCols) |
static void |
addWriteNotificationLog(HiveConf conf,
Table tbl,
List<String> partitionVals,
Long txnId,
Long writeId,
List<org.apache.hadoop.fs.FileStatus> newFiles,
List<org.apache.hadoop.hive.metastore.api.WriteNotificationLogRequest> requestList) |
void |
addWriteNotificationLog(Table tbl,
Map<String,String> partitionSpec,
List<org.apache.hadoop.fs.FileStatus> newFiles,
Long writeId,
List<org.apache.hadoop.hive.metastore.api.WriteNotificationLogRequest> requestList) |
boolean |
allowClose()
Gets the allowClose flag which determines if it is allowed to close metastore connections.
|
void |
alterDatabase(String dbName,
org.apache.hadoop.hive.metastore.api.Database db) |
void |
alterDataConnector(String dcName,
org.apache.hadoop.hive.metastore.api.DataConnector connector) |
void |
alterFunction(String dbName,
String funcName,
org.apache.hadoop.hive.metastore.api.Function newFunction) |
void |
alterPartition(String tblName,
Partition newPart,
org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext,
boolean transactional)
Deprecated.
|
void |
alterPartition(String catName,
String dbName,
String tblName,
Partition newPart,
org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext,
boolean transactional)
Updates the existing partition metadata with the new metadata.
|
void |
alterPartitions(String tblName,
List<Partition> newParts,
org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext,
boolean transactional)
Updates the existing table metadata with the new metadata.
|
void |
alterPartitions(String dbName,
String tableName,
List<org.apache.hadoop.hive.metastore.api.Partition> partitions,
org.apache.hadoop.hive.metastore.api.EnvironmentContext ec,
String validWriteIdList,
long writeId) |
org.apache.hadoop.hive.metastore.api.WMFullResourcePlan |
alterResourcePlan(String rpName,
org.apache.hadoop.hive.metastore.api.WMNullableResourcePlan resourcePlan,
boolean canActivateDisabled,
boolean isForceDeactivate,
boolean isReplace) |
void |
alterTable(String catName,
String dbName,
String tblName,
Table newTbl,
boolean cascade,
org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext,
boolean transactional) |
void |
alterTable(String catName,
String dbName,
String tblName,
Table newTbl,
boolean cascade,
org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext,
boolean transactional,
long replWriteId) |
void |
alterTable(String fullyQlfdTblName,
Table newTbl,
boolean cascade,
org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext,
boolean transactional) |
void |
alterTable(String fullyQlfdTblName,
Table newTbl,
boolean cascade,
org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext,
boolean transactional,
long writeId) |
void |
alterTable(String fullyQlfdTblName,
Table newTbl,
org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext,
boolean transactional)
Updates the existing table metadata with the new metadata.
|
void |
alterTable(Table newTbl,
boolean cascade,
org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext,
boolean transactional) |
void |
alterTableExecuteOperation(Table table,
AlterTableExecuteSpec executeSpec) |
void |
alterWMPool(org.apache.hadoop.hive.metastore.api.WMNullablePool pool,
String poolPath) |
void |
alterWMTrigger(org.apache.hadoop.hive.metastore.api.WMTrigger trigger) |
void |
cacheFileMetadata(String dbName,
String tableName,
String partName,
boolean allParts) |
void |
cancelDelegationToken(String tokenStrForm) |
void |
cleanUpOneDirectoryForReplace(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.PathFilter pathFilter,
HiveConf conf,
boolean purge,
boolean isNeedRecycle) |
static void |
clearDestForSubDirSrc(HiveConf conf,
org.apache.hadoop.fs.Path dest,
org.apache.hadoop.fs.Path src,
boolean isSrcLocal) |
void |
clearFileMetadata(List<Long> fileIds) |
void |
clearMetaCallTiming() |
void |
close(boolean forceClose)
Closes the connection to metastore for the calling thread if allow to close.
|
static void |
closeCurrent() |
org.apache.hadoop.hive.metastore.api.CompactionResponse |
compact(org.apache.hadoop.hive.metastore.api.CompactionRequest request)
Enqueue a compaction request.
|
void |
compact(String dbname,
String tableName,
String partName,
String compactType,
Map<String,String> tblproperties)
Deprecated.
|
org.apache.hadoop.hive.metastore.api.CompactionResponse |
compact2(String dbname,
String tableName,
String partName,
String compactType,
Map<String,String> tblproperties)
Deprecated.
|
protected static void |
copyFiles(HiveConf conf,
org.apache.hadoop.fs.Path srcf,
org.apache.hadoop.fs.Path destf,
org.apache.hadoop.fs.FileSystem fs,
boolean isSrcLocal,
boolean isAcidIUD,
boolean isOverwrite,
List<org.apache.hadoop.fs.FileStatus> newFilesStatus,
boolean isBucketed,
boolean isFullAcidTable,
boolean isManaged,
boolean isCompactionTable)
Copy files.
|
void |
createDatabase(org.apache.hadoop.hive.metastore.api.Database db)
Create a Database.
|
void |
createDatabase(org.apache.hadoop.hive.metastore.api.Database db,
boolean ifNotExist)
Create a database
|
void |
createDataConnector(org.apache.hadoop.hive.metastore.api.DataConnector connector)
Create a DataConnector.
|
void |
createDataConnector(org.apache.hadoop.hive.metastore.api.DataConnector connector,
boolean ifNotExist)
Create a dataconnector
|
void |
createFunction(org.apache.hadoop.hive.metastore.api.Function func) |
static Hive |
createHiveForSession(HiveConf c) |
void |
createOrDropTriggerToPoolMapping(String resourcePlanName,
String triggerName,
String poolPath,
boolean shouldDrop) |
void |
createOrUpdateWMMapping(org.apache.hadoop.hive.metastore.api.WMMapping mapping,
boolean isUpdate) |
Partition |
createPartition(Table tbl,
Map<String,String> partSpec)
Creates a partition.
|
void |
createResourcePlan(org.apache.hadoop.hive.metastore.api.WMResourcePlan resourcePlan,
String copyFromName,
boolean ifNotExists) |
void |
createRole(String roleName,
String ownerName) |
void |
createTable(String tableName,
List<String> columns,
List<String> partCols,
Class<? extends org.apache.hadoop.mapred.InputFormat> fileInputFormat,
Class<?> fileOutputFormat)
Creates a table metadata and the directory for the table data
|
void |
createTable(String tableName,
List<String> columns,
List<String> partCols,
Class<? extends org.apache.hadoop.mapred.InputFormat> fileInputFormat,
Class<?> fileOutputFormat,
int bucketCount,
List<String> bucketCols)
Creates a table metadata and the directory for the table data
|
void |
createTable(String tableName,
List<String> columns,
List<String> partCols,
Class<? extends org.apache.hadoop.mapred.InputFormat> fileInputFormat,
Class<?> fileOutputFormat,
int bucketCount,
List<String> bucketCols,
Map<String,String> parameters)
Create a table metadata and the directory for the table data
|
void |
createTable(Table tbl)
Creates the table with the give objects
|
void |
createTable(Table tbl,
boolean ifNotExists) |
void |
createTable(Table tbl,
boolean ifNotExists,
List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeys,
List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeys,
List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uniqueConstraints,
List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> notNullConstraints,
List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> defaultConstraints,
List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> checkConstraints)
Creates the table with the given objects.
|
void |
createWMPool(org.apache.hadoop.hive.metastore.api.WMPool pool) |
void |
createWMTrigger(org.apache.hadoop.hive.metastore.api.WMTrigger trigger) |
boolean |
databaseExists(String dbName)
Query metadata to see if a database with the given name already exists.
|
boolean |
deletePartitionColumnStatistics(String dbName,
String tableName,
String partName,
String colName) |
boolean |
deleteTableColumnStatistics(String dbName,
String tableName,
String colName) |
void |
dropConstraint(String dbName,
String tableName,
String constraintName) |
void |
dropDatabase(DropDatabaseDesc desc) |
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)
Drop a dataconnector.
|
void |
dropDataConnector(String name,
boolean ifNotExists,
boolean checkReferences)
Drop a dataconnector
|
void |
dropFunction(String dbName,
String funcName) |
boolean |
dropPartition(String dbName,
String tableName,
List<String> partitionValues,
boolean deleteData) |
boolean |
dropPartition(String dbName,
String tableName,
List<String> partitionValues,
PartitionDropOptions options) |
List<Partition> |
dropPartitions(String dbName,
String tableName,
List<org.apache.commons.lang3.tuple.Pair<Integer,byte[]>> partitionExpressions,
PartitionDropOptions dropOptions) |
void |
dropResourcePlan(String rpName,
boolean ifExists) |
void |
dropRole(String roleName) |
void |
dropTable(String tableName)
Drops table along with the data in it.
|
void |
dropTable(String tableName,
boolean ifPurge)
Drops table along with the data in it.
|
void |
dropTable(String dbName,
String tableName)
Drops table along with the data in it.
|
void |
dropTable(String dbName,
String tableName,
boolean deleteData,
boolean ignoreUnknownTab)
Drops the table.
|
void |
dropTable(String dbName,
String tableName,
boolean deleteData,
boolean ignoreUnknownTab,
boolean ifPurge)
Drops the table.
|
void |
dropTable(Table table,
boolean ifPurge) |
void |
dropTable(org.apache.hadoop.hive.metastore.api.Table table,
boolean deleteData,
boolean ignoreUnknownTab,
boolean ifPurge) |
void |
dropWMMapping(org.apache.hadoop.hive.metastore.api.WMMapping mapping) |
void |
dropWMPool(String resourcePlanName,
String poolPath) |
void |
dropWMTrigger(String rpName,
String triggerName) |
com.google.common.collect.ImmutableMap<String,Long> |
dumpAndClearMetaCallTiming(String phase) |
static com.google.common.collect.ImmutableMap<String,Long> |
dumpMetaCallTimingWithoutEx(String phase) |
List<Partition> |
exchangeTablePartitions(Map<String,String> partitionSpecs,
String sourceDb,
String sourceTable,
String destDb,
String destinationTableName) |
protected void |
finalize()
GC is attempting to destroy the object.
|
org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet |
get_privilege_set(org.apache.hadoop.hive.metastore.api.HiveObjectType objectType,
String db_name,
String table_name,
List<String> part_values,
String column_name,
String user_name,
List<String> group_names) |
static Hive |
get() |
static Hive |
get(boolean doRegisterAllFns) |
static Hive |
get(org.apache.hadoop.conf.Configuration c,
Class<?> clazz) |
static Hive |
get(HiveConf c)
Gets hive object for the current thread.
|
static Hive |
get(HiveConf c,
boolean needsRefresh)
get a connection to metastore.
|
static Hive |
get(IMetaStoreClient msc) |
org.apache.hadoop.hive.metastore.api.WMFullResourcePlan |
getActiveResourcePlan() |
org.apache.hadoop.hive.metastore.api.AggrStats |
getAggrColStatsFor(String dbName,
String tblName,
List<String> colNames,
List<String> partName,
boolean checkTransactional) |
List<String> |
getAllDatabases()
Get all existing database names.
|
List<String> |
getAllDataConnectorNames()
Get all dataconnector names.
|
List<org.apache.hadoop.hive.metastore.api.Function> |
getAllFunctions() |
List<Table> |
getAllMaterializedViewObjects(String dbName)
Get all materialized views for the specified database.
|
List<Table> |
getAllMaterializedViewObjectsForRewriting() |
List<String> |
getAllMaterializedViews(String dbName)
Get all materialized view names for the specified database.
|
Set<Partition> |
getAllPartitionsOf(Table tbl)
Get all the partitions; unlike
getPartitions(Table), does not include auth. |
List<org.apache.hadoop.hive.metastore.api.WMResourcePlan> |
getAllResourcePlans() |
List<String> |
getAllRoleNames()
Get all existing role names.
|
List<Table> |
getAllTableObjects(String dbName)
Get all tables for the specified database.
|
List<String> |
getAllTables()
Get all table names for the current database.
|
List<String> |
getAllTables(String dbName)
Get all table names for the specified database.
|
List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> |
getCheckConstraintList(String dbName,
String tblName) |
HiveConf |
getConf() |
org.apache.hadoop.hive.metastore.api.Database |
getDatabase(String dbName)
Get the database by name.
|
org.apache.hadoop.hive.metastore.api.Database |
getDatabase(String catName,
String dbName)
Get the database by name.
|
org.apache.hadoop.hive.metastore.api.Database |
getDatabaseCurrent()
Get the Database object for current database
|
List<String> |
getDatabasesByPattern(String databasePattern)
Get all existing databases that match the given
pattern.
|
org.apache.hadoop.hive.metastore.api.DataConnector |
getDataConnector(String dcName)
Get the dataconnector by name.
|
List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> |
getDefaultConstraintList(String dbName,
String tblName) |
String |
getDelegationToken(String owner,
String renewer) |
CheckConstraint |
getEnabledCheckConstraints(String dbName,
String tblName)
Get CHECK constraints associated with the table that are enabled
|
DefaultConstraint |
getEnabledDefaultConstraints(String dbName,
String tblName)
Get Default constraints associated with the table that are enabled
|
NotNullConstraint |
getEnabledNotNullConstraints(String dbName,
String tblName)
Get not null constraints associated with the table that are enabled/enforced.
|
static List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getFieldsFromDeserializer(String name,
Deserializer serde,
org.apache.hadoop.conf.Configuration conf) |
static List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getFieldsFromDeserializerForMsStorage(Table tbl,
Deserializer deserializer,
org.apache.hadoop.conf.Configuration conf) |
Iterable<Map.Entry<Long,ByteBuffer>> |
getFileMetadata(List<Long> fileIds) |
Iterable<Map.Entry<Long,org.apache.hadoop.hive.metastore.api.MetadataPpdResult>> |
getFileMetadataByExpr(List<Long> fileIds,
ByteBuffer sarg,
boolean doGetFooters) |
List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> |
getForeignKeyList(String dbName,
String tblName) |
org.apache.hadoop.hive.metastore.api.Function |
getFunction(String dbName,
String funcName) |
List<String> |
getFunctions(String dbName,
String pattern) |
String[] |
getHMSClientCapabilities() |
String |
getHMSClientIdentifier() |
HiveRelOptMaterialization |
getMaterializedViewForRebuild(String dbName,
String materializedViewName,
Set<TableName> tablesUsed,
HiveTxnManager txnMgr)
Get the target materialized view from the metastore.
|
List<Table> |
getMaterializedViewObjectsByPattern(String dbName,
String pattern)
Get materialized views for the specified database that match the provided regex pattern.
|
List<HiveRelOptMaterialization> |
getMaterializedViewsByAST(ASTNode astNode,
Set<TableName> tablesUsed,
HiveTxnManager txnMgr)
Get the materialized views from the metastore or from the registry which has the same query definition as the
specified sql query text.
|
String |
getMetaConf(String propName) |
IMetaStoreClient |
getMSC() |
IMetaStoreClient |
getMSC(boolean allowEmbedded,
boolean forceCreate) |
List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> |
getNotNullConstraintList(String dbName,
String tblName) |
int |
getNumPartitionsByFilter(Table tbl,
String filter)
Get a number of Partitions by filter.
|
Partition |
getPartition(Table tbl,
Map<String,String> partSpec,
boolean forceCreate) |
Partition |
getPartition(Table tbl,
Map<String,String> partSpec,
boolean forceCreate,
String partPath,
boolean inheritTableSpecs)
Returns partition metadata
|
org.apache.hadoop.hive.metastore.api.Partition |
getPartition(Table t,
String dbName,
String tableName,
List<String> params) |
Map<String,List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj>> |
getPartitionColumnStatistics(String dbName,
String tableName,
List<String> partNames,
List<String> colNames,
boolean checkTransactional) |
List<String> |
getPartitionNames(String dbName,
String tblName,
Map<String,String> partSpec,
short max) |
List<String> |
getPartitionNames(String dbName,
String tblName,
short max) |
List<String> |
getPartitionNames(Table tbl,
ExprNodeGenericFuncDesc expr,
String order,
short maxParts) |
List<Partition> |
getPartitions(Table tbl)
get all the partitions that the table has
|
List<Partition> |
getPartitions(Table tbl,
Map<String,String> partialPartSpec)
get all the partitions of the table that matches the given partial
specification.
|
List<Partition> |
getPartitions(Table tbl,
Map<String,String> partialPartSpec,
short limit)
get all the partitions of the table that matches the given partial
specification.
|
boolean |
getPartitionsByExpr(Table tbl,
ExprNodeDesc expr,
HiveConf conf,
List<Partition> partitions)
Get a list of Partitions by expr.
|
List<Partition> |
getPartitionsByFilter(Table tbl,
String filter)
Get a list of Partitions by filter.
|
List<org.apache.hadoop.hive.metastore.api.Partition> |
getPartitionsByNames(org.apache.hadoop.hive.metastore.api.GetPartitionsByNamesRequest req,
Table table) |
List<org.apache.hadoop.hive.metastore.api.Partition> |
getPartitionsByNames(String dbName,
String tableName,
List<String> partitionNames,
Table t) |
List<Partition> |
getPartitionsByNames(Table tbl,
List<String> partNames)
Get all partitions of the table that matches the list of given partition names.
|
List<Partition> |
getPartitionsByNames(Table tbl,
List<String> partNames,
boolean getColStats)
Get all partitions of the table that matches the list of given partition names.
|
List<Partition> |
getPartitionsByNames(Table tbl,
Map<String,String> partialPartSpec)
get all the partitions of the table that matches the given partial
specification.
|
List<HiveRelOptMaterialization> |
getPreprocessedMaterializedViews(Set<TableName> tablesUsed,
HiveTxnManager txnMgr)
Get the materialized views that have been enabled for rewriting from the
metastore.
|
List<HiveRelOptMaterialization> |
getPreprocessedMaterializedViewsFromRegistry(Set<TableName> tablesUsed,
HiveTxnManager txnMgr)
Get the materialized views that have been enabled for rewriting from the
cache (registry).
|
List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> |
getPrimaryKeyList(String dbName,
String tblName) |
org.apache.hadoop.hive.metastore.api.WMFullResourcePlan |
getResourcePlan(String rpName) |
List<org.apache.hadoop.hive.metastore.api.RolePrincipalGrant> |
getRoleGrantInfoForPrincipal(String principalName,
org.apache.hadoop.hive.metastore.api.PrincipalType principalType) |
StorageHandlerInfo |
getStorageHandlerInfo(Table table) |
SynchronizedMetaStoreClient |
getSynchronizedMSC() |
Table |
getTable(String tableName)
Returns metadata for the table named tableName
|
Table |
getTable(String tableName,
boolean throwException)
Returns metadata for the table named tableName
|
Table |
getTable(String dbName,
String tableName)
Returns metadata of the table
|
Table |
getTable(String dbName,
String tableName,
boolean throwException)
Returns metadata of the table
|
Table |
getTable(String dbName,
String tableName,
boolean throwException,
boolean checkTransactional)
Returns metadata of the table.
|
Table |
getTable(String dbName,
String tableName,
String metaTableName,
boolean throwException)
Returns metadata of the table
|
Table |
getTable(String dbName,
String tableName,
String metaTableName,
boolean throwException,
boolean checkTransactional)
Returns metadata of the table.
|
Table |
getTable(String dbName,
String tableName,
String metaTableName,
boolean throwException,
boolean checkTransactional,
boolean getColumnStats)
Returns metadata of the table.
|
Table |
getTable(TableName tableName)
Returns metadata of the table
|
List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj> |
getTableColumnStatistics(String dbName,
String tableName,
List<String> colNames,
boolean checkTransactional) |
TableConstraintsInfo |
getTableConstraints(String dbName,
String tblName,
boolean fetchReliable,
boolean fetchEnabled,
long tableId) |
org.apache.hadoop.hive.metastore.api.SQLAllTableConstraints |
getTableConstraints(String dbName,
String tblName,
long tableId) |
List<Table> |
getTableObjects(String dbName,
String pattern,
TableType tableType) |
List<String> |
getTablesByPattern(String tablePattern)
Returns all existing tables from default database which match the given
pattern.
|
List<String> |
getTablesByPattern(String dbName,
String tablePattern)
Returns all existing tables from the specified database which match the given
pattern.
|
List<String> |
getTablesByType(String dbName,
String pattern,
TableType type)
Returns all existing tables of a type (VIRTUAL_VIEW|EXTERNAL_TABLE|MANAGED_TABLE) from the specified
database which match the given pattern.
|
List<String> |
getTablesForDb(String database,
String tablePattern)
Returns all existing tables from the given database which match the given
pattern.
|
static Hive |
getThreadLocal() |
Table |
getTranslateTableDryrun(org.apache.hadoop.hive.metastore.api.Table tbl)
Dry run that translates table
|
List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> |
getUniqueConstraintList(String dbName,
String tblName) |
static Hive |
getWithFastCheck(HiveConf c)
Same as
get(HiveConf), except that it checks only the object identity of existing
MS client, assuming the relevant settings would be unchanged within the same conf object. |
static Hive |
getWithFastCheck(HiveConf c,
boolean doRegisterAllFns)
Same as
get(HiveConf), except that it checks only the object identity of existing
MS client, assuming the relevant settings would be unchanged within the same conf object. |
static Hive |
getWithoutRegisterFns(HiveConf c)
Same as
get(HiveConf), except that it does not register all functions. |
boolean |
grantPrivileges(org.apache.hadoop.hive.metastore.api.PrivilegeBag privileges) |
boolean |
grantRole(String roleName,
String userName,
org.apache.hadoop.hive.metastore.api.PrincipalType principalType,
String grantor,
org.apache.hadoop.hive.metastore.api.PrincipalType grantorType,
boolean grantOption) |
static boolean |
isHadoop1() |
Boolean |
isOutdatedMaterializedView(HiveTxnManager txnManager,
TableName tableName)
Utility method that returns whether a materialized view is outdated (true), not outdated
(false), or it cannot be determined (null).
|
Boolean |
isOutdatedMaterializedView(Table materializedViewTable,
Set<TableName> tablesUsed,
boolean forceMVContentsUpToDate,
HiveTxnManager txnMgr)
Utility method that returns whether a materialized view is outdated (true), not outdated
(false), or it cannot be determined (null).
|
static void |
listFilesInsideAcidDirectory(org.apache.hadoop.fs.Path acidDir,
org.apache.hadoop.fs.FileSystem srcFs,
List<org.apache.hadoop.fs.Path> newFiles,
org.apache.hadoop.fs.PathFilter filter) |
List<org.apache.hadoop.hive.metastore.api.Role> |
listRoles(String userName,
org.apache.hadoop.hive.metastore.api.PrincipalType principalType) |
Map<Map<String,String>,Partition> |
loadDynamicPartitions(LoadTableDesc tbd,
int numLB,
boolean isAcid,
long writeId,
int stmtId,
boolean resetStatistics,
AcidUtils.Operation operation,
Map<org.apache.hadoop.fs.Path,Utilities.PartitionDetails> partitionDetailsMap)
Given a source directory name of the load path, load all dynamically generated partitions
into the specified table and return a list of strings that represent the dynamic partition
paths.
|
Partition |
loadPartition(org.apache.hadoop.fs.Path loadPath,
Table tbl,
Map<String,String> partSpec,
LoadTableDesc.LoadFileType loadFileType,
boolean inheritTableSpecs,
boolean inheritLocation,
boolean isSkewedStoreAsSubdir,
boolean isSrcLocal,
boolean isAcidIUDoperation,
boolean resetStatistics,
Long writeId,
int stmtId,
boolean isInsertOverwrite,
boolean isDirectInsert)
Load a directory into a Hive Table Partition - Alters existing content of
the partition with the contents of loadPath.
|
void |
loadTable(org.apache.hadoop.fs.Path loadPath,
String tableName,
LoadTableDesc.LoadFileType loadFileType,
boolean isSrcLocal,
boolean isSkewedStoreAsSubdir,
boolean isAcidIUDoperation,
boolean resetStatistics,
Long writeId,
int stmtId,
boolean isInsertOverwrite,
boolean isDirectInsert)
Load a directory into a Hive Table.
|
static void |
moveAcidFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.FileStatus[] stats,
org.apache.hadoop.fs.Path dst,
List<org.apache.hadoop.fs.Path> newFiles) |
static boolean |
moveFile(HiveConf conf,
org.apache.hadoop.fs.Path srcf,
org.apache.hadoop.fs.Path destf,
boolean replace,
boolean isSrcLocal,
boolean isManaged) |
Table |
newTable(String tableName) |
void |
putFileMetadata(List<Long> fileIds,
List<ByteBuffer> metadata) |
void |
recycleDirToCmPath(org.apache.hadoop.fs.Path dataPath,
boolean isPurge)
Recycles the files recursively from the input path to the cmroot directory either by copying or moving it.
|
void |
reloadFunctions() |
void |
renamePartition(Table tbl,
Map<String,String> oldPartSpec,
Partition newPart,
long replWriteId)
Rename a old partition to new partition
|
boolean |
revokePrivileges(org.apache.hadoop.hive.metastore.api.PrivilegeBag privileges,
boolean grantOption) |
boolean |
revokeRole(String roleName,
String userName,
org.apache.hadoop.hive.metastore.api.PrincipalType principalType,
boolean grantOption) |
static void |
set(Hive hive) |
void |
setAllowClose(boolean allowClose)
Marks if the given Hive object is allowed to close metastore connections.
|
void |
setConf(HiveConf c) |
void |
setHMSClientCapabilities(String[] capabilities) |
void |
setHMSClientIdentifier(String id) |
void |
setMetaConf(String propName,
String propValue) |
void |
setMSC(IMetaStoreClient client)
Sets the metastore client for the current thread
|
boolean |
setPartitionColumnStatistics(org.apache.hadoop.hive.metastore.api.SetPartitionsStatsRequest request) |
org.apache.hadoop.hive.metastore.api.ShowCompactResponse |
showCompactions() |
org.apache.hadoop.hive.metastore.api.ShowCompactResponse |
showCompactions(org.apache.hadoop.hive.metastore.api.ShowCompactRequest request) |
List<org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege> |
showPrivilegeGrant(org.apache.hadoop.hive.metastore.api.HiveObjectType objectType,
String principalName,
org.apache.hadoop.hive.metastore.api.PrincipalType principalType,
String dbName,
String tableName,
List<String> partValues,
String columnName) |
org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse |
showTransactions() |
static boolean |
trashFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.FileStatus[] statuses,
org.apache.hadoop.conf.Configuration conf,
boolean purge)
Trashes or deletes all files under a directory.
|
void |
truncateTable(String dbDotTableName,
Map<String,String> partSpec,
Long writeId)
Truncates the table/partition as per specifications.
|
void |
updateCreationMetadata(String dbName,
String tableName,
MaterializedViewMetadata metadata) |
void |
updateTransactionalStatistics(org.apache.hadoop.hive.metastore.api.UpdateTransactionalStatsRequest req) |
void |
validateDatabaseExists(String databaseName) |
boolean |
validateMaterializedViewsFromRegistry(List<Table> cachedMaterializedViewTables,
Set<TableName> tablesUsed,
HiveTxnManager txnMgr)
Validate that the materialized views retrieved from registry are still up-to-date.
|
void |
validatePartitionNameCharacters(List<String> partVals) |
org.apache.hadoop.hive.metastore.api.WMValidateResourcePlanResponse |
validateResourcePlan(String rpName) |
public void reloadFunctions()
throws HiveException
HiveExceptionpublic static Hive get(org.apache.hadoop.conf.Configuration c, Class<?> clazz) throws HiveException
HiveExceptionpublic static Hive get(HiveConf c) throws HiveException
c - new Hive ConfigurationHiveExceptionpublic static Hive createHiveForSession(HiveConf c) throws HiveException
HiveExceptionpublic void setConf(HiveConf c)
public static Hive getWithFastCheck(HiveConf c) throws HiveException
get(HiveConf), except that it checks only the object identity of existing
MS client, assuming the relevant settings would be unchanged within the same conf object.HiveExceptionpublic static Hive getWithFastCheck(HiveConf c, boolean doRegisterAllFns) throws HiveException
get(HiveConf), except that it checks only the object identity of existing
MS client, assuming the relevant settings would be unchanged within the same conf object.HiveExceptionpublic static Hive getWithoutRegisterFns(HiveConf c) throws HiveException
get(HiveConf), except that it does not register all functions.HiveExceptionpublic void setHMSClientCapabilities(String[] capabilities)
public void setHMSClientIdentifier(String id)
public String[] getHMSClientCapabilities()
public String getHMSClientIdentifier()
public static Hive getThreadLocal()
public static Hive get() throws HiveException
HiveExceptionpublic static Hive get(IMetaStoreClient msc) throws HiveException, org.apache.hadoop.hive.metastore.api.MetaException
public static Hive get(boolean doRegisterAllFns) throws HiveException
HiveExceptionpublic static Hive get(HiveConf c, boolean needsRefresh) throws HiveException
c - new confneedsRefresh - if true then creates a new oneHiveExceptionpublic static void set(Hive hive)
public static void closeCurrent()
protected void finalize()
throws Throwable
public void setAllowClose(boolean allowClose)
allowClose - public boolean allowClose()
public void close(boolean forceClose)
forceClose - - Override the isAllowClose flag to forcefully close the MS connections.public void createDatabase(org.apache.hadoop.hive.metastore.api.Database db, boolean ifNotExist) throws org.apache.hadoop.hive.metastore.api.AlreadyExistsException, HiveException
db - ifNotExist - if true, will ignore AlreadyExistsException exceptionorg.apache.hadoop.hive.metastore.api.AlreadyExistsExceptionHiveExceptionpublic void createDatabase(org.apache.hadoop.hive.metastore.api.Database db) throws org.apache.hadoop.hive.metastore.api.AlreadyExistsException, HiveException
db - org.apache.hadoop.hive.metastore.api.AlreadyExistsExceptionHiveExceptionpublic void dropDatabase(String name) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
name - org.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionHiveExceptionHiveMetaStoreClient.dropDatabase(java.lang.String)public void dropDatabase(String name, boolean deleteData, boolean ignoreUnknownDb) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
name - deleteData - ignoreUnknownDb - if true, will ignore NoSuchObjectExceptionHiveExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionpublic void dropDatabase(String name, boolean deleteData, boolean ignoreUnknownDb, boolean cascade) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
name - deleteData - ignoreUnknownDb - if true, will ignore NoSuchObjectExceptioncascade - if true, delete all tables on the DB if exists. Otherwise, the query
will fail if table still exists.HiveExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionpublic void dropDatabase(DropDatabaseDesc desc) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public Table getTranslateTableDryrun(org.apache.hadoop.hive.metastore.api.Table tbl) throws HiveException
tbl - a table objectHiveExceptionpublic void createTable(String tableName, List<String> columns, List<String> partCols, Class<? extends org.apache.hadoop.mapred.InputFormat> fileInputFormat, Class<?> fileOutputFormat) throws HiveException
tableName - name of the tablecolumns - list of fields of the tablepartCols - partition keys of the tablefileInputFormat - Class of the input format of the table data filefileOutputFormat - Class of the output format of the table data fileHiveException - thrown if the args are invalid or if the metadata or the data
directory couldn't be createdpublic void createTable(String tableName, List<String> columns, List<String> partCols, Class<? extends org.apache.hadoop.mapred.InputFormat> fileInputFormat, Class<?> fileOutputFormat, int bucketCount, List<String> bucketCols) throws HiveException
tableName - name of the tablecolumns - list of fields of the tablepartCols - partition keys of the tablefileInputFormat - Class of the input format of the table data filefileOutputFormat - Class of the output format of the table data filebucketCount - number of buckets that each partition (or the table itself) should
be divided intoHiveException - thrown if the args are invalid or if the metadata or the data
directory couldn't be createdpublic void createTable(String tableName, List<String> columns, List<String> partCols, Class<? extends org.apache.hadoop.mapred.InputFormat> fileInputFormat, Class<?> fileOutputFormat, int bucketCount, List<String> bucketCols, Map<String,String> parameters) throws HiveException
tableName - table namecolumns - list of fields of the tablepartCols - partition keys of the tablefileInputFormat - Class of the input format of the table data filefileOutputFormat - Class of the output format of the table data filebucketCount - number of buckets that each partition (or the table itself) should be
divided intobucketCols - Bucket columnsparameters - Parameters for the tableHiveExceptionpublic void alterTable(Table newTbl, boolean cascade, org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext, boolean transactional) throws HiveException
HiveExceptionpublic void alterTable(String fullyQlfdTblName, Table newTbl, org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext, boolean transactional) throws HiveException
fullyQlfdTblName - name of the existing tablenewTbl - new name of the table. could be the old nametransactional - Need to generate and save a table snapshot into the metastore?HiveExceptionpublic void alterTable(String fullyQlfdTblName, Table newTbl, boolean cascade, org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext, boolean transactional) throws HiveException
HiveExceptionpublic void alterTable(String fullyQlfdTblName, Table newTbl, boolean cascade, org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext, boolean transactional, long writeId) throws HiveException
HiveExceptionpublic void alterTable(String catName, String dbName, String tblName, Table newTbl, boolean cascade, org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext, boolean transactional) throws HiveException
HiveExceptionpublic void alterTable(String catName, String dbName, String tblName, Table newTbl, boolean cascade, org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext, boolean transactional, long replWriteId) throws HiveException
HiveExceptionpublic void createDataConnector(org.apache.hadoop.hive.metastore.api.DataConnector connector, boolean ifNotExist) throws org.apache.hadoop.hive.metastore.api.AlreadyExistsException, HiveException
connector - ifNotExist - if true, will ignore AlreadyExistsException exceptionorg.apache.hadoop.hive.metastore.api.AlreadyExistsExceptionHiveExceptionpublic void createDataConnector(org.apache.hadoop.hive.metastore.api.DataConnector connector) throws org.apache.hadoop.hive.metastore.api.AlreadyExistsException, HiveException
connector - org.apache.hadoop.hive.metastore.api.AlreadyExistsExceptionHiveExceptionpublic void dropDataConnector(String name, boolean ifNotExists) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
name - org.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionHiveExceptionHiveMetaStoreClient.dropDataConnector(java.lang.String, boolean, boolean)public void dropDataConnector(String name, boolean ifNotExists, boolean checkReferences) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
name - checkReferences - drop only if there are no dbs referencing this connectorHiveExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionpublic org.apache.hadoop.hive.metastore.api.DataConnector getDataConnector(String dcName) throws HiveException
dcName - the name of the dataconnector.HiveExceptionpublic List<String> getAllDataConnectorNames() throws HiveException
HiveExceptionpublic void alterDataConnector(String dcName, org.apache.hadoop.hive.metastore.api.DataConnector connector) throws HiveException
HiveExceptionpublic void updateCreationMetadata(String dbName, String tableName, MaterializedViewMetadata metadata) throws HiveException
HiveException@Deprecated public void alterPartition(String tblName, Partition newPart, org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext, boolean transactional) throws org.apache.hadoop.hive.metastore.api.InvalidOperationException, HiveException
tblName - name of the existing tablenewPart - new partitionorg.apache.hadoop.hive.metastore.api.InvalidOperationException - if the changes in metadata is not acceptableHiveExceptionpublic void alterPartition(String catName, String dbName, String tblName, Partition newPart, org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext, boolean transactional) throws org.apache.hadoop.hive.metastore.api.InvalidOperationException, HiveException
dbName - name of the exiting table's databasetblName - name of the existing tablenewPart - new partitionenvironmentContext - environment context for the methodtransactional - indicates this call is for transaction statsorg.apache.hadoop.hive.metastore.api.InvalidOperationException - if the changes in metadata is not acceptableHiveExceptionpublic void alterPartitions(String tblName, List<Partition> newParts, org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext, boolean transactional) throws org.apache.hadoop.hive.metastore.api.InvalidOperationException, HiveException
tblName - name of the existing tablenewParts - new partitionstransactional - Need to generate and save a table snapshot into the metastore?org.apache.hadoop.hive.metastore.api.InvalidOperationException - if the changes in metadata is not acceptableHiveExceptionpublic void renamePartition(Table tbl, Map<String,String> oldPartSpec, Partition newPart, long replWriteId) throws HiveException
tbl - existing tableoldPartSpec - spec of old partitionnewPart - new partitionHiveExceptionpublic void alterDatabase(String dbName, org.apache.hadoop.hive.metastore.api.Database db) throws HiveException
HiveExceptionpublic void createTable(Table tbl) throws HiveException
tbl - a table objectHiveExceptionpublic void createTable(Table tbl, boolean ifNotExists, List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeys, List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeys, List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uniqueConstraints, List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> notNullConstraints, List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> defaultConstraints, List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> checkConstraints) throws HiveException
tbl - a table objectifNotExists - if true, ignore AlreadyExistsExceptionprimaryKeys - primary key columns associated with the tableforeignKeys - foreign key columns associated with the tableuniqueConstraints - UNIQUE constraints associated with the tablenotNullConstraints - NOT NULL constraints associated with the tabledefaultConstraints - DEFAULT constraints associated with the tablecheckConstraints - CHECK constraints associated with the tableHiveExceptionpublic void createTable(Table tbl, boolean ifNotExists) throws HiveException
HiveExceptionpublic static List<org.apache.hadoop.hive.metastore.api.FieldSchema> getFieldsFromDeserializerForMsStorage(Table tbl, Deserializer deserializer, org.apache.hadoop.conf.Configuration conf) throws SerDeException, org.apache.hadoop.hive.metastore.api.MetaException
public void dropTable(String tableName, boolean ifPurge) throws HiveException
tableName - table to dropifPurge - completely purge the table (skipping trash) while removing data from warehouseHiveException - thrown if the drop failspublic void dropTable(Table table, boolean ifPurge) throws HiveException
HiveExceptionpublic void dropTable(String tableName) throws HiveException
tableName - table to dropHiveException - thrown if the drop failspublic void dropTable(String dbName, String tableName) throws HiveException
dbName - database where the table livestableName - table to dropHiveException - thrown if the drop failspublic void dropTable(String dbName, String tableName, boolean deleteData, boolean ignoreUnknownTab) throws HiveException
dbName - tableName - deleteData - deletes the underlying data along with metadataignoreUnknownTab - an exception is thrown if this is false and the table doesn't existHiveExceptionpublic void dropTable(String dbName, String tableName, boolean deleteData, boolean ignoreUnknownTab, boolean ifPurge) throws HiveException
dbName - tableName - deleteData - deletes the underlying data along with metadataignoreUnknownTab - an exception is thrown if this is false and the table doesn't existifPurge - completely purge the table skipping trash while removing data from warehouseHiveExceptionpublic void dropTable(org.apache.hadoop.hive.metastore.api.Table table, boolean deleteData, boolean ignoreUnknownTab, boolean ifPurge) throws HiveException
HiveExceptionpublic void truncateTable(String dbDotTableName, Map<String,String> partSpec, Long writeId) throws HiveException
dbDotTableName - name of the tableHiveExceptionpublic HiveConf getConf()
public Table getTable(String tableName) throws HiveException
tableName - the name of the tableHiveException - if there's an internal error or if the
table doesn't existpublic Table getTable(String tableName, boolean throwException) throws HiveException
tableName - the name of the tablethrowException - controls whether an exception is thrown or a returns a nullHiveException - if there's an internal error or if the
table doesn't existpublic Table getTable(String dbName, String tableName) throws HiveException
dbName - the name of the databasetableName - the name of the tableHiveException - if there's an internal error or if the table doesn't existpublic Table getTable(TableName tableName) throws HiveException
tableName - the tableName objectHiveException - if there's an internal error or if the table doesn't existpublic Table getTable(String dbName, String tableName, String metaTableName, boolean throwException) throws HiveException
dbName - the name of the databasetableName - the name of the tablemetaTableName - the name of the metadata tablethrowException - controls whether an exception is thrown or a returns a nullHiveExceptionpublic Table getTable(String dbName, String tableName, boolean throwException) throws HiveException
dbName - the name of the databasetableName - the name of the tablethrowException - controls whether an exception is thrown or a returns a nullHiveExceptionpublic Table getTable(String dbName, String tableName, boolean throwException, boolean checkTransactional) throws HiveException
dbName - the name of the databasetableName - the name of the tablethrowException - controls whether an exception is thrown or a returns a nullcheckTransactional - checks whether the metadata table stats are valid (or
compilant with the snapshot isolation of) for the current transaction.HiveExceptionpublic Table getTable(String dbName, String tableName, String metaTableName, boolean throwException, boolean checkTransactional) throws HiveException
dbName - the name of the databasetableName - the name of the tablemetaTableName - the name of the metadata tablethrowException - controls whether an exception is thrown or a returns a nullcheckTransactional - checks whether the metadata table stats are valid (or
compilant with the snapshot isolation of) for the current transaction.HiveExceptionpublic Table getTable(String dbName, String tableName, String metaTableName, boolean throwException, boolean checkTransactional, boolean getColumnStats) throws HiveException
dbName - the name of the databasetableName - the name of the tablemetaTableName - the name of the metadata tablethrowException - controls whether an exception is thrown or a returns a nullcheckTransactional - checks whether the metadata table stats are valid (or
compilant with the snapshot isolation of) for the current transaction.getColumnStats - get column statistics if availableHiveExceptionpublic List<String> getAllTables() throws HiveException
HiveExceptionpublic List<String> getAllTables(String dbName) throws HiveException
dbName - HiveExceptionpublic List<Table> getAllTableObjects(String dbName) throws HiveException
dbName - HiveExceptionpublic List<String> getAllMaterializedViews(String dbName) throws HiveException
dbName - HiveExceptionpublic List<Table> getAllMaterializedViewObjects(String dbName) throws HiveException
dbName - HiveExceptionpublic List<Table> getMaterializedViewObjectsByPattern(String dbName, String pattern) throws HiveException
dbName - pattern - HiveExceptionpublic List<Table> getTableObjects(String dbName, String pattern, TableType tableType) throws HiveException
HiveExceptionpublic List<String> getTablesByPattern(String tablePattern) throws HiveException
tablePattern - java re patternHiveExceptionpublic List<String> getTablesByPattern(String dbName, String tablePattern) throws HiveException
dbName - tablePattern - HiveExceptionpublic List<String> getTablesForDb(String database, String tablePattern) throws HiveException
database - the database nametablePattern - java re patternHiveExceptionpublic List<String> getTablesByType(String dbName, String pattern, TableType type) throws HiveException
dbName - Database name to find the tables in. if null, uses the current database in this session.pattern - A pattern to match for the table names.If null, returns all names from this DB.type - The type of tables to return. VIRTUAL_VIEWS for views. If null, returns all tables and views.HiveExceptionpublic List<HiveRelOptMaterialization> getPreprocessedMaterializedViewsFromRegistry(Set<TableName> tablesUsed, HiveTxnManager txnMgr) throws HiveException
HiveExceptionpublic Boolean isOutdatedMaterializedView(Table materializedViewTable, Set<TableName> tablesUsed, boolean forceMVContentsUpToDate, HiveTxnManager txnMgr) throws HiveException
HiveExceptionpublic Boolean isOutdatedMaterializedView(HiveTxnManager txnManager, TableName tableName) throws HiveException
HiveExceptionpublic boolean validateMaterializedViewsFromRegistry(List<Table> cachedMaterializedViewTables, Set<TableName> tablesUsed, HiveTxnManager txnMgr) throws HiveException
HiveExceptionpublic List<HiveRelOptMaterialization> getPreprocessedMaterializedViews(Set<TableName> tablesUsed, HiveTxnManager txnMgr) throws HiveException
HiveExceptionpublic HiveRelOptMaterialization getMaterializedViewForRebuild(String dbName, String materializedViewName, Set<TableName> tablesUsed, HiveTxnManager txnMgr) throws HiveException
HiveExceptionpublic List<Table> getAllMaterializedViewObjectsForRewriting() throws HiveException
HiveExceptionpublic List<HiveRelOptMaterialization> getMaterializedViewsByAST(ASTNode astNode, Set<TableName> tablesUsed, HiveTxnManager txnMgr) throws HiveException
tablesUsed - List of tables to verify whether materialized view is outdatedtxnMgr - Transaction manager to get open transactions affects used tables.HiveException - - an exception is thrown during validation or unable to pull transaction idspublic List<String> getAllDatabases() throws HiveException
HiveExceptionpublic List<String> getDatabasesByPattern(String databasePattern) throws HiveException
databasePattern - java re patternHiveExceptionpublic boolean grantPrivileges(org.apache.hadoop.hive.metastore.api.PrivilegeBag privileges) throws HiveException
HiveExceptionpublic boolean revokePrivileges(org.apache.hadoop.hive.metastore.api.PrivilegeBag privileges, boolean grantOption) throws HiveException
privileges - a bag of privilegesHiveExceptionpublic void validateDatabaseExists(String databaseName) throws SemanticException
SemanticExceptionpublic boolean databaseExists(String dbName) throws HiveException
dbName - HiveExceptionpublic org.apache.hadoop.hive.metastore.api.Database getDatabase(String dbName) throws HiveException
dbName - the name of the database.HiveExceptionpublic org.apache.hadoop.hive.metastore.api.Database getDatabase(String catName, String dbName) throws HiveException
catName - catalog namedbName - the name of the database.HiveExceptionpublic org.apache.hadoop.hive.metastore.api.Database getDatabaseCurrent() throws HiveException
HiveExceptionpublic Partition loadPartition(org.apache.hadoop.fs.Path loadPath, Table tbl, Map<String,String> partSpec, LoadTableDesc.LoadFileType loadFileType, boolean inheritTableSpecs, boolean inheritLocation, boolean isSkewedStoreAsSubdir, boolean isSrcLocal, boolean isAcidIUDoperation, boolean resetStatistics, Long writeId, int stmtId, boolean isInsertOverwrite, boolean isDirectInsert) throws HiveException
loadPath - Directory containing files to load into Tabletbl - name of table to be loaded.partSpec - defines which partition needs to be loadedloadFileType - if REPLACE_ALL - replace files in the table,
otherwise add files to table (KEEP_EXISTING, OVERWRITE_EXISTING)inheritTableSpecs - if true, on [re]creating the partition, take the
location/inputformat/outputformat/serde details from table specisSrcLocal - If the source directory is LOCALisAcidIUDoperation - true if this is an ACID operation Insert/Update/Delete operationresetStatistics - if true, reset the statistics. If false, do not reset statistics.writeId - write ID allocated for the current load operationstmtId - statement ID of the current load statementisInsertOverwrite - HiveExceptionpublic static void listFilesInsideAcidDirectory(org.apache.hadoop.fs.Path acidDir,
org.apache.hadoop.fs.FileSystem srcFs,
List<org.apache.hadoop.fs.Path> newFiles,
org.apache.hadoop.fs.PathFilter filter)
throws IOException
IOExceptionpublic Map<Map<String,String>,Partition> loadDynamicPartitions(LoadTableDesc tbd, int numLB, boolean isAcid, long writeId, int stmtId, boolean resetStatistics, AcidUtils.Operation operation, Map<org.apache.hadoop.fs.Path,Utilities.PartitionDetails> partitionDetailsMap) throws HiveException
tbd - table descriptornumLB - number of bucketsisAcid - true if this is an ACID operationwriteId - writeId, can be 0 unless isAcid == truestmtId - statementIdresetStatistics - if true, reset statistics. Do not reset statistics otherwise.operation - ACID operation typepartitionDetailsMap - full dynamic partition specificationHiveExceptionpublic void loadTable(org.apache.hadoop.fs.Path loadPath,
String tableName,
LoadTableDesc.LoadFileType loadFileType,
boolean isSrcLocal,
boolean isSkewedStoreAsSubdir,
boolean isAcidIUDoperation,
boolean resetStatistics,
Long writeId,
int stmtId,
boolean isInsertOverwrite,
boolean isDirectInsert)
throws HiveException
loadPath - Directory containing files to load into TabletableName - name of table to be loaded.loadFileType - if REPLACE_ALL - replace files in the table,
otherwise add files to table (KEEP_EXISTING, OVERWRITE_EXISTING)isSrcLocal - If the source directory is LOCALisSkewedStoreAsSubdir - if list bucketing enabledisAcidIUDoperation - true if this is an ACID based Insert [overwrite]/update/deleteresetStatistics - should reset statistics as part of move.writeId - write ID allocated for the current load operationstmtId - statement ID of the current load statementHiveExceptionpublic Partition createPartition(Table tbl, Map<String,String> partSpec) throws HiveException
tbl - table for which partition needs to be createdpartSpec - partition keys and their valuesHiveException - if table doesn't exist or partition already existspublic List<org.apache.hadoop.hive.metastore.api.Partition> addPartitions(List<org.apache.hadoop.hive.metastore.api.Partition> partitions, boolean ifNotExists, boolean needResults) throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.Partition getPartition(Table t, String dbName, String tableName, List<String> params) throws HiveException
HiveExceptionpublic void alterPartitions(String dbName, String tableName, List<org.apache.hadoop.hive.metastore.api.Partition> partitions, org.apache.hadoop.hive.metastore.api.EnvironmentContext ec, String validWriteIdList, long writeId) throws HiveException
HiveExceptionpublic List<org.apache.hadoop.hive.metastore.api.Partition> getPartitionsByNames(String dbName, String tableName, List<String> partitionNames, Table t) throws HiveException
HiveExceptionpublic List<org.apache.hadoop.hive.metastore.api.Partition> getPartitionsByNames(org.apache.hadoop.hive.metastore.api.GetPartitionsByNamesRequest req, Table table) throws HiveException
HiveExceptionpublic Partition getPartition(Table tbl, Map<String,String> partSpec, boolean forceCreate) throws HiveException
HiveExceptionpublic Partition getPartition(Table tbl, Map<String,String> partSpec, boolean forceCreate, String partPath, boolean inheritTableSpecs) throws HiveException
tbl - the partition's tablepartSpec - partition keys and valuesforceCreate - if this is true and partition doesn't exist then a partition is
createdpartPath - the path where the partition data is locatedinheritTableSpecs - whether to copy over the table specs for if/of/serdeHiveExceptionpublic void addWriteNotificationLog(Table tbl, Map<String,String> partitionSpec, List<org.apache.hadoop.fs.FileStatus> newFiles, Long writeId, List<org.apache.hadoop.hive.metastore.api.WriteNotificationLogRequest> requestList) throws HiveException
HiveExceptionpublic static void addWriteNotificationLog(HiveConf conf, Table tbl, List<String> partitionVals, Long txnId, Long writeId, List<org.apache.hadoop.fs.FileStatus> newFiles, List<org.apache.hadoop.hive.metastore.api.WriteNotificationLogRequest> requestList) throws IOException, HiveException, org.apache.thrift.TException
IOExceptionHiveExceptionorg.apache.thrift.TExceptionpublic boolean dropPartition(String dbName, String tableName, List<String> partitionValues, boolean deleteData) throws HiveException
HiveExceptionpublic boolean dropPartition(String dbName, String tableName, List<String> partitionValues, PartitionDropOptions options) throws HiveException
HiveExceptionpublic List<Partition> dropPartitions(String dbName, String tableName, List<org.apache.commons.lang3.tuple.Pair<Integer,byte[]>> partitionExpressions, PartitionDropOptions dropOptions) throws HiveException
HiveExceptionpublic List<String> getPartitionNames(String dbName, String tblName, short max) throws HiveException
HiveExceptionpublic List<String> getPartitionNames(String dbName, String tblName, Map<String,String> partSpec, short max) throws HiveException
HiveExceptionpublic List<String> getPartitionNames(Table tbl, ExprNodeGenericFuncDesc expr, String order, short maxParts) throws HiveException
HiveExceptionpublic List<Partition> getPartitions(Table tbl) throws HiveException
tbl - object for which partition is neededHiveExceptionpublic Set<Partition> getAllPartitionsOf(Table tbl) throws HiveException
getPartitions(Table), does not include auth.tbl - table for which partitions are neededHiveExceptionpublic List<Partition> getPartitions(Table tbl, Map<String,String> partialPartSpec, short limit) throws HiveException
tbl - object for which partition is needed. Must be partitioned.limit - number of partitions to returnHiveExceptionpublic List<Partition> getPartitions(Table tbl, Map<String,String> partialPartSpec) throws HiveException
tbl - object for which partition is needed. Must be partitioned.HiveExceptionpublic List<Partition> getPartitionsByNames(Table tbl, Map<String,String> partialPartSpec) throws HiveException
tbl - object for which partition is needed. Must be partitioned.partialPartSpec - partial partition specification (some subpartitions can be empty).HiveExceptionpublic List<Partition> getPartitionsByNames(Table tbl, List<String> partNames) throws HiveException
tbl - object for which partition is needed. Must be partitioned.partNames - list of partition namesHiveExceptionpublic List<Partition> getPartitionsByNames(Table tbl, List<String> partNames, boolean getColStats) throws HiveException
tbl - object for which partition is needed. Must be partitioned.partNames - list of partition namesgetColStats - if true, Partition object includes column statistics for that partition.HiveExceptionpublic List<Partition> getPartitionsByFilter(Table tbl, String filter) throws HiveException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.thrift.TException
tbl - The table containing the partitions.filter - A string represent partition predicates.HiveExceptionorg.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionorg.apache.thrift.TExceptionpublic boolean getPartitionsByExpr(Table tbl, ExprNodeDesc expr, HiveConf conf, List<Partition> partitions) throws HiveException, org.apache.thrift.TException
tbl - The table containing the partitions.expr - A serialized expression for partition predicates.conf - Hive config.partitions - the resulting list of partitionsHiveExceptionorg.apache.thrift.TExceptionpublic int getNumPartitionsByFilter(Table tbl, String filter) throws HiveException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.thrift.TException
tbl - The table containing the partitions.filter - A string represent partition predicates.HiveExceptionorg.apache.hadoop.hive.metastore.api.MetaExceptionorg.apache.hadoop.hive.metastore.api.NoSuchObjectExceptionorg.apache.thrift.TExceptionpublic void validatePartitionNameCharacters(List<String> partVals) throws HiveException
HiveExceptionpublic void createRole(String roleName, String ownerName) throws HiveException
HiveExceptionpublic void dropRole(String roleName) throws HiveException
HiveExceptionpublic List<String> getAllRoleNames() throws HiveException
HiveExceptionpublic List<org.apache.hadoop.hive.metastore.api.RolePrincipalGrant> getRoleGrantInfoForPrincipal(String principalName, org.apache.hadoop.hive.metastore.api.PrincipalType principalType) throws HiveException
HiveExceptionpublic boolean grantRole(String roleName, String userName, org.apache.hadoop.hive.metastore.api.PrincipalType principalType, String grantor, org.apache.hadoop.hive.metastore.api.PrincipalType grantorType, boolean grantOption) throws HiveException
HiveExceptionpublic boolean revokeRole(String roleName, String userName, org.apache.hadoop.hive.metastore.api.PrincipalType principalType, boolean grantOption) throws HiveException
HiveExceptionpublic List<org.apache.hadoop.hive.metastore.api.Role> listRoles(String userName, org.apache.hadoop.hive.metastore.api.PrincipalType principalType) throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet get_privilege_set(org.apache.hadoop.hive.metastore.api.HiveObjectType objectType, String db_name, String table_name, List<String> part_values, String column_name, String user_name, List<String> group_names) throws HiveException
objectType - hive object typedb_name - database nametable_name - table namepart_values - partition valuescolumn_name - column nameuser_name - user namegroup_names - group namesHiveExceptionpublic List<org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege> showPrivilegeGrant(org.apache.hadoop.hive.metastore.api.HiveObjectType objectType, String principalName, org.apache.hadoop.hive.metastore.api.PrincipalType principalType, String dbName, String tableName, List<String> partValues, String columnName) throws HiveException
objectType - hive object typeprincipalName - principalType - dbName - tableName - partValues - columnName - HiveExceptionpublic static void clearDestForSubDirSrc(HiveConf conf, org.apache.hadoop.fs.Path dest, org.apache.hadoop.fs.Path src, boolean isSrcLocal) throws IOException
IOExceptionpublic void recycleDirToCmPath(org.apache.hadoop.fs.Path dataPath,
boolean isPurge)
throws HiveException
dataPath - Path of the data files to be recycled to cmrootisPurge - When set to true files which needs to be recycled are not moved to TrashHiveExceptionpublic static boolean moveFile(HiveConf conf, org.apache.hadoop.fs.Path srcf, org.apache.hadoop.fs.Path destf, boolean replace, boolean isSrcLocal, boolean isManaged) throws HiveException
HiveExceptionprotected static void copyFiles(HiveConf conf, org.apache.hadoop.fs.Path srcf, org.apache.hadoop.fs.Path destf, org.apache.hadoop.fs.FileSystem fs, boolean isSrcLocal, boolean isAcidIUD, boolean isOverwrite, List<org.apache.hadoop.fs.FileStatus> newFilesStatus, boolean isBucketed, boolean isFullAcidTable, boolean isManaged, boolean isCompactionTable) throws HiveException
conf - Configuration objectsrcf - source directory, if bucketed should contain bucket filesdestf - directory to move files intofs - FilesystemisSrcLocal - true if source is on local file systemisAcidIUD - true if this is an ACID based Insert/Update/DeleteisOverwrite - if true, then overwrite if destination file exist, else add a duplicate copynewFilesStatus - if this is non-null, a list of files that were created as a result of this
move will be returned.isManaged - if table is managed.isCompactionTable - is table used in query-based compactionHiveExceptionpublic static void moveAcidFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.FileStatus[] stats,
org.apache.hadoop.fs.Path dst,
List<org.apache.hadoop.fs.Path> newFiles)
throws HiveException
HiveExceptionpublic void cleanUpOneDirectoryForReplace(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.PathFilter pathFilter,
HiveConf conf,
boolean purge,
boolean isNeedRecycle)
throws IOException,
HiveException
IOExceptionHiveExceptionpublic static boolean trashFiles(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.FileStatus[] statuses,
org.apache.hadoop.conf.Configuration conf,
boolean purge)
throws IOException
fs - FileSystem to usestatuses - fileStatuses of files to be deletedconf - hive configurationIOExceptionpublic static boolean isHadoop1()
public List<Partition> exchangeTablePartitions(Map<String,String> partitionSpecs, String sourceDb, String sourceTable, String destDb, String destinationTableName) throws HiveException
HiveException@InterfaceAudience.LimitedPrivate(value="Hive") @InterfaceStability.Unstable public SynchronizedMetaStoreClient getSynchronizedMSC() throws org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.MetaExceptionpublic void setMSC(IMetaStoreClient client) throws org.apache.hadoop.hive.metastore.api.MetaException
@InterfaceAudience.LimitedPrivate(value="Hive") @InterfaceStability.Unstable public IMetaStoreClient getMSC() throws org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.MetaException@InterfaceAudience.LimitedPrivate(value="Hive") @InterfaceStability.Unstable public IMetaStoreClient getMSC(boolean allowEmbedded, boolean forceCreate) throws org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.MetaExceptionpublic static List<org.apache.hadoop.hive.metastore.api.FieldSchema> getFieldsFromDeserializer(String name, Deserializer serde, org.apache.hadoop.conf.Configuration conf) throws HiveException
HiveExceptionpublic boolean setPartitionColumnStatistics(org.apache.hadoop.hive.metastore.api.SetPartitionsStatsRequest request) throws HiveException
HiveExceptionpublic List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj> getTableColumnStatistics(String dbName, String tableName, List<String> colNames, boolean checkTransactional) throws HiveException
HiveExceptionpublic Map<String,List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj>> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNames, List<String> colNames, boolean checkTransactional) throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.AggrStats getAggrColStatsFor(String dbName, String tblName, List<String> colNames, List<String> partName, boolean checkTransactional)
public boolean deleteTableColumnStatistics(String dbName, String tableName, String colName) throws HiveException
HiveExceptionpublic boolean deletePartitionColumnStatistics(String dbName, String tableName, String partName, String colName) throws HiveException
HiveExceptionpublic void updateTransactionalStatistics(org.apache.hadoop.hive.metastore.api.UpdateTransactionalStatsRequest req) throws HiveException
HiveExceptionpublic Table newTable(String tableName) throws HiveException
HiveExceptionpublic String getDelegationToken(String owner, String renewer) throws HiveException
HiveExceptionpublic void cancelDelegationToken(String tokenStrForm) throws HiveException
HiveException@Deprecated public void compact(String dbname, String tableName, String partName, String compactType, Map<String,String> tblproperties) throws HiveException
compact2(String, String, String, String, Map)HiveException@Deprecated public org.apache.hadoop.hive.metastore.api.CompactionResponse compact2(String dbname, String tableName, String partName, String compactType, Map<String,String> tblproperties) throws HiveException
compact(CompactionRequest)dbname - name of the database, if null default will be used.tableName - name of the table, cannot be nullpartName - name of the partition, if null table will be compacted (valid only for
non-partitioned tables).compactType - major or minortblproperties - the list of tblproperties to overwrite for this compactionHiveExceptionpublic org.apache.hadoop.hive.metastore.api.CompactionResponse compact(org.apache.hadoop.hive.metastore.api.CompactionRequest request) throws HiveException
request - The CompactionRequest object containing the details required to enqueue
a compaction request.HiveExceptionpublic org.apache.hadoop.hive.metastore.api.ShowCompactResponse showCompactions() throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.ShowCompactResponse showCompactions(org.apache.hadoop.hive.metastore.api.ShowCompactRequest request) throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse showTransactions() throws HiveException
HiveExceptionpublic void abortTransactions(List<Long> txnids) throws HiveException
HiveExceptionpublic void createFunction(org.apache.hadoop.hive.metastore.api.Function func) throws HiveException
HiveExceptionpublic void alterFunction(String dbName, String funcName, org.apache.hadoop.hive.metastore.api.Function newFunction) throws HiveException
HiveExceptionpublic void dropFunction(String dbName, String funcName) throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.Function getFunction(String dbName, String funcName) throws HiveException
HiveExceptionpublic List<org.apache.hadoop.hive.metastore.api.Function> getAllFunctions() throws HiveException
HiveExceptionpublic List<String> getFunctions(String dbName, String pattern) throws HiveException
HiveExceptionpublic void setMetaConf(String propName, String propValue) throws HiveException
HiveExceptionpublic String getMetaConf(String propName) throws HiveException
HiveExceptionpublic void clearMetaCallTiming()
public static com.google.common.collect.ImmutableMap<String,Long> dumpMetaCallTimingWithoutEx(String phase)
public com.google.common.collect.ImmutableMap<String,Long> dumpAndClearMetaCallTiming(String phase)
public Iterable<Map.Entry<Long,ByteBuffer>> getFileMetadata(List<Long> fileIds) throws HiveException
HiveExceptionpublic Iterable<Map.Entry<Long,org.apache.hadoop.hive.metastore.api.MetadataPpdResult>> getFileMetadataByExpr(List<Long> fileIds, ByteBuffer sarg, boolean doGetFooters) throws HiveException
HiveExceptionpublic void clearFileMetadata(List<Long> fileIds) throws HiveException
HiveExceptionpublic void putFileMetadata(List<Long> fileIds, List<ByteBuffer> metadata) throws HiveException
HiveExceptionpublic void cacheFileMetadata(String dbName, String tableName, String partName, boolean allParts) throws HiveException
HiveExceptionpublic void dropConstraint(String dbName, String tableName, String constraintName) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> getPrimaryKeyList(String dbName, String tblName) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> getForeignKeyList(String dbName, String tblName) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> getUniqueConstraintList(String dbName, String tblName) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> getNotNullConstraintList(String dbName, String tblName) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> getDefaultConstraintList(String dbName, String tblName) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> getCheckConstraintList(String dbName, String tblName) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public org.apache.hadoop.hive.metastore.api.SQLAllTableConstraints getTableConstraints(String dbName, String tblName, long tableId) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public TableConstraintsInfo getTableConstraints(String dbName, String tblName, boolean fetchReliable, boolean fetchEnabled, long tableId) throws HiveException
HiveExceptionpublic NotNullConstraint getEnabledNotNullConstraints(String dbName, String tblName) throws HiveException
dbName - Database NametblName - Table NameHiveExceptionpublic CheckConstraint getEnabledCheckConstraints(String dbName, String tblName) throws HiveException
dbName - Database NametblName - Table NameHiveExceptionpublic DefaultConstraint getEnabledDefaultConstraints(String dbName, String tblName) throws HiveException
dbName - Database NametblName - Table NameHiveExceptionpublic void addPrimaryKey(List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeyCols) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public void addForeignKey(List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeyCols) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public void addUniqueConstraint(List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uniqueConstraintCols) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public void addNotNullConstraint(List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> notNullConstraintCols) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public void addDefaultConstraint(List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> defaultConstraints) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public void addCheckConstraint(List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> checkConstraints) throws HiveException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public void createResourcePlan(org.apache.hadoop.hive.metastore.api.WMResourcePlan resourcePlan, String copyFromName, boolean ifNotExists) throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.WMFullResourcePlan getResourcePlan(String rpName) throws HiveException
HiveExceptionpublic List<org.apache.hadoop.hive.metastore.api.WMResourcePlan> getAllResourcePlans() throws HiveException
HiveExceptionpublic void dropResourcePlan(String rpName, boolean ifExists) throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.WMFullResourcePlan alterResourcePlan(String rpName, org.apache.hadoop.hive.metastore.api.WMNullableResourcePlan resourcePlan, boolean canActivateDisabled, boolean isForceDeactivate, boolean isReplace) throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.WMFullResourcePlan getActiveResourcePlan() throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.WMValidateResourcePlanResponse validateResourcePlan(String rpName) throws HiveException
HiveExceptionpublic void createWMTrigger(org.apache.hadoop.hive.metastore.api.WMTrigger trigger) throws HiveException
HiveExceptionpublic void alterWMTrigger(org.apache.hadoop.hive.metastore.api.WMTrigger trigger) throws HiveException
HiveExceptionpublic void dropWMTrigger(String rpName, String triggerName) throws HiveException
HiveExceptionpublic void createWMPool(org.apache.hadoop.hive.metastore.api.WMPool pool) throws HiveException
HiveExceptionpublic void alterWMPool(org.apache.hadoop.hive.metastore.api.WMNullablePool pool, String poolPath) throws HiveException
HiveExceptionpublic void dropWMPool(String resourcePlanName, String poolPath) throws HiveException
HiveExceptionpublic void createOrUpdateWMMapping(org.apache.hadoop.hive.metastore.api.WMMapping mapping, boolean isUpdate) throws HiveException
HiveExceptionpublic void dropWMMapping(org.apache.hadoop.hive.metastore.api.WMMapping mapping) throws HiveException
HiveExceptionpublic void createOrDropTriggerToPoolMapping(String resourcePlanName, String triggerName, String poolPath, boolean shouldDrop) throws HiveException
HiveException@Nullable public StorageHandlerInfo getStorageHandlerInfo(Table table) throws HiveException
HiveExceptionpublic void alterTableExecuteOperation(Table table, AlterTableExecuteSpec executeSpec) throws HiveException
HiveExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.