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.Configurable
public 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 RawStore
public boolean commitTransaction()
commitTransaction
in interface RawStore
public boolean isActiveTransaction()
public void rollbackTransaction()
rollbackTransaction
in interface RawStore
public void createDatabase(Database db) throws InvalidObjectException, MetaException
createDatabase
in interface RawStore
InvalidObjectException
MetaException
public Database getDatabase(String name) throws NoSuchObjectException
getDatabase
in interface RawStore
NoSuchObjectException
public Database getDatabaseInternal(String name) throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
public Database getJDODatabase(String name) throws NoSuchObjectException
NoSuchObjectException
public boolean alterDatabase(String dbName, Database db) throws MetaException, NoSuchObjectException
alterDatabase
in interface RawStore
dbName
- the database namedb
- the Hive Database objectMetaException
NoSuchObjectException
public boolean dropDatabase(String dbname) throws NoSuchObjectException, MetaException
dropDatabase
in interface RawStore
NoSuchObjectException
MetaException
public List<String> getDatabases(String pattern) throws MetaException
getDatabases
in interface RawStore
MetaException
public List<String> getAllDatabases() throws MetaException
getAllDatabases
in interface RawStore
MetaException
public boolean createType(Type type)
createType
in interface RawStore
public void createTable(Table tbl) throws InvalidObjectException, MetaException
createTable
in interface RawStore
InvalidObjectException
MetaException
public boolean dropTable(String dbName, String tableName) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException
dropTable
in interface RawStore
MetaException
NoSuchObjectException
InvalidObjectException
InvalidInputException
public Table getTable(String dbName, String tableName) throws MetaException
getTable
in interface RawStore
MetaException
public List<String> getTables(String dbName, String pattern) throws MetaException
getTables
in interface RawStore
MetaException
public List<String> getAllTables(String dbName) throws MetaException
getAllTables
in interface RawStore
MetaException
public List<Table> getTableObjectsByName(String db, List<String> tbl_names) throws MetaException, UnknownDBException
getTableObjectsByName
in interface RawStore
db
- The name of the database from which to retrieve the tablestbl_names
- The names of the tables to retrieve.MetaException
UnknownDBException
public boolean addPartitions(String dbName, String tblName, List<Partition> parts) throws InvalidObjectException, MetaException
addPartitions
in interface RawStore
InvalidObjectException
MetaException
public boolean addPartitions(String dbName, String tblName, PartitionSpecProxy partitionSpec, boolean ifNotExists) throws InvalidObjectException, MetaException
addPartitions
in interface RawStore
InvalidObjectException
MetaException
public boolean addPartition(Partition part) throws InvalidObjectException, MetaException
addPartition
in interface RawStore
InvalidObjectException
MetaException
public Partition getPartition(String dbName, String tableName, List<String> part_vals) throws NoSuchObjectException, MetaException
getPartition
in interface RawStore
NoSuchObjectException
MetaException
public boolean dropPartition(String dbName, String tableName, List<String> part_vals) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException
dropPartition
in interface RawStore
MetaException
NoSuchObjectException
InvalidObjectException
InvalidInputException
public void dropPartitions(String dbName, String tblName, List<String> partNames) throws MetaException, NoSuchObjectException
dropPartitions
in interface RawStore
MetaException
NoSuchObjectException
public List<Partition> getPartitions(String dbName, String tableName, int maxParts) throws MetaException, NoSuchObjectException
getPartitions
in interface RawStore
MetaException
NoSuchObjectException
protected List<Partition> getPartitionsInternal(String dbName, String tblName, int maxParts, boolean allowSql, boolean allowJdo) throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
public List<Partition> getPartitionsWithAuth(String dbName, String tblName, short max, String userName, List<String> groupNames) throws MetaException, NoSuchObjectException, InvalidObjectException
getPartitionsWithAuth
in interface RawStore
MetaException
NoSuchObjectException
InvalidObjectException
public Partition getPartitionWithAuth(String dbName, String tblName, List<String> partVals, String user_name, List<String> group_names) throws NoSuchObjectException, MetaException, InvalidObjectException
getPartitionWithAuth
in interface RawStore
NoSuchObjectException
MetaException
InvalidObjectException
public List<String> listPartitionNames(String dbName, String tableName, short max) throws MetaException
listPartitionNames
in interface RawStore
MetaException
public 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
RawStore
listPartitionsPsWithAuth
in interface RawStore
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
InvalidObjectException
NoSuchObjectException
public List<String> listPartitionNamesPs(String dbName, String tableName, List<String> part_vals, short max_parts) throws MetaException, NoSuchObjectException
RawStore
listPartitionNamesPs
in interface RawStore
dbName
- 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 returnMetaException
NoSuchObjectException
public List<Partition> getPartitionsByNames(String dbName, String tblName, List<String> partNames) throws MetaException, NoSuchObjectException
getPartitionsByNames
in interface RawStore
MetaException
NoSuchObjectException
protected List<Partition> getPartitionsByNamesInternal(String dbName, String tblName, List<String> partNames, boolean allowSql, boolean allowJdo) throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
public boolean getPartitionsByExpr(String dbName, String tblName, byte[] expr, String defaultPartitionName, short maxParts, List<Partition> result) throws org.apache.thrift.TException
getPartitionsByExpr
in interface RawStore
org.apache.thrift.TException
protected 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.TException
public List<Partition> getPartitionsByFilter(String dbName, String tblName, String filter, short maxParts) throws MetaException, NoSuchObjectException
getPartitionsByFilter
in interface RawStore
MetaException
NoSuchObjectException
protected List<Partition> getPartitionsByFilterInternal(String dbName, String tblName, String filter, short maxParts, boolean allowSql, boolean allowJdo) throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
public List<String> listTableNamesByFilter(String dbName, String filter, short maxTables) throws MetaException
RawStore
listTableNamesByFilter
in interface RawStore
dbName
- The name of the database from which you will retrieve the table namesfilter
- The filter stringmaxTables
- The maximum number of tables returnedMetaException
public List<String> listPartitionNamesByFilter(String dbName, String tableName, String filter, short maxParts) throws MetaException
listPartitionNamesByFilter
in interface RawStore
MetaException
public void alterTable(String dbname, String name, Table newTable) throws InvalidObjectException, MetaException
alterTable
in interface RawStore
InvalidObjectException
MetaException
public void alterIndex(String dbname, String baseTblName, String name, Index newIndex) throws InvalidObjectException, MetaException
alterIndex
in interface RawStore
InvalidObjectException
MetaException
public void alterPartition(String dbname, String name, List<String> part_vals, Partition newPart) throws InvalidObjectException, MetaException
alterPartition
in interface RawStore
InvalidObjectException
MetaException
public void alterPartitions(String dbname, String name, List<List<String>> part_vals, List<Partition> newParts) throws InvalidObjectException, MetaException
alterPartitions
in interface RawStore
InvalidObjectException
MetaException
public boolean addIndex(Index index) throws InvalidObjectException, MetaException
addIndex
in interface RawStore
InvalidObjectException
MetaException
public boolean dropIndex(String dbName, String origTableName, String indexName) throws MetaException
dropIndex
in interface RawStore
MetaException
public Index getIndex(String dbName, String origTableName, String indexName) throws MetaException
getIndex
in interface RawStore
MetaException
public List<Index> getIndexes(String dbName, String origTableName, int max) throws MetaException
getIndexes
in interface RawStore
MetaException
public List<String> listIndexNames(String dbName, String origTableName, short max) throws MetaException
listIndexNames
in interface RawStore
MetaException
public boolean addRole(String roleName, String ownerName) throws InvalidObjectException, MetaException, NoSuchObjectException
addRole
in interface RawStore
InvalidObjectException
MetaException
NoSuchObjectException
public boolean grantRole(Role role, String userName, PrincipalType principalType, String grantor, PrincipalType grantorType, boolean grantOption) throws MetaException, NoSuchObjectException, InvalidObjectException
grantRole
in interface RawStore
MetaException
NoSuchObjectException
InvalidObjectException
public boolean revokeRole(Role role, String userName, PrincipalType principalType, boolean grantOption) throws MetaException, NoSuchObjectException
revokeRole
in interface RawStore
MetaException
NoSuchObjectException
public boolean removeRole(String roleName) throws MetaException, NoSuchObjectException
removeRole
in interface RawStore
MetaException
NoSuchObjectException
public List<MRoleMap> listRoles(String principalName, PrincipalType principalType)
public Role getRole(String roleName) throws NoSuchObjectException
getRole
in interface RawStore
NoSuchObjectException
public List<String> listRoleNames()
listRoleNames
in interface RawStore
public PrincipalPrivilegeSet getUserPrivilegeSet(String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getUserPrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public List<PrivilegeGrantInfo> getDBPrivilege(String dbName, String principalName, PrincipalType principalType) throws InvalidObjectException, MetaException
InvalidObjectException
MetaException
public PrincipalPrivilegeSet getDBPrivilegeSet(String dbName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getDBPrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public PrincipalPrivilegeSet getPartitionPrivilegeSet(String dbName, String tableName, String partition, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getPartitionPrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public PrincipalPrivilegeSet getTablePrivilegeSet(String dbName, String tableName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getTablePrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public PrincipalPrivilegeSet getColumnPrivilegeSet(String dbName, String tableName, String partitionName, String columnName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getColumnPrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public boolean grantPrivileges(PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException
grantPrivileges
in interface RawStore
InvalidObjectException
MetaException
NoSuchObjectException
public boolean revokePrivileges(PrivilegeBag privileges, boolean grantOption) throws InvalidObjectException, MetaException, NoSuchObjectException
revokePrivileges
in interface RawStore
InvalidObjectException
MetaException
NoSuchObjectException
public List<MRoleMap> listRoleMembers(String roleName)
RawStore
listRoleMembers
in interface RawStore
public List<MGlobalPrivilege> listPrincipalGlobalGrants(String principalName, PrincipalType principalType)
listPrincipalGlobalGrants
in interface RawStore
public List<HiveObjectPrivilege> listGlobalGrantsAll()
listGlobalGrantsAll
in interface RawStore
public List<MDBPrivilege> listPrincipalDBGrants(String principalName, PrincipalType principalType, String dbName)
listPrincipalDBGrants
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalDBGrantsAll(String principalName, PrincipalType principalType)
listPrincipalDBGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listDBGrantsAll(String dbName)
listDBGrantsAll
in interface RawStore
public 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 RawStore
public List<MPartitionPrivilege> listPrincipalPartitionGrants(String principalName, PrincipalType principalType, String dbName, String tableName, String partName)
listPrincipalPartitionGrants
in interface RawStore
public List<MTableColumnPrivilege> listPrincipalTableColumnGrants(String principalName, PrincipalType principalType, String dbName, String tableName, String columnName)
listPrincipalTableColumnGrants
in interface RawStore
public List<MPartitionColumnPrivilege> listPrincipalPartitionColumnGrants(String principalName, PrincipalType principalType, String dbName, String tableName, String partitionName, String columnName)
listPrincipalPartitionColumnGrants
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalPartitionColumnGrantsAll(String principalName, PrincipalType principalType)
listPrincipalPartitionColumnGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPartitionColumnGrantsAll(String dbName, String tableName, String partitionName, String columnName)
listPartitionColumnGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalTableGrantsAll(String principalName, PrincipalType principalType)
listPrincipalTableGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listTableGrantsAll(String dbName, String tableName)
listTableGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalPartitionGrantsAll(String principalName, PrincipalType principalType)
listPrincipalPartitionGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPartitionGrantsAll(String dbName, String tableName, String partitionName)
listPartitionGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalTableColumnGrantsAll(String principalName, PrincipalType principalType)
listPrincipalTableColumnGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listTableColumnGrantsAll(String dbName, String tableName, String columnName)
listTableColumnGrantsAll
in interface RawStore
public boolean isPartitionMarkedForEvent(String dbName, String tblName, Map<String,String> partName, PartitionEventType evtType) throws UnknownTableException, MetaException, InvalidPartitionException, UnknownPartitionException
isPartitionMarkedForEvent
in interface RawStore
UnknownTableException
MetaException
InvalidPartitionException
UnknownPartitionException
public Table markPartitionForEvent(String dbName, String tblName, Map<String,String> partName, PartitionEventType evtType) throws MetaException, UnknownTableException, InvalidPartitionException, UnknownPartitionException
markPartitionForEvent
in interface RawStore
MetaException
UnknownTableException
InvalidPartitionException
UnknownPartitionException
public 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
RawStore
updateTableColumnStatistics
in interface RawStore
NoSuchObjectException
MetaException
InvalidObjectException
InvalidInputException
public boolean updatePartitionColumnStatistics(ColumnStatistics colStats, List<String> partVals) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
RawStore
updatePartitionColumnStatistics
in interface RawStore
NoSuchObjectException
MetaException
InvalidObjectException
InvalidInputException
public ColumnStatistics getTableColumnStatistics(String dbName, String tableName, List<String> colNames) throws MetaException, NoSuchObjectException
RawStore
getTableColumnStatistics
in interface RawStore
MetaException
NoSuchObjectException
protected ColumnStatistics getTableColumnStatisticsInternal(String dbName, String tableName, List<String> colNames, boolean allowSql, boolean allowJdo) throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
public List<ColumnStatistics> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNames, List<String> colNames) throws MetaException, NoSuchObjectException
RawStore
getPartitionColumnStatistics
in interface RawStore
MetaException
NoSuchObjectException
protected List<ColumnStatistics> getPartitionColumnStatisticsInternal(String dbName, String tableName, List<String> partNames, List<String> colNames, boolean allowSql, boolean allowJdo) throws MetaException, NoSuchObjectException
MetaException
NoSuchObjectException
public AggrStats get_aggr_stats_for(String dbName, String tblName, List<String> partNames, List<String> colNames) throws MetaException, NoSuchObjectException
get_aggr_stats_for
in interface RawStore
MetaException
NoSuchObjectException
public boolean deletePartitionColumnStatistics(String dbName, String tableName, String partName, List<String> partVals, String colName) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
RawStore
deletePartitionColumnStatistics
in interface RawStore
NoSuchObjectException
MetaException
InvalidObjectException
InvalidInputException
public boolean deleteTableColumnStatistics(String dbName, String tableName, String colName) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
RawStore
deleteTableColumnStatistics
in interface RawStore
NoSuchObjectException
MetaException
InvalidObjectException
InvalidInputException
public long cleanupEvents()
cleanupEvents
in interface RawStore
public boolean removeToken(String tokenId)
removeToken
in interface RawStore
public List<String> getAllTokenIdentifiers()
getAllTokenIdentifiers
in interface RawStore
public int addMasterKey(String key) throws MetaException
addMasterKey
in interface RawStore
MetaException
public void updateMasterKey(Integer id, String key) throws NoSuchObjectException, MetaException
updateMasterKey
in interface RawStore
NoSuchObjectException
MetaException
public boolean removeMasterKey(Integer id)
removeMasterKey
in interface RawStore
public String[] getMasterKeys()
getMasterKeys
in interface RawStore
public void verifySchema() throws MetaException
verifySchema
in interface RawStore
MetaException
public static void setSchemaVerified(boolean val)
public String getMetaStoreSchemaVersion() throws MetaException
getMetaStoreSchemaVersion
in interface RawStore
MetaException
public void setMetaStoreSchemaVersion(String schemaVersion, String comment) throws MetaException
setMetaStoreSchemaVersion
in interface RawStore
MetaException
public boolean doesPartitionExist(String dbName, String tableName, List<String> partVals) throws MetaException
doesPartitionExist
in interface RawStore
MetaException
public void createFunction(Function func) throws InvalidObjectException, MetaException
RawStore
createFunction
in interface RawStore
InvalidObjectException
MetaException
public void alterFunction(String dbName, String funcName, Function newFunction) throws InvalidObjectException, MetaException
RawStore
alterFunction
in interface RawStore
InvalidObjectException
MetaException
public void dropFunction(String dbName, String funcName) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException
RawStore
dropFunction
in interface RawStore
MetaException
NoSuchObjectException
InvalidObjectException
InvalidInputException
public Function getFunction(String dbName, String funcName) throws MetaException
RawStore
getFunction
in interface RawStore
MetaException
public List<String> getFunctions(String dbName, String pattern) throws MetaException
RawStore
getFunctions
in interface RawStore
MetaException
public NotificationEventResponse getNextNotification(NotificationEventRequest rqst)
RawStore
getNextNotification
in interface RawStore
rqst
- Request containing information on the last processed notification.public void addNotificationEvent(NotificationEvent entry)
RawStore
addNotificationEvent
in interface RawStore
entry
- the notification to addpublic void cleanNotificationEvents(int olderThan)
RawStore
cleanNotificationEvents
in interface RawStore
olderThan
- Remove any events older than a given number of secondspublic CurrentNotificationEventId getCurrentNotificationEventId()
RawStore
getCurrentNotificationEventId
in interface RawStore
Copyright © 2017 The Apache Software Foundation. All rights reserved.