public class ObjectStore extends Object implements RawStore, org.apache.hadoop.conf.Configurable
| Modifier and Type | Class and Description |
|---|---|
class |
ObjectStore.UpdateMDatabaseURIRetVal |
class |
ObjectStore.UpdateMStorageDescriptorTblURIRetVal |
class |
ObjectStore.UpdatePropURIRetVal |
class |
ObjectStore.UpdateSerdeURIRetVal |
RawStore.CanNotRetry| Constructor and Description |
|---|
ObjectStore() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addIndex(Index index) |
int |
addMasterKey(String key) |
void |
addNotificationEvent(NotificationEvent entry)
Add a notification entry.
|
boolean |
addPartition(Partition part) |
boolean |
addPartitions(String dbName,
String tblName,
List<Partition> parts) |
boolean |
addPartitions(String dbName,
String tblName,
PartitionSpecProxy partitionSpec,
boolean ifNotExists) |
boolean |
addRole(String roleName,
String ownerName) |
boolean |
addToken(String tokenId,
String delegationToken) |
boolean |
alterDatabase(String dbName,
Database db)
Alter the database object in metastore.
|
void |
alterFunction(String dbName,
String funcName,
Function newFunction)
Alter function based on new function specs.
|
void |
alterIndex(String dbname,
String baseTblName,
String name,
Index newIndex) |
void |
alterPartition(String dbname,
String name,
List<String> part_vals,
Partition newPart) |
void |
alterPartitions(String dbname,
String name,
List<List<String>> part_vals,
List<Partition> newParts) |
void |
alterTable(String dbname,
String name,
Table newTable) |
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 |
createDatabase(Database db) |
void |
createFunction(Function func)
Register a user-defined function based on the function specification passed in.
|
void |
createTable(Table tbl) |
boolean |
createType(Type type) |
boolean |
deletePartitionColumnStatistics(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.
|
boolean |
deleteTableColumnStatistics(String dbName,
String tableName,
String colName)
Deletes column statistics if present associated with a given db, table and col.
|
boolean |
doesPartitionExist(String dbName,
String tableName,
List<String> partVals) |
boolean |
dropDatabase(String dbname) |
void |
dropFunction(String dbName,
String funcName)
Drop a function definition.
|
boolean |
dropIndex(String dbName,
String origTableName,
String indexName) |
boolean |
dropPartition(String dbName,
String tableName,
List<String> part_vals) |
void |
dropPartitionAllColumnGrantsNoTxn(String dbName,
String tableName,
List<String> partNames) |
void |
dropPartitions(String dbName,
String tblName,
List<String> partNames) |
boolean |
dropTable(String dbName,
String tableName) |
boolean |
dropType(String typeName) |
Collection<?> |
executeJDOQLSelect(String query)
The following API
- executeJDOQLSelect
is used by HiveMetaTool.
|
long |
executeJDOQLUpdate(String query)
The following API
- executeJDOQLUpdate
is used by HiveMetaTool.
|
AggrStats |
get_aggr_stats_for(String dbName,
String tblName,
List<String> partNames,
List<String> colNames) |
List<String> |
getAllDatabases() |
List<String> |
getAllTables(String dbName) |
List<String> |
getAllTokenIdentifiers() |
PrincipalPrivilegeSet |
getColumnPrivilegeSet(String dbName,
String tableName,
String partitionName,
String columnName,
String userName,
List<String> groupNames) |
org.apache.hadoop.conf.Configuration |
getConf() |
CurrentNotificationEventId |
getCurrentNotificationEventId()
Get the last issued notification event id.
|
Database |
getDatabase(String name) |
Database |
getDatabaseInternal(String name) |
List<String> |
getDatabases(String pattern) |
List<PrivilegeGrantInfo> |
getDBPrivilege(String dbName,
String principalName,
PrincipalType principalType) |
PrincipalPrivilegeSet |
getDBPrivilegeSet(String dbName,
String userName,
List<String> groupNames) |
Function |
getFunction(String dbName,
String funcName)
Retrieve function by name.
|
List<String> |
getFunctions(String dbName,
String pattern)
Retrieve list of function names based on name pattern.
|
Index |
getIndex(String dbName,
String origTableName,
String indexName) |
List<Index> |
getIndexes(String dbName,
String origTableName,
int max) |
Database |
getJDODatabase(String name) |
String[] |
getMasterKeys() |
String |
getMetaStoreSchemaVersion() |
NotificationEventResponse |
getNextNotification(NotificationEventRequest rqst)
Get the next notification event.
|
Partition |
getPartition(String dbName,
String tableName,
List<String> part_vals) |
List<ColumnStatistics> |
getPartitionColumnStatistics(String dbName,
String tableName,
List<String> partNames,
List<String> colNames)
Returns the relevant column statistics for given columns in given partitions in a given
table in a given database if such statistics exist.
|
protected List<ColumnStatistics> |
getPartitionColumnStatisticsInternal(String dbName,
String tableName,
List<String> partNames,
List<String> colNames,
boolean allowSql,
boolean allowJdo) |
PrincipalPrivilegeSet |
getPartitionPrivilegeSet(String dbName,
String tableName,
String partition,
String userName,
List<String> groupNames) |
List<Partition> |
getPartitions(String dbName,
String tableName,
int maxParts) |
boolean |
getPartitionsByExpr(String dbName,
String tblName,
byte[] expr,
String defaultPartitionName,
short maxParts,
List<Partition> result) |
protected boolean |
getPartitionsByExprInternal(String dbName,
String tblName,
byte[] expr,
String defaultPartitionName,
short maxParts,
List<Partition> result,
boolean allowSql,
boolean allowJdo) |
List<Partition> |
getPartitionsByFilter(String dbName,
String tblName,
String filter,
short maxParts) |
protected List<Partition> |
getPartitionsByFilterInternal(String dbName,
String tblName,
String filter,
short maxParts,
boolean allowSql,
boolean allowJdo) |
List<Partition> |
getPartitionsByNames(String dbName,
String tblName,
List<String> partNames) |
protected List<Partition> |
getPartitionsByNamesInternal(String dbName,
String tblName,
List<String> partNames,
boolean allowSql,
boolean allowJdo) |
protected List<Partition> |
getPartitionsInternal(String dbName,
String tblName,
int maxParts,
boolean allowSql,
boolean allowJdo) |
List<Partition> |
getPartitionsWithAuth(String dbName,
String tblName,
short max,
String userName,
List<String> groupNames) |
Partition |
getPartitionWithAuth(String dbName,
String tblName,
List<String> partVals,
String user_name,
List<String> group_names) |
javax.jdo.PersistenceManager |
getPersistenceManager() |
Role |
getRole(String roleName) |
Table |
getTable(String dbName,
String tableName) |
ColumnStatistics |
getTableColumnStatistics(String dbName,
String tableName,
List<String> colNames)
Returns the relevant column statistics for a given column in a given table in a given database
if such statistics exist.
|
protected ColumnStatistics |
getTableColumnStatisticsInternal(String dbName,
String tableName,
List<String> colNames,
boolean allowSql,
boolean allowJdo) |
List<Table> |
getTableObjectsByName(String db,
List<String> tbl_names) |
PrincipalPrivilegeSet |
getTablePrivilegeSet(String dbName,
String tableName,
String userName,
List<String> groupNames) |
List<String> |
getTables(String dbName,
String pattern) |
String |
getToken(String tokenId) |
Type |
getType(String typeName) |
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 |
isPartitionMarkedForEvent(String dbName,
String tblName,
Map<String,String> partName,
PartitionEventType evtType) |
List<MTablePrivilege> |
listAllTableGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName) |
List<MTablePrivilege> |
listAllTableGrants(String dbName,
String tableName) |
List<HiveObjectPrivilege> |
listDBGrantsAll(String dbName) |
Set<String> |
listFSRoots()
The following API
- listFSRoots
is used by HiveMetaTool.
|
List<HiveObjectPrivilege> |
listGlobalGrantsAll() |
List<String> |
listIndexNames(String dbName,
String origTableName,
short max) |
List<MPartitionColumnPrivilege> |
listPartitionAllColumnGrants(String dbName,
String tableName,
List<String> partNames) |
List<HiveObjectPrivilege> |
listPartitionColumnGrantsAll(String dbName,
String tableName,
String partitionName,
String columnName) |
List<HiveObjectPrivilege> |
listPartitionGrantsAll(String dbName,
String tableName,
String partitionName) |
List<String> |
listPartitionNames(String dbName,
String tableName,
short max) |
List<String> |
listPartitionNamesByFilter(String dbName,
String tableName,
String filter,
short maxParts) |
List<String> |
listPartitionNamesPs(String dbName,
String tableName,
List<String> part_vals,
short max_parts)
Lists partition names that match a given partial specification
|
List<Partition> |
listPartitionsPsWithAuth(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.
|
List<MDBPrivilege> |
listPrincipalDBGrants(String principalName,
PrincipalType principalType,
String dbName) |
List<HiveObjectPrivilege> |
listPrincipalDBGrantsAll(String principalName,
PrincipalType principalType) |
List<MGlobalPrivilege> |
listPrincipalGlobalGrants(String principalName,
PrincipalType principalType) |
List<MPartitionColumnPrivilege> |
listPrincipalPartitionColumnGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName,
String partitionName,
String columnName) |
List<HiveObjectPrivilege> |
listPrincipalPartitionColumnGrantsAll(String principalName,
PrincipalType principalType) |
List<MPartitionPrivilege> |
listPrincipalPartitionGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName,
String partName) |
List<HiveObjectPrivilege> |
listPrincipalPartitionGrantsAll(String principalName,
PrincipalType principalType) |
List<MTableColumnPrivilege> |
listPrincipalTableColumnGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName,
String columnName) |
List<HiveObjectPrivilege> |
listPrincipalTableColumnGrantsAll(String principalName,
PrincipalType principalType) |
List<HiveObjectPrivilege> |
listPrincipalTableGrantsAll(String principalName,
PrincipalType principalType) |
List<MRoleMap> |
listRoleMembers(String roleName)
Get the role to principal grant mapping for given role
|
List<String> |
listRoleNames() |
List<MRoleMap> |
listRoles(String principalName,
PrincipalType principalType) |
List<MTableColumnPrivilege> |
listTableAllColumnGrants(String dbName,
String tableName) |
List<MPartitionColumnPrivilege> |
listTableAllPartitionColumnGrants(String dbName,
String tableName) |
List<MPartitionPrivilege> |
listTableAllPartitionGrants(String dbName,
String tableName) |
List<HiveObjectPrivilege> |
listTableColumnGrantsAll(String dbName,
String tableName,
String columnName) |
List<HiveObjectPrivilege> |
listTableGrantsAll(String dbName,
String tableName) |
List<String> |
listTableNamesByFilter(String dbName,
String filter,
short maxTables)
Gets a list of tables based on a filter string and filter type.
|
Table |
markPartitionForEvent(String dbName,
String tblName,
Map<String,String> partName,
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
|
boolean |
removeMasterKey(Integer id) |
boolean |
removeRole(String roleName) |
boolean |
removeToken(String tokenId) |
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 |
setConf(org.apache.hadoop.conf.Configuration conf)
Called whenever this object is instantiated using ReflectionUtils, and also
on connection retries.
|
void |
setMetaStoreSchemaVersion(String schemaVersion,
String comment) |
static void |
setSchemaVerified(boolean val) |
void |
shutdown() |
void |
updateMasterKey(Integer id,
String key) |
ObjectStore.UpdateMDatabaseURIRetVal |
updateMDatabaseURI(URI oldLoc,
URI newLoc,
boolean dryRun)
The following APIs
- updateMDatabaseURI
is used by HiveMetaTool.
|
ObjectStore.UpdatePropURIRetVal |
updateMStorageDescriptorTblPropURI(URI oldLoc,
URI newLoc,
String tblPropKey,
boolean isDryRun)
Deprecated.
|
ObjectStore.UpdateMStorageDescriptorTblURIRetVal |
updateMStorageDescriptorTblURI(URI oldLoc,
URI newLoc,
boolean isDryRun)
The following APIs
- updateMStorageDescriptorTblURI
is used by HiveMetaTool.
|
boolean |
updatePartitionColumnStatistics(ColumnStatistics colStats,
List<String> partVals)
Persists the given column statistics object to the metastore
|
ObjectStore.UpdateSerdeURIRetVal |
updateSerdeURI(URI oldLoc,
URI newLoc,
String serdeProp,
boolean isDryRun)
The following APIs
- updateSerdeURI
is used by HiveMetaTool.
|
boolean |
updateTableColumnStatistics(ColumnStatistics colStats)
Persists the given column statistics object to the metastore
|
ObjectStore.UpdatePropURIRetVal |
updateTblPropURI(URI oldLoc,
URI newLoc,
String tblPropKey,
boolean isDryRun)
The following APIs
- updateMStorageDescriptorTblPropURI
is used by HiveMetaTool.
|
void |
verifySchema() |
public org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurable@InterfaceAudience.LimitedPrivate(value="HCATALOG") @InterfaceStability.Evolving public javax.jdo.PersistenceManager getPersistenceManager()
public boolean openTransaction()
openTransaction in interface RawStorepublic boolean commitTransaction()
commitTransaction in interface RawStorepublic boolean isActiveTransaction()
public void rollbackTransaction()
rollbackTransaction in interface RawStorepublic void createDatabase(Database db) throws InvalidObjectException, MetaException
createDatabase in interface RawStoreInvalidObjectExceptionMetaExceptionpublic Database getDatabase(String name) throws NoSuchObjectException
getDatabase in interface RawStoreNoSuchObjectExceptionpublic Database getDatabaseInternal(String name) throws MetaException, NoSuchObjectException
MetaExceptionNoSuchObjectExceptionpublic Database getJDODatabase(String name) throws NoSuchObjectException
NoSuchObjectExceptionpublic boolean alterDatabase(String dbName, Database db) throws MetaException, NoSuchObjectException
alterDatabase in interface RawStoredbName - the database namedb - the Hive Database objectMetaExceptionNoSuchObjectExceptionpublic boolean dropDatabase(String dbname) throws NoSuchObjectException, MetaException
dropDatabase in interface RawStoreNoSuchObjectExceptionMetaExceptionpublic List<String> getDatabases(String pattern) throws MetaException
getDatabases in interface RawStoreMetaExceptionpublic List<String> getAllDatabases() throws MetaException
getAllDatabases in interface RawStoreMetaExceptionpublic boolean createType(Type type)
createType in interface RawStorepublic void createTable(Table tbl) throws InvalidObjectException, MetaException
createTable in interface RawStoreInvalidObjectExceptionMetaExceptionpublic boolean dropTable(String dbName, String tableName) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException
dropTable in interface RawStoreMetaExceptionNoSuchObjectExceptionInvalidObjectExceptionInvalidInputExceptionpublic Table getTable(String dbName, String tableName) throws MetaException
getTable in interface RawStoreMetaExceptionpublic List<String> getTables(String dbName, String pattern) throws MetaException
getTables in interface RawStoreMetaExceptionpublic List<String> getAllTables(String dbName) throws MetaException
getAllTables in interface RawStoreMetaExceptionpublic List<Table> getTableObjectsByName(String db, List<String> tbl_names) throws MetaException, UnknownDBException
getTableObjectsByName in interface RawStoredb - The name of the database from which to retrieve the tablestbl_names - The names of the tables to retrieve.MetaExceptionUnknownDBExceptionpublic boolean addPartitions(String dbName, String tblName, List<Partition> parts) throws InvalidObjectException, MetaException
addPartitions in interface RawStoreInvalidObjectExceptionMetaExceptionpublic boolean addPartitions(String dbName, String tblName, PartitionSpecProxy partitionSpec, boolean ifNotExists) throws InvalidObjectException, MetaException
addPartitions in interface RawStoreInvalidObjectExceptionMetaExceptionpublic boolean addPartition(Partition part) throws InvalidObjectException, MetaException
addPartition in interface RawStoreInvalidObjectExceptionMetaExceptionpublic Partition getPartition(String dbName, String tableName, List<String> part_vals) throws NoSuchObjectException, MetaException
getPartition in interface RawStoreNoSuchObjectExceptionMetaExceptionpublic boolean dropPartition(String dbName, String tableName, List<String> part_vals) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException
dropPartition in interface RawStoreMetaExceptionNoSuchObjectExceptionInvalidObjectExceptionInvalidInputExceptionpublic void dropPartitions(String dbName, String tblName, List<String> partNames) throws MetaException, NoSuchObjectException
dropPartitions in interface RawStoreMetaExceptionNoSuchObjectExceptionpublic List<Partition> getPartitions(String dbName, String tableName, int maxParts) throws MetaException, NoSuchObjectException
getPartitions in interface RawStoreMetaExceptionNoSuchObjectExceptionprotected List<Partition> getPartitionsInternal(String dbName, String tblName, int maxParts, boolean allowSql, boolean allowJdo) throws MetaException, NoSuchObjectException
MetaExceptionNoSuchObjectExceptionpublic List<Partition> getPartitionsWithAuth(String dbName, String tblName, short max, String userName, List<String> groupNames) throws MetaException, NoSuchObjectException, InvalidObjectException
getPartitionsWithAuth in interface RawStoreMetaExceptionNoSuchObjectExceptionInvalidObjectExceptionpublic Partition getPartitionWithAuth(String dbName, String tblName, List<String> partVals, String user_name, List<String> group_names) throws NoSuchObjectException, MetaException, InvalidObjectException
getPartitionWithAuth in interface RawStoreNoSuchObjectExceptionMetaExceptionInvalidObjectExceptionpublic List<String> listPartitionNames(String dbName, String tableName, short max) throws MetaException
listPartitionNames in interface RawStoreMetaExceptionpublic List<Partition> listPartitionsPsWithAuth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String userName, List<String> groupNames) throws MetaException, InvalidObjectException, NoSuchObjectException
RawStorelistPartitionsPsWithAuth in interface RawStoredb_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 privilegesMetaExceptionInvalidObjectExceptionNoSuchObjectExceptionpublic List<String> listPartitionNamesPs(String dbName, String tableName, List<String> part_vals, short max_parts) throws MetaException, NoSuchObjectException
RawStorelistPartitionNamesPs in interface RawStoredbName - The name of the database which has the partitionstableName - 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 returnMetaExceptionNoSuchObjectExceptionpublic List<Partition> getPartitionsByNames(String dbName, String tblName, List<String> partNames) throws MetaException, NoSuchObjectException
getPartitionsByNames in interface RawStoreMetaExceptionNoSuchObjectExceptionprotected List<Partition> getPartitionsByNamesInternal(String dbName, String tblName, List<String> partNames, boolean allowSql, boolean allowJdo) throws MetaException, NoSuchObjectException
MetaExceptionNoSuchObjectExceptionpublic boolean getPartitionsByExpr(String dbName, String tblName, byte[] expr, String defaultPartitionName, short maxParts, List<Partition> result) throws org.apache.thrift.TException
getPartitionsByExpr in interface RawStoreorg.apache.thrift.TExceptionprotected boolean getPartitionsByExprInternal(String dbName, String tblName, byte[] expr, String defaultPartitionName, short maxParts, List<Partition> result, boolean allowSql, boolean allowJdo) throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic List<Partition> getPartitionsByFilter(String dbName, String tblName, String filter, short maxParts) throws MetaException, NoSuchObjectException
getPartitionsByFilter in interface RawStoreMetaExceptionNoSuchObjectExceptionprotected List<Partition> getPartitionsByFilterInternal(String dbName, String tblName, String filter, short maxParts, boolean allowSql, boolean allowJdo) throws MetaException, NoSuchObjectException
MetaExceptionNoSuchObjectExceptionpublic List<String> listTableNamesByFilter(String dbName, String filter, short maxTables) throws MetaException
RawStorelistTableNamesByFilter in interface RawStoredbName - The name of the database from which you will retrieve the table namesfilter - The filter stringmaxTables - The maximum number of tables returnedMetaExceptionpublic List<String> listPartitionNamesByFilter(String dbName, String tableName, String filter, short maxParts) throws MetaException
listPartitionNamesByFilter in interface RawStoreMetaExceptionpublic void alterTable(String dbname, String name, Table newTable) throws InvalidObjectException, MetaException
alterTable in interface RawStoreInvalidObjectExceptionMetaExceptionpublic void alterIndex(String dbname, String baseTblName, String name, Index newIndex) throws InvalidObjectException, MetaException
alterIndex in interface RawStoreInvalidObjectExceptionMetaExceptionpublic void alterPartition(String dbname, String name, List<String> part_vals, Partition newPart) throws InvalidObjectException, MetaException
alterPartition in interface RawStoreInvalidObjectExceptionMetaExceptionpublic void alterPartitions(String dbname, String name, List<List<String>> part_vals, List<Partition> newParts) throws InvalidObjectException, MetaException
alterPartitions in interface RawStoreInvalidObjectExceptionMetaExceptionpublic boolean addIndex(Index index) throws InvalidObjectException, MetaException
addIndex in interface RawStoreInvalidObjectExceptionMetaExceptionpublic boolean dropIndex(String dbName, String origTableName, String indexName) throws MetaException
dropIndex in interface RawStoreMetaExceptionpublic Index getIndex(String dbName, String origTableName, String indexName) throws MetaException
getIndex in interface RawStoreMetaExceptionpublic List<Index> getIndexes(String dbName, String origTableName, int max) throws MetaException
getIndexes in interface RawStoreMetaExceptionpublic List<String> listIndexNames(String dbName, String origTableName, short max) throws MetaException
listIndexNames in interface RawStoreMetaExceptionpublic boolean addRole(String roleName, String ownerName) throws InvalidObjectException, MetaException, NoSuchObjectException
addRole in interface RawStoreInvalidObjectExceptionMetaExceptionNoSuchObjectExceptionpublic boolean grantRole(Role role, String userName, PrincipalType principalType, String grantor, PrincipalType grantorType, boolean grantOption) throws MetaException, NoSuchObjectException, InvalidObjectException
grantRole in interface RawStoreMetaExceptionNoSuchObjectExceptionInvalidObjectExceptionpublic boolean revokeRole(Role role, String userName, PrincipalType principalType, boolean grantOption) throws MetaException, NoSuchObjectException
revokeRole in interface RawStoreMetaExceptionNoSuchObjectExceptionpublic boolean removeRole(String roleName) throws MetaException, NoSuchObjectException
removeRole in interface RawStoreMetaExceptionNoSuchObjectExceptionpublic List<MRoleMap> listRoles(String principalName, PrincipalType principalType)
public Role getRole(String roleName) throws NoSuchObjectException
getRole in interface RawStoreNoSuchObjectExceptionpublic List<String> listRoleNames()
listRoleNames in interface RawStorepublic PrincipalPrivilegeSet getUserPrivilegeSet(String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getUserPrivilegeSet in interface RawStoreInvalidObjectExceptionMetaExceptionpublic List<PrivilegeGrantInfo> getDBPrivilege(String dbName, String principalName, PrincipalType principalType) throws InvalidObjectException, MetaException
InvalidObjectExceptionMetaExceptionpublic PrincipalPrivilegeSet getDBPrivilegeSet(String dbName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getDBPrivilegeSet in interface RawStoreInvalidObjectExceptionMetaExceptionpublic PrincipalPrivilegeSet getPartitionPrivilegeSet(String dbName, String tableName, String partition, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getPartitionPrivilegeSet in interface RawStoreInvalidObjectExceptionMetaExceptionpublic PrincipalPrivilegeSet getTablePrivilegeSet(String dbName, String tableName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getTablePrivilegeSet in interface RawStoreInvalidObjectExceptionMetaExceptionpublic PrincipalPrivilegeSet getColumnPrivilegeSet(String dbName, String tableName, String partitionName, String columnName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getColumnPrivilegeSet in interface RawStoreInvalidObjectExceptionMetaExceptionpublic boolean grantPrivileges(PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException
grantPrivileges in interface RawStoreInvalidObjectExceptionMetaExceptionNoSuchObjectExceptionpublic boolean revokePrivileges(PrivilegeBag privileges, boolean grantOption) throws InvalidObjectException, MetaException, NoSuchObjectException
revokePrivileges in interface RawStoreInvalidObjectExceptionMetaExceptionNoSuchObjectExceptionpublic List<MRoleMap> listRoleMembers(String roleName)
RawStorelistRoleMembers in interface RawStorepublic List<MGlobalPrivilege> listPrincipalGlobalGrants(String principalName, PrincipalType principalType)
listPrincipalGlobalGrants in interface RawStorepublic List<HiveObjectPrivilege> listGlobalGrantsAll()
listGlobalGrantsAll in interface RawStorepublic List<MDBPrivilege> listPrincipalDBGrants(String principalName, PrincipalType principalType, String dbName)
listPrincipalDBGrants in interface RawStorepublic List<HiveObjectPrivilege> listPrincipalDBGrantsAll(String principalName, PrincipalType principalType)
listPrincipalDBGrantsAll in interface RawStorepublic List<HiveObjectPrivilege> listDBGrantsAll(String dbName)
listDBGrantsAll in interface RawStorepublic List<MTablePrivilege> listAllTableGrants(String dbName, String tableName)
public List<MPartitionPrivilege> listTableAllPartitionGrants(String dbName, String tableName)
public List<MTableColumnPrivilege> listTableAllColumnGrants(String dbName, String tableName)
public List<MPartitionColumnPrivilege> listTableAllPartitionColumnGrants(String dbName, String tableName)
public List<MPartitionColumnPrivilege> listPartitionAllColumnGrants(String dbName, String tableName, List<String> partNames)
public void dropPartitionAllColumnGrantsNoTxn(String dbName, String tableName, List<String> partNames)
public List<MTablePrivilege> listAllTableGrants(String principalName, PrincipalType principalType, String dbName, String tableName)
listAllTableGrants in interface RawStorepublic List<MPartitionPrivilege> listPrincipalPartitionGrants(String principalName, PrincipalType principalType, String dbName, String tableName, String partName)
listPrincipalPartitionGrants in interface RawStorepublic List<MTableColumnPrivilege> listPrincipalTableColumnGrants(String principalName, PrincipalType principalType, String dbName, String tableName, String columnName)
listPrincipalTableColumnGrants in interface RawStorepublic List<MPartitionColumnPrivilege> listPrincipalPartitionColumnGrants(String principalName, PrincipalType principalType, String dbName, String tableName, String partitionName, String columnName)
listPrincipalPartitionColumnGrants in interface RawStorepublic List<HiveObjectPrivilege> listPrincipalPartitionColumnGrantsAll(String principalName, PrincipalType principalType)
listPrincipalPartitionColumnGrantsAll in interface RawStorepublic List<HiveObjectPrivilege> listPartitionColumnGrantsAll(String dbName, String tableName, String partitionName, String columnName)
listPartitionColumnGrantsAll in interface RawStorepublic List<HiveObjectPrivilege> listPrincipalTableGrantsAll(String principalName, PrincipalType principalType)
listPrincipalTableGrantsAll in interface RawStorepublic List<HiveObjectPrivilege> listTableGrantsAll(String dbName, String tableName)
listTableGrantsAll in interface RawStorepublic List<HiveObjectPrivilege> listPrincipalPartitionGrantsAll(String principalName, PrincipalType principalType)
listPrincipalPartitionGrantsAll in interface RawStorepublic List<HiveObjectPrivilege> listPartitionGrantsAll(String dbName, String tableName, String partitionName)
listPartitionGrantsAll in interface RawStorepublic List<HiveObjectPrivilege> listPrincipalTableColumnGrantsAll(String principalName, PrincipalType principalType)
listPrincipalTableColumnGrantsAll in interface RawStorepublic List<HiveObjectPrivilege> listTableColumnGrantsAll(String dbName, String tableName, String columnName)
listTableColumnGrantsAll in interface RawStorepublic boolean isPartitionMarkedForEvent(String dbName, String tblName, Map<String,String> partName, PartitionEventType evtType) throws UnknownTableException, MetaException, InvalidPartitionException, UnknownPartitionException
isPartitionMarkedForEvent in interface RawStoreUnknownTableExceptionMetaExceptionInvalidPartitionExceptionUnknownPartitionExceptionpublic Table markPartitionForEvent(String dbName, String tblName, Map<String,String> partName, PartitionEventType evtType) throws MetaException, UnknownTableException, InvalidPartitionException, UnknownPartitionException
markPartitionForEvent in interface RawStoreMetaExceptionUnknownTableExceptionInvalidPartitionExceptionUnknownPartitionExceptionpublic Collection<?> executeJDOQLSelect(String query)
public long executeJDOQLUpdate(String query)
public Set<String> listFSRoots()
public ObjectStore.UpdateMDatabaseURIRetVal updateMDatabaseURI(URI oldLoc, URI newLoc, boolean dryRun)
public ObjectStore.UpdatePropURIRetVal updateTblPropURI(URI oldLoc, URI newLoc, String tblPropKey, boolean isDryRun)
@Deprecated public ObjectStore.UpdatePropURIRetVal updateMStorageDescriptorTblPropURI(URI oldLoc, URI newLoc, String tblPropKey, boolean isDryRun)
public ObjectStore.UpdateMStorageDescriptorTblURIRetVal updateMStorageDescriptorTblURI(URI oldLoc, URI newLoc, boolean isDryRun)
public ObjectStore.UpdateSerdeURIRetVal updateSerdeURI(URI oldLoc, URI newLoc, String serdeProp, boolean isDryRun)
public boolean updateTableColumnStatistics(ColumnStatistics colStats) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
RawStoreupdateTableColumnStatistics in interface RawStoreNoSuchObjectExceptionMetaExceptionInvalidObjectExceptionInvalidInputExceptionpublic boolean updatePartitionColumnStatistics(ColumnStatistics colStats, List<String> partVals) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
RawStoreupdatePartitionColumnStatistics in interface RawStoreNoSuchObjectExceptionMetaExceptionInvalidObjectExceptionInvalidInputExceptionpublic ColumnStatistics getTableColumnStatistics(String dbName, String tableName, List<String> colNames) throws MetaException, NoSuchObjectException
RawStoregetTableColumnStatistics in interface RawStoreMetaExceptionNoSuchObjectExceptionprotected ColumnStatistics getTableColumnStatisticsInternal(String dbName, String tableName, List<String> colNames, boolean allowSql, boolean allowJdo) throws MetaException, NoSuchObjectException
MetaExceptionNoSuchObjectExceptionpublic List<ColumnStatistics> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNames, List<String> colNames) throws MetaException, NoSuchObjectException
RawStoregetPartitionColumnStatistics in interface RawStoreMetaExceptionNoSuchObjectExceptionprotected List<ColumnStatistics> getPartitionColumnStatisticsInternal(String dbName, String tableName, List<String> partNames, List<String> colNames, boolean allowSql, boolean allowJdo) throws MetaException, NoSuchObjectException
MetaExceptionNoSuchObjectExceptionpublic AggrStats get_aggr_stats_for(String dbName, String tblName, List<String> partNames, List<String> colNames) throws MetaException, NoSuchObjectException
get_aggr_stats_for in interface RawStoreMetaExceptionNoSuchObjectExceptionpublic boolean deletePartitionColumnStatistics(String dbName, String tableName, String partName, List<String> partVals, String colName) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
RawStoredeletePartitionColumnStatistics in interface RawStoreNoSuchObjectExceptionMetaExceptionInvalidObjectExceptionInvalidInputExceptionpublic boolean deleteTableColumnStatistics(String dbName, String tableName, String colName) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
RawStoredeleteTableColumnStatistics in interface RawStoreNoSuchObjectExceptionMetaExceptionInvalidObjectExceptionInvalidInputExceptionpublic long cleanupEvents()
cleanupEvents in interface RawStorepublic boolean removeToken(String tokenId)
removeToken in interface RawStorepublic List<String> getAllTokenIdentifiers()
getAllTokenIdentifiers in interface RawStorepublic int addMasterKey(String key) throws MetaException
addMasterKey in interface RawStoreMetaExceptionpublic void updateMasterKey(Integer id, String key) throws NoSuchObjectException, MetaException
updateMasterKey in interface RawStoreNoSuchObjectExceptionMetaExceptionpublic boolean removeMasterKey(Integer id)
removeMasterKey in interface RawStorepublic String[] getMasterKeys()
getMasterKeys in interface RawStorepublic void verifySchema()
throws MetaException
verifySchema in interface RawStoreMetaExceptionpublic static void setSchemaVerified(boolean val)
public String getMetaStoreSchemaVersion() throws MetaException
getMetaStoreSchemaVersion in interface RawStoreMetaExceptionpublic void setMetaStoreSchemaVersion(String schemaVersion, String comment) throws MetaException
setMetaStoreSchemaVersion in interface RawStoreMetaExceptionpublic boolean doesPartitionExist(String dbName, String tableName, List<String> partVals) throws MetaException
doesPartitionExist in interface RawStoreMetaExceptionpublic void createFunction(Function func) throws InvalidObjectException, MetaException
RawStorecreateFunction in interface RawStoreInvalidObjectExceptionMetaExceptionpublic void alterFunction(String dbName, String funcName, Function newFunction) throws InvalidObjectException, MetaException
RawStorealterFunction in interface RawStoreInvalidObjectExceptionMetaExceptionpublic void dropFunction(String dbName, String funcName) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException
RawStoredropFunction in interface RawStoreMetaExceptionNoSuchObjectExceptionInvalidObjectExceptionInvalidInputExceptionpublic Function getFunction(String dbName, String funcName) throws MetaException
RawStoregetFunction in interface RawStoreMetaExceptionpublic List<String> getFunctions(String dbName, String pattern) throws MetaException
RawStoregetFunctions in interface RawStoreMetaExceptionpublic NotificationEventResponse getNextNotification(NotificationEventRequest rqst)
RawStoregetNextNotification in interface RawStorerqst - Request containing information on the last processed notification.public void addNotificationEvent(NotificationEvent entry)
RawStoreaddNotificationEvent in interface RawStoreentry - the notification to addpublic void cleanNotificationEvents(int olderThan)
RawStorecleanNotificationEvents in interface RawStoreolderThan - Remove any events older than a given number of secondspublic CurrentNotificationEventId getCurrentNotificationEventId()
RawStoregetCurrentNotificationEventId in interface RawStoreCopyright © 2017 The Apache Software Foundation. All rights reserved.