public interface RawStore
extends org.apache.hadoop.conf.Configurable
Modifier and Type | Interface and Description |
---|---|
static interface |
RawStore.CanNotRetry
Annotation to skip retries
|
Modifier and Type | Method and Description |
---|---|
List<String> |
addCheckConstraints(List<SQLCheckConstraint> cc)
Add check constraints to a table
|
List<String> |
addDefaultConstraints(List<SQLDefaultConstraint> dv)
Add default values to a table definition
|
List<String> |
addForeignKeys(List<SQLForeignKey> fks)
Add a foreign key to a table.
|
int |
addMasterKey(String key) |
void |
addNotificationEvent(NotificationEvent event)
Add a notification entry.
|
List<String> |
addNotNullConstraints(List<SQLNotNullConstraint> nns)
Add not null constraints to a table.
|
boolean |
addPartition(Partition part)
Add a partition.
|
boolean |
addPartitions(String catName,
String dbName,
String tblName,
List<Partition> parts)
Add a list of partitions to a table.
|
boolean |
addPartitions(String catName,
String dbName,
String tblName,
PartitionSpecProxy partitionSpec,
boolean ifNotExists)
Add a list of partitions to a table.
|
List<String> |
addPrimaryKeys(List<SQLPrimaryKey> pks)
Add a primary key to a table.
|
boolean |
addRole(String rowName,
String ownerName) |
void |
addRuntimeStat(RuntimeStat stat)
Adds a RuntimeStat for persistence.
|
void |
addSchemaVersion(SchemaVersion schemaVersion)
Create a new version of an existing schema.
|
void |
addSerde(SerDeInfo serde)
Add a serde
|
boolean |
addToken(String tokenIdentifier,
String delegationToken) |
List<String> |
addUniqueConstraints(List<SQLUniqueConstraint> uks)
Add unique constraints to a table.
|
void |
alterCatalog(String catName,
Catalog cat)
Alter an existing catalog.
|
boolean |
alterDatabase(String catalogName,
String dbname,
Database db)
Alter a database.
|
void |
alterFunction(String catName,
String dbName,
String funcName,
Function newFunction)
Alter function based on new function specs.
|
void |
alterISchema(ISchemaName schemaName,
ISchema newSchema)
Alter an existing ISchema.
|
void |
alterPartition(String catName,
String db_name,
String tbl_name,
List<String> part_vals,
Partition new_part)
Alter a partition.
|
void |
alterPartitions(String catName,
String db_name,
String tbl_name,
List<List<String>> part_vals_list,
List<Partition> new_parts)
Alter a set of partitions.
|
void |
alterPool(WMNullablePool pool,
String poolPath) |
WMFullResourcePlan |
alterResourcePlan(String name,
WMNullableResourcePlan resourcePlan,
boolean canActivateDisabled,
boolean canDeactivate,
boolean isReplace) |
void |
alterSchemaVersion(SchemaVersionDescriptor version,
SchemaVersion newVersion)
Alter a schema version.
|
void |
alterTable(String catName,
String dbname,
String name,
Table newTable)
Alter a table.
|
void |
alterWMTrigger(WMTrigger trigger) |
void |
cleanNotificationEvents(int olderThan)
Remove older notification events.
|
long |
cleanupEvents() |
boolean |
commitTransaction()
if this is the commit of the first open call then an actual commit is
called.
|
void |
createCatalog(Catalog cat)
Create a new catalog.
|
void |
createDatabase(Database db)
Create a database.
|
void |
createFunction(Function func)
Register a user-defined function based on the function specification passed in.
|
void |
createISchema(ISchema schema)
Create a new ISchema.
|
void |
createOrUpdateWMMapping(WMMapping mapping,
boolean update) |
void |
createPool(WMPool pool) |
void |
createResourcePlan(WMResourcePlan resourcePlan,
String copyFrom,
int defaultPoolSize) |
void |
createTable(Table tbl) |
List<String> |
createTableWithConstraints(Table tbl,
List<SQLPrimaryKey> primaryKeys,
List<SQLForeignKey> foreignKeys,
List<SQLUniqueConstraint> uniqueConstraints,
List<SQLNotNullConstraint> notNullConstraints,
List<SQLDefaultConstraint> defaultConstraints,
List<SQLCheckConstraint> checkConstraints)
Create a table with constraints
|
boolean |
createType(Type type) |
void |
createWMTrigger(WMTrigger trigger) |
void |
createWMTriggerToPoolMapping(String resourcePlanName,
String triggerName,
String poolPath) |
boolean |
deletePartitionColumnStatistics(String catName,
String dbName,
String tableName,
String partName,
List<String> partVals,
String colName)
Deletes column statistics if present associated with a given db, table, partition and col.
|
int |
deleteRuntimeStats(int maxRetainSecs)
Removes outdated statistics.
|
boolean |
deleteTableColumnStatistics(String catName,
String dbName,
String tableName,
String colName)
Delete statistics for a single column or all columns in a table.
|
boolean |
doesPartitionExist(String catName,
String dbName,
String tableName,
List<String> part_vals)
Check whether a partition exists.
|
void |
dropCatalog(String catalogName)
Drop a catalog.
|
default void |
dropConstraint(String catName,
String dbName,
String tableName,
String constraintName)
Drop a constraint, any constraint.
|
void |
dropConstraint(String catName,
String dbName,
String tableName,
String constraintName,
boolean missingOk)
Drop a constraint, any constraint.
|
boolean |
dropDatabase(String catalogName,
String dbname)
Drop a database.
|
void |
dropFunction(String catName,
String dbName,
String funcName)
Drop a function definition.
|
void |
dropISchema(ISchemaName schemaName)
Drop an ISchema.
|
boolean |
dropPartition(String catName,
String dbName,
String tableName,
List<String> part_vals)
Drop a partition.
|
void |
dropPartitions(String catName,
String dbName,
String tblName,
List<String> partNames)
Drop a list of partitions.
|
void |
dropResourcePlan(String name) |
void |
dropSchemaVersion(SchemaVersionDescriptor version)
Drop a version of the schema.
|
boolean |
dropTable(String catalogName,
String dbName,
String tableName)
Drop a table.
|
boolean |
dropType(String typeName) |
void |
dropWMMapping(WMMapping mapping) |
void |
dropWMPool(String resourcePlanName,
String poolPath) |
void |
dropWMTrigger(String resourcePlanName,
String triggerName) |
void |
dropWMTriggerToPoolMapping(String resourcePlanName,
String triggerName,
String poolPath) |
void |
flushCache() |
AggrStats |
get_aggr_stats_for(String catName,
String dbName,
String tblName,
List<String> partNames,
List<String> colNames)
Get aggregated stats for a table or partition(s).
|
WMFullResourcePlan |
getActiveResourcePlan() |
List<String> |
getAllDatabases(String catalogName)
Get names of all the databases in a catalog.
|
List<Function> |
getAllFunctions(String catName)
Retrieve all functions.
|
List<WMResourcePlan> |
getAllResourcePlans() |
List<SchemaVersion> |
getAllSchemaVersion(ISchemaName schemaName)
Get all of the versions of a schema
|
List<MetaStoreUtils.FullTableName> |
getAllTableNamesForStats() |
List<String> |
getAllTables(String catName,
String dbName)
Get all tables in a database.
|
List<String> |
getAllTokenIdentifiers() |
Catalog |
getCatalog(String catalogName)
Get a catalog.
|
List<String> |
getCatalogs()
Get all the catalogs.
|
List<SQLCheckConstraint> |
getCheckConstraints(String catName,
String db_name,
String tbl_name)
Get check constraints for columns in a table.
|
PrincipalPrivilegeSet |
getColumnPrivilegeSet(String catName,
String dbName,
String tableName,
String partitionName,
String columnName,
String userName,
List<String> groupNames)
Get privileges for a column in a table or partition for a user.
|
CurrentNotificationEventId |
getCurrentNotificationEventId()
Get the last issued notification event id.
|
Database |
getDatabase(String catalogName,
String name)
Get a database.
|
int |
getDatabaseCount()
Gets total number of databases.
|
List<String> |
getDatabases(String catalogName,
String pattern)
Get all database in a catalog having names that match a pattern.
|
PrincipalPrivilegeSet |
getDBPrivilegeSet(String catName,
String dbName,
String userName,
List<String> groupNames)
Get privileges for a database for a user.
|
List<SQLDefaultConstraint> |
getDefaultConstraints(String catName,
String db_name,
String tbl_name)
Get default values for columns in a table.
|
ByteBuffer[] |
getFileMetadata(List<Long> fileIds) |
void |
getFileMetadataByExpr(List<Long> fileIds,
FileMetadataExprType type,
byte[] expr,
ByteBuffer[] metadatas,
ByteBuffer[] exprResults,
boolean[] eliminated)
Gets file metadata from cache after applying a format-specific expression that can
produce additional information based on file metadata and also filter the file list.
|
FileMetadataHandler |
getFileMetadataHandler(FileMetadataExprType type)
Gets file metadata handler for the corresponding type.
|
List<SQLForeignKey> |
getForeignKeys(String catName,
String parent_db_name,
String parent_tbl_name,
String foreign_db_name,
String foreign_tbl_name)
Get the foreign keys for a table.
|
Function |
getFunction(String catName,
String dbName,
String funcName)
Retrieve function by name.
|
List<String> |
getFunctions(String catName,
String dbName,
String pattern)
Retrieve list of function names based on name pattern.
|
ISchema |
getISchema(ISchemaName schemaName)
Get an ISchema by name.
|
SchemaVersion |
getLatestSchemaVersion(ISchemaName schemaName)
Get the latest version of a schema.
|
String[] |
getMasterKeys() |
List<String> |
getMaterializedViewsForRewriting(String catName,
String dbName)
Get list of materialized views in a database.
|
String |
getMetastoreDbUuid()
Gets the unique id of the backing datastore for the metadata
|
String |
getMetaStoreSchemaVersion() |
NotificationEventResponse |
getNextNotification(NotificationEventRequest rqst)
Get the next notification event.
|
NotificationEventsCountResponse |
getNotificationEventsCount(NotificationEventsCountRequest rqst)
Get the number of events corresponding to given database with fromEventId.
|
List<SQLNotNullConstraint> |
getNotNullConstraints(String catName,
String db_name,
String tbl_name)
Get not null constraints on a table.
|
int |
getNumPartitionsByExpr(String catName,
String dbName,
String tblName,
byte[] expr)
Get the number of partitions that match an already parsed expression.
|
int |
getNumPartitionsByFilter(String catName,
String dbName,
String tblName,
String filter)
Get the number of partitions that match a provided SQL filter.
|
Partition |
getPartition(String catName,
String dbName,
String tableName,
List<String> part_vals)
Get a partition.
|
List<MetaStoreUtils.ColStatsObjWithSourceInfo> |
getPartitionColStatsForDatabase(String catName,
String dbName)
Get column stats for all partitions of all tables in the database
|
Map<String,List<String>> |
getPartitionColsWithStats(String catName,
String dbName,
String tableName) |
List<ColumnStatistics> |
getPartitionColumnStatistics(String catName,
String dbName,
String tblName,
List<String> partNames,
List<String> colNames)
Get statistics for a partition for a set of columns.
|
int |
getPartitionCount()
Gets total number of partitions.
|
PrincipalPrivilegeSet |
getPartitionPrivilegeSet(String catName,
String dbName,
String tableName,
String partition,
String userName,
List<String> groupNames)
Get privileges for a partition for a user.
|
List<Partition> |
getPartitions(String catName,
String dbName,
String tableName,
int max)
Get some or all partitions for a table.
|
boolean |
getPartitionsByExpr(String catName,
String dbName,
String tblName,
byte[] expr,
String defaultPartitionName,
short maxParts,
List<Partition> result)
Get partitions using an already parsed expression.
|
List<Partition> |
getPartitionsByFilter(String catName,
String dbName,
String tblName,
String filter,
short maxParts)
Get partitions with a filter.
|
List<Partition> |
getPartitionsByNames(String catName,
String dbName,
String tblName,
List<String> partNames)
Get partitions by name.
|
List<Partition> |
getPartitionsWithAuth(String catName,
String dbName,
String tblName,
short maxParts,
String userName,
List<String> groupNames)
Fetch some or all partitions for a table, along with privilege information for a particular
user.
|
Partition |
getPartitionWithAuth(String catName,
String dbName,
String tblName,
List<String> partVals,
String user_name,
List<String> group_names)
Fetch a partition along with privilege information for a particular user.
|
List<SQLPrimaryKey> |
getPrimaryKeys(String catName,
String db_name,
String tbl_name)
Get the primary associated with a table.
|
WMFullResourcePlan |
getResourcePlan(String name) |
Role |
getRole(String roleName) |
List<RuntimeStat> |
getRuntimeStats(int maxEntries,
int maxCreateTime)
Reads runtime statistic entries.
|
SchemaVersion |
getSchemaVersion(SchemaVersionDescriptor version)
Get a specific schema version.
|
List<SchemaVersion> |
getSchemaVersionsByColumns(String colName,
String colNamespace,
String type)
Find all SchemaVersion objects that match a query.
|
SerDeInfo |
getSerDeInfo(String serDeName)
Get serde information
|
Table |
getTable(String catalogName,
String dbName,
String tableName)
Get a table object.
|
ColumnStatistics |
getTableColumnStatistics(String catName,
String dbName,
String tableName,
List<String> colName)
Returns the relevant column statistics for a given column in a given table in a given database
if such statistics exist.
|
int |
getTableCount()
Gets total number of tables.
|
List<TableMeta> |
getTableMeta(String catName,
String dbNames,
String tableNames,
List<String> tableTypes) |
List<MetaStoreUtils.FullTableName> |
getTableNamesWithStats() |
List<Table> |
getTableObjectsByName(String catName,
String dbname,
List<String> tableNames) |
PrincipalPrivilegeSet |
getTablePrivilegeSet(String catName,
String dbName,
String tableName,
String userName,
List<String> groupNames)
Get privileges for a table for a user.
|
List<String> |
getTables(String catName,
String dbName,
String pattern)
Get table names that match a pattern.
|
List<String> |
getTables(String catName,
String dbName,
String pattern,
TableType tableType)
Get table names that match a pattern.
|
String |
getToken(String tokenIdentifier) |
List<WMTrigger> |
getTriggersForResourcePlan(String resourcePlanName) |
Type |
getType(String typeName) |
List<SQLUniqueConstraint> |
getUniqueConstraints(String catName,
String db_name,
String tbl_name)
Get unique constraints associated with a table.
|
PrincipalPrivilegeSet |
getUserPrivilegeSet(String userName,
List<String> groupNames) |
boolean |
grantPrivileges(PrivilegeBag privileges) |
boolean |
grantRole(Role role,
String userName,
PrincipalType principalType,
String grantor,
PrincipalType grantorType,
boolean grantOption) |
boolean |
isActiveTransaction() |
boolean |
isFileMetadataSupported() |
boolean |
isPartitionMarkedForEvent(String catName,
String dbName,
String tblName,
Map<String,String> partName,
PartitionEventType evtType) |
List<HiveObjectPrivilege> |
listAllTableGrants(String principalName,
PrincipalType principalType,
String catName,
String dbName,
String tableName)
For a given principal name and type, list the Table Grants
|
List<HiveObjectPrivilege> |
listDBGrantsAll(String catName,
String dbName)
Find all the privileges for a given database.
|
List<HiveObjectPrivilege> |
listGlobalGrantsAll() |
List<HiveObjectPrivilege> |
listPartitionColumnGrantsAll(String catName,
String dbName,
String tableName,
String partitionName,
String columnName)
Find all of the privileges for a given column in a given partition.
|
List<HiveObjectPrivilege> |
listPartitionGrantsAll(String catName,
String dbName,
String tableName,
String partitionName)
Find all of the privileges for a given partition.
|
List<String> |
listPartitionNames(String catName,
String db_name,
String tbl_name,
short max_parts)
Get a partial or complete list of names for partitions of a table.
|
List<String> |
listPartitionNamesPs(String catName,
String db_name,
String tbl_name,
List<String> part_vals,
short max_parts)
Lists partition names that match a given partial specification
|
List<Partition> |
listPartitionsPsWithAuth(String catName,
String db_name,
String tbl_name,
List<String> part_vals,
short max_parts,
String userName,
List<String> groupNames)
Lists partitions that match a given partial specification and sets their auth privileges.
|
PartitionValuesResponse |
listPartitionValues(String catName,
String db_name,
String tbl_name,
List<FieldSchema> cols,
boolean applyDistinct,
String filter,
boolean ascending,
List<FieldSchema> order,
long maxParts)
Get a list of partition values as one big struct.
|
List<HiveObjectPrivilege> |
listPrincipalDBGrants(String principalName,
PrincipalType principalType,
String catName,
String dbName)
For a given principal name and type, list the DB Grants
|
List<HiveObjectPrivilege> |
listPrincipalDBGrantsAll(String principalName,
PrincipalType principalType)
List all DB grants for a given principal.
|
List<HiveObjectPrivilege> |
listPrincipalGlobalGrants(String principalName,
PrincipalType principalType) |
List<HiveObjectPrivilege> |
listPrincipalPartitionColumnGrants(String principalName,
PrincipalType principalType,
String catName,
String dbName,
String tableName,
List<String> partValues,
String partName,
String columnName)
For a given principal name and type, list the Table Grants
|
List<HiveObjectPrivilege> |
listPrincipalPartitionColumnGrantsAll(String principalName,
PrincipalType principalType)
List all Partition column grants for a given principal
|
List<HiveObjectPrivilege> |
listPrincipalPartitionGrants(String principalName,
PrincipalType principalType,
String catName,
String dbName,
String tableName,
List<String> partValues,
String partName)
For a given principal name and type, list the Table Grants
|
List<HiveObjectPrivilege> |
listPrincipalPartitionGrantsAll(String principalName,
PrincipalType principalType)
List all Partition grants for a given principal
|
List<HiveObjectPrivilege> |
listPrincipalTableColumnGrants(String principalName,
PrincipalType principalType,
String catName,
String dbName,
String tableName,
String columnName)
For a given principal name and type, list the Table Grants
|
List<HiveObjectPrivilege> |
listPrincipalTableColumnGrantsAll(String principalName,
PrincipalType principalType)
List all Table column grants for a given principal
|
List<HiveObjectPrivilege> |
listPrincipalTableGrantsAll(String principalName,
PrincipalType principalType)
List all Table grants for a given principal
|
List<RolePrincipalGrant> |
listRoleMembers(String roleName)
Get the role to principal grant mapping for given role
|
List<String> |
listRoleNames() |
List<Role> |
listRoles(String principalName,
PrincipalType principalType) |
List<RolePrincipalGrant> |
listRolesWithGrants(String principalName,
PrincipalType principalType) |
List<HiveObjectPrivilege> |
listTableColumnGrantsAll(String catName,
String dbName,
String tableName,
String columnName)
Find all of the privileges for a given column in a given table.
|
List<HiveObjectPrivilege> |
listTableGrantsAll(String catName,
String dbName,
String tableName)
Find all of the privileges for a given table
|
List<String> |
listTableNamesByFilter(String catName,
String dbName,
String filter,
short max_tables)
Gets a list of tables based on a filter string and filter type.
|
Table |
markPartitionForEvent(String catName,
String dbName,
String tblName,
Map<String,String> partVals,
PartitionEventType evtType) |
boolean |
openTransaction()
Opens a new one or the one already created Every call of this function must
have corresponding commit or rollback function call
|
void |
putFileMetadata(List<Long> fileIds,
List<ByteBuffer> metadata,
FileMetadataExprType type) |
boolean |
refreshPrivileges(HiveObjectRef objToRefresh,
String authorizer,
PrivilegeBag grantPrivileges) |
boolean |
removeMasterKey(Integer keySeq) |
boolean |
removeRole(String roleName) |
boolean |
removeToken(String tokenIdentifier) |
boolean |
revokePrivileges(PrivilegeBag privileges,
boolean grantOption) |
boolean |
revokeRole(Role role,
String userName,
PrincipalType principalType,
boolean grantOption) |
void |
rollbackTransaction()
Rolls back the current transaction if it is active
|
void |
setMetaStoreSchemaVersion(String version,
String comment) |
void |
shutdown() |
void |
updateCreationMetadata(String catName,
String dbname,
String tablename,
CreationMetadata cm)
Update creation metadata for a materialized view.
|
void |
updateMasterKey(Integer seqNo,
String key) |
boolean |
updatePartitionColumnStatistics(ColumnStatistics statsObj,
List<String> partVals)
Persists the given column statistics object to the metastore
|
boolean |
updateTableColumnStatistics(ColumnStatistics colStats)
Persists the given column statistics object to the metastore
|
WMValidateResourcePlanResponse |
validateResourcePlan(String name) |
void |
verifySchema() |
void shutdown()
boolean openTransaction()
boolean commitTransaction()
boolean isActiveTransaction()
void rollbackTransaction()
void createCatalog(Catalog cat) throws MetaException
cat
- Catalog to create.MetaException
- if something goes wrong, usually in storing it to the database.void alterCatalog(String catName, Catalog cat) throws MetaException, InvalidOperationException
catName
- name of the catalog to alter.cat
- new version of the catalog.MetaException
- something went wrong, usually in the database.InvalidOperationException
- attempt to change something about the catalog that is not
changeable, like the name.Catalog getCatalog(String catalogName) throws NoSuchObjectException, MetaException
catalogName
- name of the catalog.NoSuchObjectException
- no catalog of this name exists.MetaException
- if something goes wrong, usually in reading it from the database.List<String> getCatalogs() throws MetaException
MetaException
- if something goes wrong, usually in reading from the database.void dropCatalog(String catalogName) throws NoSuchObjectException, MetaException
catalogName
- name of the catalog to drop.NoSuchObjectException
- no catalog of this name exists.MetaException
- could mean the catalog isn't empty, could mean general database error.void createDatabase(Database db) throws InvalidObjectException, MetaException
db
- database to create.InvalidObjectException
- not sure it actually ever throws this.MetaException
- if something goes wrong, usually in writing it to the database.Database getDatabase(String catalogName, String name) throws NoSuchObjectException
catalogName
- catalog the database is in.name
- name of the database.NoSuchObjectException
- if no such database exists.boolean dropDatabase(String catalogName, String dbname) throws NoSuchObjectException, MetaException
catalogName
- catalog the database is in.dbname
- name of the database.NoSuchObjectException
- no database in this catalog of this name to dropMetaException
- something went wrong, usually with the database.boolean alterDatabase(String catalogName, String dbname, Database db) throws NoSuchObjectException, MetaException
catalogName
- name of the catalog the database is in.dbname
- name of the database to alterdb
- new version of the database. This should be complete as it will fully replace the
existing db object.NoSuchObjectException
- no database of this name exists to alter.MetaException
- something went wrong, usually with the database.List<String> getDatabases(String catalogName, String pattern) throws MetaException
catalogName
- name of the catalog to search for databases inpattern
- pattern names should matchMetaException
- something went wrong, usually with the database.List<String> getAllDatabases(String catalogName) throws MetaException
catalogName
- name of the catalog to search for databases inMetaException
- something went wrong, usually with the database.boolean createType(Type type)
boolean dropType(String typeName)
void createTable(Table tbl) throws InvalidObjectException, MetaException
InvalidObjectException
MetaException
boolean dropTable(String catalogName, String dbName, String tableName) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException
catalogName
- catalog the table is indbName
- database the table is intableName
- table nameMetaException
- something went wrong, usually in the RDBMS or storageNoSuchObjectException
- No table of this nameInvalidObjectException
- Don't think this is ever actually thrownInvalidInputException
- Don't think this is ever actually thrownTable getTable(String catalogName, String dbName, String tableName) throws MetaException
catalogName
- catalog the table is in.dbName
- database the table is in.tableName
- table name.MetaException
- something went wrong in the RDBMSboolean addPartition(Partition part) throws InvalidObjectException, MetaException
part
- partition to addInvalidObjectException
- the provided partition object is not valid.MetaException
- error writing to the RDBMS.boolean addPartitions(String catName, String dbName, String tblName, List<Partition> parts) throws InvalidObjectException, MetaException
catName
- catalog name.dbName
- database name.tblName
- table name.parts
- list of partitions to be added.InvalidObjectException
- never throws this AFAICTMetaException
- the partitions don't belong to the indicated table or error writing to
the RDBMS.boolean addPartitions(String catName, String dbName, String tblName, PartitionSpecProxy partitionSpec, boolean ifNotExists) throws InvalidObjectException, MetaException
catName
- catalog name.dbName
- database name.tblName
- table name.partitionSpec
- specification for the partitionifNotExists
- whether it is in an error if the partition already exists. If true, then
it is not an error if the partition exists, if false, it is.InvalidObjectException
- The passed in partition spec or table specification is invalid.MetaException
- error writing to RDBMS.Partition getPartition(String catName, String dbName, String tableName, List<String> part_vals) throws MetaException, NoSuchObjectException
catName
- catalog name.dbName
- database name.tableName
- table name.part_vals
- partition values for this table.MetaException
- error reading from RDBMS.NoSuchObjectException
- no partition matching this specification exists.boolean doesPartitionExist(String catName, String dbName, String tableName, List<String> part_vals) throws MetaException, NoSuchObjectException
catName
- catalog name.dbName
- database name.tableName
- table name.part_vals
- list of partition values.MetaException
- failure reading RDBMSNoSuchObjectException
- this is never thrown.boolean dropPartition(String catName, String dbName, String tableName, List<String> part_vals) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException
catName
- catalog name.dbName
- database name.tableName
- table name.part_vals
- list of partition values.MetaException
- Error accessing the RDBMS.NoSuchObjectException
- no partition matching this description existsInvalidObjectException
- error dropping the statistics for the partitionInvalidInputException
- error dropping the statistics for the partitionList<Partition> getPartitions(String catName, String dbName, String tableName, int max) throws MetaException, NoSuchObjectException
catName
- catalog name.dbName
- database name.tableName
- table namemax
- maximum number of partitions, or -1 to get all partitions.MetaException
- error access the RDBMS.NoSuchObjectException
- no such table existsvoid alterTable(String catName, String dbname, String name, Table newTable) throws InvalidObjectException, MetaException
catName
- catalog the table is in.dbname
- database the table is in.name
- name of the table.newTable
- New table object. Which parts of the table can be altered are
implementation specific.InvalidObjectException
- The new table object is invalid.MetaException
- something went wrong, usually in the RDBMS or storage.void updateCreationMetadata(String catName, String dbname, String tablename, CreationMetadata cm) throws MetaException
catName
- catalog name.dbname
- database name.tablename
- table name.cm
- new creation metadataMetaException
- error accessing the RDBMS.List<String> getTables(String catName, String dbName, String pattern) throws MetaException
catName
- catalog to search indbName
- database to search inpattern
- pattern to matchMetaException
- failure in querying the RDBMSList<String> getTables(String catName, String dbName, String pattern, TableType tableType) throws MetaException
catName
- catalog to search indbName
- database to search inpattern
- pattern to matchtableType
- type of table to look forMetaException
- failure in querying the RDBMSList<String> getMaterializedViewsForRewriting(String catName, String dbName) throws MetaException, NoSuchObjectException
catName
- catalog namedbName
- database nameMetaException
- error querying the RDBMSNoSuchObjectException
- no such databaseList<TableMeta> getTableMeta(String catName, String dbNames, String tableNames, List<String> tableTypes) throws MetaException
catName
- catalog name to search in. Search must be confined to one catalog.dbNames
- databases to search in.tableNames
- names of tables to select.tableTypes
- types of tables to look for.MetaException
- failure in querying the RDBMS.List<Table> getTableObjectsByName(String catName, String dbname, List<String> tableNames) throws MetaException, UnknownDBException
catName
- catalog namedbname
- The name of the database from which to retrieve the tablestableNames
- The names of the tables to retrieve.MetaException
- failure in querying the RDBMS.UnknownDBException
List<String> getAllTables(String catName, String dbName) throws MetaException
catName
- catalog name.dbName
- database name.MetaException
- failure in querying the RDBMS.List<String> listTableNamesByFilter(String catName, String dbName, String filter, short max_tables) throws MetaException, UnknownDBException
catName
- catalog namedbName
- The name of the database from which you will retrieve the table namesfilter
- The filter stringmax_tables
- The maximum number of tables returnedMetaException
UnknownDBException
List<String> listPartitionNames(String catName, String db_name, String tbl_name, short max_parts) throws MetaException
catName
- catalog name.db_name
- database name.tbl_name
- table name.max_parts
- maximum number of partitions to retrieve, -1 for all.MetaException
- there was an error accessing the RDBMSPartitionValuesResponse listPartitionValues(String catName, String db_name, String tbl_name, List<FieldSchema> cols, boolean applyDistinct, String filter, boolean ascending, List<FieldSchema> order, long maxParts) throws MetaException
catName
- catalog name.db_name
- database name.tbl_name
- table name.cols
- partition key columnsapplyDistinct
- whether to apply distinct to the listfilter
- filter to apply to the partition namesascending
- whether to put in ascending orderorder
- whether to ordermaxParts
- maximum number of parts to return, or -1 for allMetaException
- error access the RDBMSvoid alterPartition(String catName, String db_name, String tbl_name, List<String> part_vals, Partition new_part) throws InvalidObjectException, MetaException
catName
- catalog name.db_name
- database name.tbl_name
- table name.part_vals
- partition values that describe the partition.new_part
- new partition object. This should be a complete copy of the old with
changes values, not just the parts to update.InvalidObjectException
- No such partition.MetaException
- error accessing the RDBMS.void alterPartitions(String catName, String db_name, String tbl_name, List<List<String>> part_vals_list, List<Partition> new_parts) throws InvalidObjectException, MetaException
catName
- catalog name.db_name
- database name.tbl_name
- table name.part_vals_list
- list of list of partition values. Each outer list describes one
partition (with its list of partition values).new_parts
- list of new partitions. The order must match the old partitions described in
part_vals_list. Each of these should be a complete copy of the new
partition, not just the pieces to update.InvalidObjectException
- One of the indicated partitions does not exist.MetaException
- error accessing the RDBMS.List<Partition> getPartitionsByFilter(String catName, String dbName, String tblName, String filter, short maxParts) throws MetaException, NoSuchObjectException
catName
- catalog namedbName
- database nametblName
- table namefilter
- SQL where clause filtermaxParts
- maximum number of partitions to return, or -1 for all.MetaException
- Error accessing the RDBMS or processing the filter.NoSuchObjectException
- no such table.boolean getPartitionsByExpr(String catName, String dbName, String tblName, byte[] expr, String defaultPartitionName, short maxParts, List<Partition> result) throws org.apache.thrift.TException
catName
- catalog name.dbName
- database nametblName
- table nameexpr
- an already parsed Hive expressiondefaultPartitionName
- default name of a partitionmaxParts
- maximum number of partitions to return, or -1 for allresult
- list to place resulting partitions inorg.apache.thrift.TException
- error executing the expressionint getNumPartitionsByFilter(String catName, String dbName, String tblName, String filter) throws MetaException, NoSuchObjectException
catName
- catalog name.dbName
- database name.tblName
- table name.filter
- filter from Hive's SQL where clauseMetaException
- error accessing the RDBMS or executing the filterNoSuchObjectException
- no such tableint getNumPartitionsByExpr(String catName, String dbName, String tblName, byte[] expr) throws MetaException, NoSuchObjectException
catName
- catalog name.dbName
- database name.tblName
- table name.expr
- an already parsed Hive expressionMetaException
- error accessing the RDBMS or working with the expression.NoSuchObjectException
- no such table.List<Partition> getPartitionsByNames(String catName, String dbName, String tblName, List<String> partNames) throws MetaException, NoSuchObjectException
catName
- catalog name.dbName
- database name.tblName
- table name.partNames
- list of partition names. These are names not values, so they will include
both the key and the value.MetaException
- error accessing the RDBMS.NoSuchObjectException
- No such table.Table markPartitionForEvent(String catName, String dbName, String tblName, Map<String,String> partVals, PartitionEventType evtType) throws MetaException, UnknownTableException, InvalidPartitionException, UnknownPartitionException
boolean isPartitionMarkedForEvent(String catName, String dbName, String tblName, Map<String,String> partName, PartitionEventType evtType) throws MetaException, UnknownTableException, InvalidPartitionException, UnknownPartitionException
boolean addRole(String rowName, String ownerName) throws InvalidObjectException, MetaException, NoSuchObjectException
boolean removeRole(String roleName) throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
boolean grantRole(Role role, String userName, PrincipalType principalType, String grantor, PrincipalType grantorType, boolean grantOption) throws MetaException, NoSuchObjectException, InvalidObjectException
boolean revokeRole(Role role, String userName, PrincipalType principalType, boolean grantOption) throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
PrincipalPrivilegeSet getUserPrivilegeSet(String userName, List<String> groupNames) throws InvalidObjectException, MetaException
InvalidObjectException
MetaException
PrincipalPrivilegeSet getDBPrivilegeSet(String catName, String dbName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
catName
- catalog namedbName
- database nameuserName
- user namegroupNames
- list of groups the user is inInvalidObjectException
- no such databaseMetaException
- error accessing the RDBMSPrincipalPrivilegeSet getTablePrivilegeSet(String catName, String dbName, String tableName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
catName
- catalog namedbName
- database nametableName
- table nameuserName
- user namegroupNames
- list of groups the user is inInvalidObjectException
- no such tableMetaException
- error accessing the RDBMSPrincipalPrivilegeSet getPartitionPrivilegeSet(String catName, String dbName, String tableName, String partition, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
catName
- catalog namedbName
- database nametableName
- table namepartition
- partition nameuserName
- user namegroupNames
- list of groups the user is inInvalidObjectException
- no such partitionMetaException
- error accessing the RDBMSPrincipalPrivilegeSet getColumnPrivilegeSet(String catName, String dbName, String tableName, String partitionName, String columnName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
catName
- catalog namedbName
- database nametableName
- table namepartitionName
- partition name, or null for table level column permissionscolumnName
- column nameuserName
- user namegroupNames
- list of groups the user is inInvalidObjectException
- no such table, partition, or columnMetaException
- error accessing the RDBMSList<HiveObjectPrivilege> listPrincipalGlobalGrants(String principalName, PrincipalType principalType)
List<HiveObjectPrivilege> listPrincipalDBGrants(String principalName, PrincipalType principalType, String catName, String dbName)
principalName
- principal nameprincipalType
- typecatName
- catalog namedbName
- database nameList<HiveObjectPrivilege> listAllTableGrants(String principalName, PrincipalType principalType, String catName, String dbName, String tableName)
principalName
- principal nameprincipalType
- typecatName
- catalog namedbName
- database nametableName
- table nameList<HiveObjectPrivilege> listPrincipalPartitionGrants(String principalName, PrincipalType principalType, String catName, String dbName, String tableName, List<String> partValues, String partName)
principalName
- principal nameprincipalType
- typecatName
- catalog namedbName
- database nametableName
- table namepartName
- partition name (not value)List<HiveObjectPrivilege> listPrincipalTableColumnGrants(String principalName, PrincipalType principalType, String catName, String dbName, String tableName, String columnName)
principalName
- principal nameprincipalType
- typecatName
- catalog namedbName
- database nametableName
- table namecolumnName
- column nameList<HiveObjectPrivilege> listPrincipalPartitionColumnGrants(String principalName, PrincipalType principalType, String catName, String dbName, String tableName, List<String> partValues, String partName, String columnName)
principalName
- principal nameprincipalType
- typecatName
- catalog namedbName
- database nametableName
- table namepartName
- partition name (not value)columnName
- column nameboolean grantPrivileges(PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException
boolean revokePrivileges(PrivilegeBag privileges, boolean grantOption) throws InvalidObjectException, MetaException, NoSuchObjectException
boolean refreshPrivileges(HiveObjectRef objToRefresh, String authorizer, PrivilegeBag grantPrivileges) throws InvalidObjectException, MetaException, NoSuchObjectException
Role getRole(String roleName) throws NoSuchObjectException
NoSuchObjectException
List<Role> listRoles(String principalName, PrincipalType principalType)
List<RolePrincipalGrant> listRolesWithGrants(String principalName, PrincipalType principalType)
List<RolePrincipalGrant> listRoleMembers(String roleName)
roleName
- Partition getPartitionWithAuth(String catName, String dbName, String tblName, List<String> partVals, String user_name, List<String> group_names) throws MetaException, NoSuchObjectException, InvalidObjectException
catName
- catalog name.dbName
- database name.tblName
- table name.partVals
- partition valuesuser_name
- user to get privilege information for.group_names
- groups to get privilege information for.MetaException
- error accessing the RDBMS.NoSuchObjectException
- no such partition existsInvalidObjectException
- error fetching privilege informationList<Partition> getPartitionsWithAuth(String catName, String dbName, String tblName, short maxParts, String userName, List<String> groupNames) throws MetaException, NoSuchObjectException, InvalidObjectException
catName
- catalog name.dbName
- database name.tblName
- table name.maxParts
- maximum number of partitions to fetch, -1 for all partitions.userName
- user to get privilege information for.groupNames
- groups to get privilege information for.MetaException
- error access the RDBMS.NoSuchObjectException
- no such table existsInvalidObjectException
- error fetching privilege information.List<String> listPartitionNamesPs(String catName, String db_name, String tbl_name, List<String> part_vals, short max_parts) throws MetaException, NoSuchObjectException
catName
- catalog name.db_name
- The name of the database which has the partitionstbl_name
- The name of the table which has the partitionspart_vals
- A partial list of values for partitions in order of the table's partition keys.
Entries can be empty if you only want to specify latter partitions.max_parts
- The maximum number of partitions to returnMetaException
- error accessing RDBMSNoSuchObjectException
- No such table existsList<Partition> listPartitionsPsWithAuth(String catName, String db_name, String tbl_name, List<String> part_vals, short max_parts, String userName, List<String> groupNames) throws MetaException, InvalidObjectException, NoSuchObjectException
catName
- catalog name.db_name
- The name of the database which has the partitionstbl_name
- The name of the table which has the partitionspart_vals
- A partial list of values for partitions in order of the table's partition keys
Entries can be empty if you need to specify latter partitions.max_parts
- The maximum number of partitions to returnuserName
- The user name for the partition for authentication privilegesgroupNames
- The groupNames for the partition for authentication privilegesMetaException
- error access RDBMSNoSuchObjectException
- No such table existsInvalidObjectException
- error access privilege informationboolean updateTableColumnStatistics(ColumnStatistics colStats) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
colStats
- object to persistNoSuchObjectException
- No such table.MetaException
- error accessing the RDBMS.InvalidObjectException
- the stats object is invalidInvalidInputException
- unable to record the stats for the tableboolean updatePartitionColumnStatistics(ColumnStatistics statsObj, List<String> partVals) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
statsObj
- object to persistpartVals
- partition values to persist the stats forNoSuchObjectException
- No such table.MetaException
- error accessing the RDBMS.InvalidObjectException
- the stats object is invalidInvalidInputException
- unable to record the stats for the tableColumnStatistics getTableColumnStatistics(String catName, String dbName, String tableName, List<String> colName) throws MetaException, NoSuchObjectException
catName
- catalog name.dbName
- name of the database, defaults to current databasetableName
- name of the tablecolName
- names of the columns for which statistics is requestedNoSuchObjectException
- No such tableMetaException
- error accessing the RDBMSList<ColumnStatistics> getPartitionColumnStatistics(String catName, String dbName, String tblName, List<String> partNames, List<String> colNames) throws MetaException, NoSuchObjectException
catName
- catalog name.dbName
- database name.tblName
- table name.partNames
- list of partition names. These are names so must be key1=val1[/key2=val2...]colNames
- list of columns to get stats forMetaException
- error accessing the RDBMSNoSuchObjectException
- no such partition.boolean deletePartitionColumnStatistics(String catName, String dbName, String tableName, String partName, List<String> partVals, String colName) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
catName
- catalog name.dbName
- database name.tableName
- table name.partName
- partition name.partVals
- partition values.colName
- column name.NoSuchObjectException
- no such partitionMetaException
- error access the RDBMSInvalidObjectException
- error dropping the statsInvalidInputException
- bad input, such as null table or database name.boolean deleteTableColumnStatistics(String catName, String dbName, String tableName, String colName) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
catName
- catalog namedbName
- database nametableName
- table namecolName
- column name. Null to delete stats for all columns in the table.NoSuchObjectException
- no such table or column.MetaException
- error access the RDBMS.InvalidObjectException
- error dropping the statsInvalidInputException
- bad inputs, such as null table name.long cleanupEvents()
boolean removeToken(String tokenIdentifier)
int addMasterKey(String key) throws MetaException
MetaException
void updateMasterKey(Integer seqNo, String key) throws NoSuchObjectException, MetaException
NoSuchObjectException
MetaException
boolean removeMasterKey(Integer keySeq)
String[] getMasterKeys()
void verifySchema() throws MetaException
MetaException
String getMetaStoreSchemaVersion() throws MetaException
MetaException
void setMetaStoreSchemaVersion(String version, String comment) throws MetaException
MetaException
void dropPartitions(String catName, String dbName, String tblName, List<String> partNames) throws MetaException, NoSuchObjectException
catName
- catalog name.dbName
- database name.tblName
- table namepartNames
- list of partition names.MetaException
- error access RDBMS or storage.NoSuchObjectException
- One or more of the partitions does not exist.List<HiveObjectPrivilege> listPrincipalDBGrantsAll(String principalName, PrincipalType principalType)
principalName
- principal nameprincipalType
- typeList<HiveObjectPrivilege> listPrincipalTableGrantsAll(String principalName, PrincipalType principalType)
principalName
- principal nameprincipalType
- typeList<HiveObjectPrivilege> listPrincipalPartitionGrantsAll(String principalName, PrincipalType principalType)
principalName
- principal nameprincipalType
- typeList<HiveObjectPrivilege> listPrincipalTableColumnGrantsAll(String principalName, PrincipalType principalType)
principalName
- principal nameprincipalType
- typeList<HiveObjectPrivilege> listPrincipalPartitionColumnGrantsAll(String principalName, PrincipalType principalType)
principalName
- principal nameprincipalType
- typeList<HiveObjectPrivilege> listGlobalGrantsAll()
List<HiveObjectPrivilege> listDBGrantsAll(String catName, String dbName)
catName
- catalog namedbName
- database nameList<HiveObjectPrivilege> listPartitionColumnGrantsAll(String catName, String dbName, String tableName, String partitionName, String columnName)
catName
- catalog namedbName
- database nametableName
- table namepartitionName
- partition name (not value)columnName
- column nameList<HiveObjectPrivilege> listTableGrantsAll(String catName, String dbName, String tableName)
catName
- catalog namedbName
- database nametableName
- table nameList<HiveObjectPrivilege> listPartitionGrantsAll(String catName, String dbName, String tableName, String partitionName)
catName
- catalog namedbName
- database nametableName
- table namepartitionName
- partition name (not value)List<HiveObjectPrivilege> listTableColumnGrantsAll(String catName, String dbName, String tableName, String columnName)
catName
- catalog namedbName
- database nametableName
- table namecolumnName
- column namevoid createFunction(Function func) throws InvalidObjectException, MetaException
func
- function to createInvalidObjectException
- incorrectly specified functionMetaException
- error accessing the RDBMSvoid alterFunction(String catName, String dbName, String funcName, Function newFunction) throws InvalidObjectException, MetaException
dbName
- database namefuncName
- function namenewFunction
- new function specificationInvalidObjectException
- no such function, or incorrectly specified new functionMetaException
- incorrectly specified functionvoid dropFunction(String catName, String dbName, String funcName) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException
dbName
- database namefuncName
- function nameMetaException
- incorrectly specified functionNoSuchObjectException
- no such functionInvalidObjectException
- not sure when this is thrownInvalidInputException
- not sure when this is thrownFunction getFunction(String catName, String dbName, String funcName) throws MetaException
dbName
- database namefuncName
- function nameMetaException
- incorrectly specified functionList<Function> getAllFunctions(String catName) throws MetaException
MetaException
- incorrectly specified functionList<String> getFunctions(String catName, String dbName, String pattern) throws MetaException
dbName
- database namepattern
- pattern to matchMetaException
- incorrectly specified functionAggrStats get_aggr_stats_for(String catName, String dbName, String tblName, List<String> partNames, List<String> colNames) throws MetaException, NoSuchObjectException
catName
- catalog name.dbName
- database name.tblName
- table name.partNames
- list of partition names. These are the names of the partitions, not
values.colNames
- list of column namesMetaException
- error accessing RDBMSNoSuchObjectException
- no such table or partitionList<MetaStoreUtils.ColStatsObjWithSourceInfo> getPartitionColStatsForDatabase(String catName, String dbName) throws MetaException, NoSuchObjectException
catName
- catalog namedbName
- database nameMetaException
- error accessing RDBMSNoSuchObjectException
- no such databaseNotificationEventResponse getNextNotification(NotificationEventRequest rqst)
rqst
- Request containing information on the last processed notification.void addNotificationEvent(NotificationEvent event)
event
- the notification to addvoid cleanNotificationEvents(int olderThan)
olderThan
- Remove any events older than a given number of secondsCurrentNotificationEventId getCurrentNotificationEventId()
NotificationEventsCountResponse getNotificationEventsCount(NotificationEventsCountRequest rqst)
void flushCache()
ByteBuffer[] getFileMetadata(List<Long> fileIds) throws MetaException
fileIds
- List of file IDs from the filesystem.MetaException
void putFileMetadata(List<Long> fileIds, List<ByteBuffer> metadata, FileMetadataExprType type) throws MetaException
fileIds
- List of file IDs from the filesystem.metadata
- Metadata buffers corresponding to fileIds in the list.type
- The type; determines the class that can do additiona processing for metadata.MetaException
boolean isFileMetadataSupported()
void getFileMetadataByExpr(List<Long> fileIds, FileMetadataExprType type, byte[] expr, ByteBuffer[] metadatas, ByteBuffer[] exprResults, boolean[] eliminated) throws MetaException
fileIds
- List of file IDs from the filesystem.expr
- Format-specific serialized expression applicable to the files' metadatas.type
- Expression type; used to determine the class that handles the metadata.metadatas
- Output parameter; fileIds-sized array to receive the metadatas
for corresponding files, if any.exprResults
- Output parameter; fileIds-sized array to receive the format-specific
expression results for the corresponding files.eliminated
- Output parameter; fileIds-sized array to receive the indication of whether
the corresponding files are entirely eliminated by the expression.MetaException
FileMetadataHandler getFileMetadataHandler(FileMetadataExprType type)
@InterfaceStability.Evolving int getTableCount() throws MetaException
MetaException
@InterfaceStability.Evolving int getPartitionCount() throws MetaException
MetaException
@InterfaceStability.Evolving int getDatabaseCount() throws MetaException
MetaException
List<SQLPrimaryKey> getPrimaryKeys(String catName, String db_name, String tbl_name) throws MetaException
catName
- catalog namedb_name
- database nametbl_name
- table nameMetaException
- error accessing the RDBMSList<SQLForeignKey> getForeignKeys(String catName, String parent_db_name, String parent_tbl_name, String foreign_db_name, String foreign_tbl_name) throws MetaException
catName
- catalog name.parent_db_name
- Database the table referred to is in. This can be null to match all
databases.parent_tbl_name
- Table that is referred to. This can be null to match all tables.foreign_db_name
- Database the table with the foreign key is in.foreign_tbl_name
- Table with the foreign key.MetaException
- error access the RDBMS.List<SQLUniqueConstraint> getUniqueConstraints(String catName, String db_name, String tbl_name) throws MetaException
catName
- catalog name.db_name
- database name.tbl_name
- table name.MetaException
- error access the RDBMS.List<SQLNotNullConstraint> getNotNullConstraints(String catName, String db_name, String tbl_name) throws MetaException
catName
- catalog name.db_name
- database name.tbl_name
- table name.MetaException
- error accessing the RDBMS.List<SQLDefaultConstraint> getDefaultConstraints(String catName, String db_name, String tbl_name) throws MetaException
catName
- catalog namedb_name
- database nametbl_name
- table nameMetaException
- error accessing the RDBMSList<SQLCheckConstraint> getCheckConstraints(String catName, String db_name, String tbl_name) throws MetaException
catName
- catalog name.db_name
- database nametbl_name
- table nameMetaException
- error accessing the RDBMSList<String> createTableWithConstraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys, List<SQLUniqueConstraint> uniqueConstraints, List<SQLNotNullConstraint> notNullConstraints, List<SQLDefaultConstraint> defaultConstraints, List<SQLCheckConstraint> checkConstraints) throws InvalidObjectException, MetaException
tbl
- table definitionprimaryKeys
- primary key definition, or nullforeignKeys
- foreign key definition, or nulluniqueConstraints
- unique constraints definition, or nullnotNullConstraints
- not null constraints definition, or nulldefaultConstraints
- default values definition, or nullInvalidObjectException
- one of the provided objects is malformed.MetaException
- error accessing the RDBMSdefault void dropConstraint(String catName, String dbName, String tableName, String constraintName) throws NoSuchObjectException
catName
- catalog namedbName
- database nametableName
- table nameconstraintName
- name of the constraintNoSuchObjectException
- no constraint of this name existsvoid dropConstraint(String catName, String dbName, String tableName, String constraintName, boolean missingOk) throws NoSuchObjectException
catName
- catalog namedbName
- database nametableName
- table nameconstraintName
- name of the constraintmissingOk
- if true, it is not an error if there is no constraint of this name. If
false and there is no constraint of this name an exception will be thrown.NoSuchObjectException
- no constraint of this name exists and missingOk = falseList<String> addPrimaryKeys(List<SQLPrimaryKey> pks) throws InvalidObjectException, MetaException
pks
- Columns in the primary key.InvalidObjectException
- The SQLPrimaryKeys list is malformedMetaException
- error accessing the RDMBSList<String> addForeignKeys(List<SQLForeignKey> fks) throws InvalidObjectException, MetaException
fks
- foreign key specificationInvalidObjectException
- the specification is malformed.MetaException
- error accessing the RDBMS.List<String> addUniqueConstraints(List<SQLUniqueConstraint> uks) throws InvalidObjectException, MetaException
uks
- unique constraints specificationInvalidObjectException
- the specification is malformed.MetaException
- error accessing the RDBMS.List<String> addNotNullConstraints(List<SQLNotNullConstraint> nns) throws InvalidObjectException, MetaException
nns
- not null constraint specificationsInvalidObjectException
- the specification is malformed.MetaException
- error accessing the RDBMS.List<String> addDefaultConstraints(List<SQLDefaultConstraint> dv) throws InvalidObjectException, MetaException
dv
- list of default valuesInvalidObjectException
- the specification is malformed.MetaException
- error accessing the RDBMS.List<String> addCheckConstraints(List<SQLCheckConstraint> cc) throws InvalidObjectException, MetaException
cc
- check constraints to addInvalidObjectException
- the specification is malformedMetaException
- error accessing the RDBMSString getMetastoreDbUuid() throws MetaException
MetaException
void createResourcePlan(WMResourcePlan resourcePlan, String copyFrom, int defaultPoolSize) throws AlreadyExistsException, MetaException, InvalidObjectException, NoSuchObjectException
WMFullResourcePlan getResourcePlan(String name) throws NoSuchObjectException, MetaException
NoSuchObjectException
MetaException
List<WMResourcePlan> getAllResourcePlans() throws MetaException
MetaException
WMFullResourcePlan alterResourcePlan(String name, WMNullableResourcePlan resourcePlan, boolean canActivateDisabled, boolean canDeactivate, boolean isReplace) throws AlreadyExistsException, NoSuchObjectException, InvalidOperationException, MetaException
WMFullResourcePlan getActiveResourcePlan() throws MetaException
MetaException
WMValidateResourcePlanResponse validateResourcePlan(String name) throws NoSuchObjectException, InvalidObjectException, MetaException
void dropResourcePlan(String name) throws NoSuchObjectException, MetaException
NoSuchObjectException
MetaException
void createWMTrigger(WMTrigger trigger) throws AlreadyExistsException, NoSuchObjectException, InvalidOperationException, MetaException
void alterWMTrigger(WMTrigger trigger) throws NoSuchObjectException, InvalidOperationException, MetaException
void dropWMTrigger(String resourcePlanName, String triggerName) throws NoSuchObjectException, InvalidOperationException, MetaException
List<WMTrigger> getTriggersForResourcePlan(String resourcePlanName) throws NoSuchObjectException, MetaException
NoSuchObjectException
MetaException
void createPool(WMPool pool) throws AlreadyExistsException, NoSuchObjectException, InvalidOperationException, MetaException
void alterPool(WMNullablePool pool, String poolPath) throws AlreadyExistsException, NoSuchObjectException, InvalidOperationException, MetaException
void dropWMPool(String resourcePlanName, String poolPath) throws NoSuchObjectException, InvalidOperationException, MetaException
void createOrUpdateWMMapping(WMMapping mapping, boolean update) throws AlreadyExistsException, NoSuchObjectException, InvalidOperationException, MetaException
void dropWMMapping(WMMapping mapping) throws NoSuchObjectException, InvalidOperationException, MetaException
void createWMTriggerToPoolMapping(String resourcePlanName, String triggerName, String poolPath) throws AlreadyExistsException, NoSuchObjectException, InvalidOperationException, MetaException
void dropWMTriggerToPoolMapping(String resourcePlanName, String triggerName, String poolPath) throws NoSuchObjectException, InvalidOperationException, MetaException
void createISchema(ISchema schema) throws AlreadyExistsException, MetaException, NoSuchObjectException
schema
- schema to createAlreadyExistsException
- there's already a schema with this nameMetaException
- general database exceptionNoSuchObjectException
void alterISchema(ISchemaName schemaName, ISchema newSchema) throws NoSuchObjectException, MetaException
schemaName
- name of the schemanewSchema
- new schema objectNoSuchObjectException
- no function with this name existsMetaException
- general database exceptionISchema getISchema(ISchemaName schemaName) throws MetaException
schemaName
- schema descriptorMetaException
- general database exceptionvoid dropISchema(ISchemaName schemaName) throws NoSuchObjectException, MetaException
schemaName
- schema descriptorNoSuchObjectException
- no schema of this name existsMetaException
- general database exceptionvoid addSchemaVersion(SchemaVersion schemaVersion) throws AlreadyExistsException, InvalidObjectException, NoSuchObjectException, MetaException
schemaVersion
- version numberAlreadyExistsException
- a version of the schema with the same version number already
exists.InvalidObjectException
- the passed in SchemaVersion object has problems.NoSuchObjectException
- no schema with the passed in name exists.MetaException
- general database exceptionvoid alterSchemaVersion(SchemaVersionDescriptor version, SchemaVersion newVersion) throws NoSuchObjectException, MetaException
version
- version descriptor for the schemanewVersion
- altered SchemaVersionNoSuchObjectException
- no such version of the named schema existsMetaException
- general database exceptionSchemaVersion getSchemaVersion(SchemaVersionDescriptor version) throws MetaException
version
- version descriptor for the schemaMetaException
- general database exceptionSchemaVersion getLatestSchemaVersion(ISchemaName schemaName) throws MetaException
schemaName
- name of the schemaMetaException
- general database exceptionList<SchemaVersion> getAllSchemaVersion(ISchemaName schemaName) throws MetaException
schemaName
- name of the schemaMetaException
- general database exceptionList<SchemaVersion> getSchemaVersionsByColumns(String colName, String colNamespace, String type) throws MetaException
colName
- column name. Null is ok, which will cause this field to not be used in the
query.colNamespace
- column namespace. Null is ok, which will cause this field to not be
used in the query.type
- column type. Null is ok, which will cause this field to not be used in the
query.MetaException
- general database exceptionvoid dropSchemaVersion(SchemaVersionDescriptor version) throws NoSuchObjectException, MetaException
version
- version descriptor for the schemaNoSuchObjectException
- no such version of the named schema existsMetaException
- general database exceptionSerDeInfo getSerDeInfo(String serDeName) throws NoSuchObjectException, MetaException
serDeName
- name of the SerDeNoSuchObjectException
- no serde with this name existsMetaException
- general database exceptionvoid addSerde(SerDeInfo serde) throws AlreadyExistsException, MetaException
serde
- serde to addAlreadyExistsException
- a serde of this name already existsMetaException
- general database exceptionvoid addRuntimeStat(RuntimeStat stat) throws MetaException
MetaException
List<RuntimeStat> getRuntimeStats(int maxEntries, int maxCreateTime) throws MetaException
MetaException
int deleteRuntimeStats(int maxRetainSecs) throws MetaException
MetaException
List<MetaStoreUtils.FullTableName> getTableNamesWithStats() throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
List<MetaStoreUtils.FullTableName> getAllTableNamesForStats() throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
Map<String,List<String>> getPartitionColsWithStats(String catName, String dbName, String tableName) throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
Copyright © 2022 The Apache Software Foundation. All rights reserved.