RawStore.CanNotRetry
Constructor and Description |
---|
HBaseStore() |
Modifier and Type | Method and Description |
---|---|
void |
addForeignKeys(List<SQLForeignKey> fks) |
boolean |
addIndex(Index index) |
int |
addMasterKey(String key) |
void |
addNotificationEvent(NotificationEvent event)
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) |
void |
addPrimaryKeys(List<SQLPrimaryKey> pks) |
boolean |
addRole(String roleName,
String ownerName) |
boolean |
addToken(String tokenIdentifier,
String delegationToken) |
boolean |
alterDatabase(String dbname,
Database db) |
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 db_name,
String tbl_name,
List<String> part_vals,
Partition new_part) |
void |
alterPartitions(String db_name,
String tbl_name,
List<List<String>> part_vals_list,
List<Partition> new_parts) |
void |
alterTable(String dbName,
String tableName,
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) |
void |
createTableWithConstraints(Table tbl,
List<SQLPrimaryKey> primaryKeys,
List<SQLForeignKey> foreignKeys) |
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> part_vals) |
void |
dropConstraint(String dbName,
String tableName,
String constraintName) |
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 |
dropPartitions(String dbName,
String tblName,
List<String> partNames) |
boolean |
dropTable(String dbName,
String tableName) |
boolean |
dropType(String typeName) |
void |
flushCache() |
AggrStats |
get_aggr_stats_for(String dbName,
String tblName,
List<String> partNames,
List<String> colNames)
Return aggregated statistics for each column in the colNames list aggregated over partitions in
the partNames list
|
List<String> |
getAllDatabases() |
List<Function> |
getAllFunctions()
Retrieve all functions.
|
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) |
int |
getDatabaseCount()
Gets total number of databases.
|
List<String> |
getDatabases(String pattern) |
PrincipalPrivilegeSet |
getDBPrivilegeSet(String dbName,
String userName,
List<String> groupNames) |
ByteBuffer[] |
getFileMetadata(List<Long> fileIds) |
void |
getFileMetadataByExpr(List<Long> fileIds,
FileMetadataExprType type,
byte[] expr,
ByteBuffer[] metadatas,
ByteBuffer[] results,
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 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 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) |
String[] |
getMasterKeys() |
String |
getMetaStoreSchemaVersion() |
NotificationEventResponse |
getNextNotification(NotificationEventRequest rqst)
Get the next notification event.
|
int |
getNumPartitionsByExpr(String dbName,
String tblName,
byte[] expr) |
int |
getNumPartitionsByFilter(String dbName,
String tblName,
String filter) |
Partition |
getPartition(String dbName,
String tableName,
List<String> part_vals) |
List<ColumnStatistics> |
getPartitionColumnStatistics(String dbName,
String tblName,
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.
|
int |
getPartitionCount()
Gets total number of partitions.
|
PrincipalPrivilegeSet |
getPartitionPrivilegeSet(String dbName,
String tableName,
String partition,
String userName,
List<String> groupNames) |
List<Partition> |
getPartitions(String dbName,
String tableName,
int max) |
boolean |
getPartitionsByExpr(String dbName,
String tblName,
byte[] expr,
String defaultPartitionName,
short maxParts,
List<Partition> result) |
List<Partition> |
getPartitionsByFilter(String dbName,
String tblName,
String filter,
short maxParts) |
List<Partition> |
getPartitionsByNames(String dbName,
String tblName,
List<String> partNames) |
List<Partition> |
getPartitionsWithAuth(String dbName,
String tblName,
short maxParts,
String userName,
List<String> groupNames) |
Partition |
getPartitionWithAuth(String dbName,
String tblName,
List<String> partVals,
String user_name,
List<String> group_names) |
List<SQLPrimaryKey> |
getPrimaryKeys(String db_name,
String tbl_name) |
Role |
getRole(String roleName) |
Table |
getTable(String dbName,
String tableName) |
ColumnStatistics |
getTableColumnStatistics(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 dbNames,
String tableNames,
List<String> tableTypes) |
List<Table> |
getTableObjectsByName(String dbname,
List<String> tableNames) |
PrincipalPrivilegeSet |
getTablePrivilegeSet(String dbName,
String tableName,
String userName,
List<String> groupNames) |
List<String> |
getTables(String dbName,
String pattern) |
List<String> |
getTables(String dbName,
String pattern,
TableType tableType) |
String |
getToken(String tokenIdentifier) |
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 |
isFileMetadataSupported() |
boolean |
isPartitionMarkedForEvent(String dbName,
String tblName,
Map<String,String> partName,
PartitionEventType evtType) |
List<HiveObjectPrivilege> |
listAllTableGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName) |
List<HiveObjectPrivilege> |
listDBGrantsAll(String dbName) |
List<HiveObjectPrivilege> |
listGlobalGrantsAll() |
List<String> |
listIndexNames(String dbName,
String origTableName,
short max) |
List<HiveObjectPrivilege> |
listPartitionColumnGrantsAll(String dbName,
String tableName,
String partitionName,
String columnName) |
List<HiveObjectPrivilege> |
listPartitionGrantsAll(String dbName,
String tableName,
String partitionName) |
List<String> |
listPartitionNames(String db_name,
String tbl_name,
short max_parts) |
List<String> |
listPartitionNamesByFilter(String db_name,
String tbl_name,
String filter,
short max_parts) |
List<String> |
listPartitionNamesPs(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 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 db_name,
String tbl_name,
List<FieldSchema> cols,
boolean applyDistinct,
String filter,
boolean ascending,
List<FieldSchema> order,
long maxParts) |
List<HiveObjectPrivilege> |
listPrincipalDBGrants(String principalName,
PrincipalType principalType,
String dbName) |
List<HiveObjectPrivilege> |
listPrincipalDBGrantsAll(String principalName,
PrincipalType principalType) |
List<HiveObjectPrivilege> |
listPrincipalGlobalGrants(String principalName,
PrincipalType principalType) |
List<HiveObjectPrivilege> |
listPrincipalPartitionColumnGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName,
List<String> partVals,
String partName,
String columnName) |
List<HiveObjectPrivilege> |
listPrincipalPartitionColumnGrantsAll(String principalName,
PrincipalType principalType) |
List<HiveObjectPrivilege> |
listPrincipalPartitionGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName,
List<String> partValues,
String partName) |
List<HiveObjectPrivilege> |
listPrincipalPartitionGrantsAll(String principalName,
PrincipalType principalType) |
List<HiveObjectPrivilege> |
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<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 dbName,
String tableName,
String columnName) |
List<HiveObjectPrivilege> |
listTableGrantsAll(String dbName,
String tableName) |
List<String> |
listTableNamesByFilter(String dbName,
String filter,
short max_tables)
Gets a list of tables based on a filter string and filter type.
|
Table |
markPartitionForEvent(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 |
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 |
setConf(org.apache.hadoop.conf.Configuration configuration) |
void |
setMetaStoreSchemaVersion(String version,
String comment) |
void |
shutdown() |
void |
updateMasterKey(Integer seqNo,
String key) |
boolean |
updatePartitionColumnStatistics(ColumnStatistics colStats,
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
|
void |
verifySchema() |
public boolean openTransaction()
RawStore
openTransaction
in interface RawStore
public boolean commitTransaction()
RawStore
commitTransaction
in interface RawStore
public boolean isActiveTransaction()
isActiveTransaction
in interface RawStore
public void rollbackTransaction()
RawStore
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 boolean dropDatabase(String dbname) throws NoSuchObjectException, MetaException
dropDatabase
in interface RawStore
NoSuchObjectException
MetaException
public boolean alterDatabase(String dbname, Database db) throws NoSuchObjectException, MetaException
alterDatabase
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 int getDatabaseCount() throws MetaException
RawStore
getDatabaseCount
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 boolean addPartition(Partition part) throws InvalidObjectException, MetaException
addPartition
in interface RawStore
InvalidObjectException
MetaException
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 Partition getPartition(String dbName, String tableName, List<String> part_vals) throws MetaException, NoSuchObjectException
getPartition
in interface RawStore
MetaException
NoSuchObjectException
public boolean doesPartitionExist(String dbName, String tableName, List<String> part_vals) throws MetaException, NoSuchObjectException
doesPartitionExist
in interface RawStore
MetaException
NoSuchObjectException
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 List<Partition> getPartitions(String dbName, String tableName, int max) throws MetaException, NoSuchObjectException
getPartitions
in interface RawStore
MetaException
NoSuchObjectException
public void alterTable(String dbName, String tableName, Table newTable) throws InvalidObjectException, MetaException
alterTable
in interface RawStore
InvalidObjectException
MetaException
public List<String> getTables(String dbName, String pattern) throws MetaException
getTables
in interface RawStore
MetaException
public List<String> getTables(String dbName, String pattern, TableType tableType) throws MetaException
getTables
in interface RawStore
MetaException
public List<TableMeta> getTableMeta(String dbNames, String tableNames, List<String> tableTypes) throws MetaException
getTableMeta
in interface RawStore
MetaException
public List<Table> getTableObjectsByName(String dbname, List<String> tableNames) throws MetaException, UnknownDBException
getTableObjectsByName
in interface RawStore
dbname
- The name of the database from which to retrieve the tablestableNames
- The names of the tables to retrieve.MetaException
UnknownDBException
public List<String> getAllTables(String dbName) throws MetaException
getAllTables
in interface RawStore
MetaException
public int getTableCount() throws MetaException
RawStore
getTableCount
in interface RawStore
MetaException
public List<String> listTableNamesByFilter(String dbName, String filter, short max_tables) throws MetaException, UnknownDBException
RawStore
listTableNamesByFilter
in interface RawStore
dbName
- The name of the database from which you will retrieve the table namesfilter
- The filter stringmax_tables
- The maximum number of tables returnedMetaException
UnknownDBException
public List<String> listPartitionNames(String db_name, String tbl_name, short max_parts) throws MetaException
listPartitionNames
in interface RawStore
MetaException
public PartitionValuesResponse listPartitionValues(String db_name, String tbl_name, List<FieldSchema> cols, boolean applyDistinct, String filter, boolean ascending, List<FieldSchema> order, long maxParts)
listPartitionValues
in interface RawStore
public List<String> listPartitionNamesByFilter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException
listPartitionNamesByFilter
in interface RawStore
MetaException
public void alterPartition(String db_name, String tbl_name, List<String> part_vals, Partition new_part) throws InvalidObjectException, MetaException
alterPartition
in interface RawStore
InvalidObjectException
MetaException
public void alterPartitions(String db_name, String tbl_name, List<List<String>> part_vals_list, List<Partition> new_parts) throws InvalidObjectException, MetaException
alterPartitions
in interface RawStore
InvalidObjectException
MetaException
public boolean addIndex(Index index) throws InvalidObjectException, MetaException
addIndex
in interface RawStore
InvalidObjectException
MetaException
public Index getIndex(String dbName, String origTableName, String indexName) throws MetaException
getIndex
in interface RawStore
MetaException
public boolean dropIndex(String dbName, String origTableName, String indexName) throws MetaException
dropIndex
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 void alterIndex(String dbname, String baseTblName, String name, Index newIndex) throws InvalidObjectException, MetaException
alterIndex
in interface RawStore
InvalidObjectException
MetaException
public List<Partition> getPartitionsByFilter(String dbName, String tblName, String filter, short maxParts) throws MetaException, NoSuchObjectException
getPartitionsByFilter
in interface RawStore
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
public int getNumPartitionsByFilter(String dbName, String tblName, String filter) throws MetaException, NoSuchObjectException
getNumPartitionsByFilter
in interface RawStore
MetaException
NoSuchObjectException
public int getNumPartitionsByExpr(String dbName, String tblName, byte[] expr) throws MetaException, NoSuchObjectException
getNumPartitionsByExpr
in interface RawStore
MetaException
NoSuchObjectException
public List<Partition> getPartitionsByNames(String dbName, String tblName, List<String> partNames) throws MetaException, NoSuchObjectException
getPartitionsByNames
in interface RawStore
MetaException
NoSuchObjectException
public Table markPartitionForEvent(String dbName, String tblName, Map<String,String> partVals, PartitionEventType evtType) throws MetaException, UnknownTableException, InvalidPartitionException, UnknownPartitionException
markPartitionForEvent
in interface RawStore
MetaException
UnknownTableException
InvalidPartitionException
UnknownPartitionException
public boolean isPartitionMarkedForEvent(String dbName, String tblName, Map<String,String> partName, PartitionEventType evtType) throws MetaException, UnknownTableException, InvalidPartitionException, UnknownPartitionException
isPartitionMarkedForEvent
in interface RawStore
MetaException
UnknownTableException
InvalidPartitionException
UnknownPartitionException
public int getPartitionCount() throws MetaException
RawStore
getPartitionCount
in interface RawStore
MetaException
public boolean addRole(String roleName, String ownerName) throws InvalidObjectException, MetaException, NoSuchObjectException
addRole
in interface RawStore
InvalidObjectException
MetaException
NoSuchObjectException
public boolean removeRole(String roleName) throws MetaException, NoSuchObjectException
removeRole
in interface RawStore
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 PrincipalPrivilegeSet getUserPrivilegeSet(String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getUserPrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public PrincipalPrivilegeSet getDBPrivilegeSet(String dbName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getDBPrivilegeSet
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 getPartitionPrivilegeSet(String dbName, String tableName, String partition, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getPartitionPrivilegeSet
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 List<HiveObjectPrivilege> listPrincipalGlobalGrants(String principalName, PrincipalType principalType)
listPrincipalGlobalGrants
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalDBGrants(String principalName, PrincipalType principalType, String dbName)
listPrincipalDBGrants
in interface RawStore
public List<HiveObjectPrivilege> listAllTableGrants(String principalName, PrincipalType principalType, String dbName, String tableName)
listAllTableGrants
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalPartitionGrants(String principalName, PrincipalType principalType, String dbName, String tableName, List<String> partValues, String partName)
listPrincipalPartitionGrants
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalTableColumnGrants(String principalName, PrincipalType principalType, String dbName, String tableName, String columnName)
listPrincipalTableColumnGrants
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalPartitionColumnGrants(String principalName, PrincipalType principalType, String dbName, String tableName, List<String> partVals, String partName, String columnName)
listPrincipalPartitionColumnGrants
in interface RawStore
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 Role getRole(String roleName) throws NoSuchObjectException
getRole
in interface RawStore
NoSuchObjectException
public List<String> listRoleNames()
listRoleNames
in interface RawStore
public List<Role> listRoles(String principalName, PrincipalType principalType)
public List<RolePrincipalGrant> listRolesWithGrants(String principalName, PrincipalType principalType)
listRolesWithGrants
in interface RawStore
public List<RolePrincipalGrant> listRoleMembers(String roleName)
RawStore
listRoleMembers
in interface RawStore
public Partition getPartitionWithAuth(String dbName, String tblName, List<String> partVals, String user_name, List<String> group_names) throws MetaException, NoSuchObjectException, InvalidObjectException
getPartitionWithAuth
in interface RawStore
MetaException
NoSuchObjectException
InvalidObjectException
public List<Partition> getPartitionsWithAuth(String dbName, String tblName, short maxParts, String userName, List<String> groupNames) throws MetaException, NoSuchObjectException, InvalidObjectException
getPartitionsWithAuth
in interface RawStore
MetaException
NoSuchObjectException
InvalidObjectException
public List<String> listPartitionNamesPs(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws MetaException, NoSuchObjectException
RawStore
listPartitionNamesPs
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 only want to specify latter partitions.max_parts
- The maximum number of partitions to returnMetaException
NoSuchObjectException
public List<Partition> listPartitionsPsWithAuth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String userName, List<String> groupNames) throws MetaException, 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
NoSuchObjectException
public boolean updateTableColumnStatistics(ColumnStatistics colStats) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
RawStore
updateTableColumnStatistics
in interface RawStore
colStats
- object to persistNoSuchObjectException
MetaException
InvalidObjectException
InvalidInputException
public boolean updatePartitionColumnStatistics(ColumnStatistics colStats, List<String> partVals) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException
RawStore
updatePartitionColumnStatistics
in interface RawStore
colStats
- object to persistNoSuchObjectException
MetaException
InvalidObjectException
InvalidInputException
public ColumnStatistics getTableColumnStatistics(String dbName, String tableName, List<String> colName) throws MetaException, NoSuchObjectException
RawStore
getTableColumnStatistics
in interface RawStore
dbName
- name of the database, defaults to current databasetableName
- name of the tablecolName
- names of the columns for which statistics is requestedMetaException
NoSuchObjectException
public List<ColumnStatistics> getPartitionColumnStatistics(String dbName, String tblName, List<String> partNames, List<String> colNames) throws MetaException, NoSuchObjectException
RawStore
getPartitionColumnStatistics
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 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 long cleanupEvents()
cleanupEvents
in interface RawStore
public boolean removeToken(String tokenIdentifier)
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 seqNo, String key) throws NoSuchObjectException, MetaException
updateMasterKey
in interface RawStore
NoSuchObjectException
MetaException
public boolean removeMasterKey(Integer keySeq)
removeMasterKey
in interface RawStore
public String[] getMasterKeys()
getMasterKeys
in interface RawStore
public void verifySchema() throws MetaException
verifySchema
in interface RawStore
MetaException
public String getMetaStoreSchemaVersion() throws MetaException
getMetaStoreSchemaVersion
in interface RawStore
MetaException
public void setMetaStoreSchemaVersion(String version, String comment) throws MetaException
setMetaStoreSchemaVersion
in interface RawStore
MetaException
public void dropPartitions(String dbName, String tblName, List<String> partNames) throws MetaException, NoSuchObjectException
dropPartitions
in interface RawStore
MetaException
NoSuchObjectException
public List<HiveObjectPrivilege> listPrincipalDBGrantsAll(String principalName, PrincipalType principalType)
listPrincipalDBGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalTableGrantsAll(String principalName, PrincipalType principalType)
listPrincipalTableGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalPartitionGrantsAll(String principalName, PrincipalType principalType)
listPrincipalPartitionGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalTableColumnGrantsAll(String principalName, PrincipalType principalType)
listPrincipalTableColumnGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPrincipalPartitionColumnGrantsAll(String principalName, PrincipalType principalType)
listPrincipalPartitionColumnGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listGlobalGrantsAll()
listGlobalGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listDBGrantsAll(String dbName)
listDBGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPartitionColumnGrantsAll(String dbName, String tableName, String partitionName, String columnName)
listPartitionColumnGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listTableGrantsAll(String dbName, String tableName)
listTableGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listPartitionGrantsAll(String dbName, String tableName, String partitionName)
listPartitionGrantsAll
in interface RawStore
public List<HiveObjectPrivilege> listTableColumnGrantsAll(String dbName, String tableName, String columnName)
listTableColumnGrantsAll
in interface RawStore
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<Function> getAllFunctions() throws MetaException
RawStore
getAllFunctions
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 event)
RawStore
addNotificationEvent
in interface RawStore
event
- 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
public void flushCache()
flushCache
in interface RawStore
public void setConf(org.apache.hadoop.conf.Configuration configuration)
setConf
in interface org.apache.hadoop.conf.Configurable
public FileMetadataHandler getFileMetadataHandler(FileMetadataExprType type)
RawStore
getFileMetadataHandler
in interface RawStore
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public boolean isFileMetadataSupported()
isFileMetadataSupported
in interface RawStore
public ByteBuffer[] getFileMetadata(List<Long> fileIds) throws MetaException
getFileMetadata
in interface RawStore
fileIds
- List of file IDs from the filesystem.MetaException
public void getFileMetadataByExpr(List<Long> fileIds, FileMetadataExprType type, byte[] expr, ByteBuffer[] metadatas, ByteBuffer[] results, boolean[] eliminated) throws MetaException
RawStore
getFileMetadataByExpr
in interface RawStore
fileIds
- List of file IDs from the filesystem.type
- Expression type; used to determine the class that handles the metadata.expr
- Format-specific serialized expression applicable to the files' metadatas.metadatas
- Output parameter; fileIds-sized array to receive the metadatas
for corresponding files, if any.results
- 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
public void putFileMetadata(List<Long> fileIds, List<ByteBuffer> metadata, FileMetadataExprType type) throws MetaException
putFileMetadata
in interface RawStore
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
public List<SQLPrimaryKey> getPrimaryKeys(String db_name, String tbl_name) throws MetaException
getPrimaryKeys
in interface RawStore
MetaException
public List<SQLForeignKey> getForeignKeys(String parent_db_name, String parent_tbl_name, String foreign_db_name, String foreign_tbl_name) throws MetaException
RawStore
getForeignKeys
in interface RawStore
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
- if something goes wrong.public void createTableWithConstraints(Table tbl, List<SQLPrimaryKey> primaryKeys, List<SQLForeignKey> foreignKeys) throws InvalidObjectException, MetaException
createTableWithConstraints
in interface RawStore
InvalidObjectException
MetaException
public void dropConstraint(String dbName, String tableName, String constraintName) throws NoSuchObjectException
dropConstraint
in interface RawStore
NoSuchObjectException
public void addPrimaryKeys(List<SQLPrimaryKey> pks) throws InvalidObjectException, MetaException
addPrimaryKeys
in interface RawStore
InvalidObjectException
MetaException
public void addForeignKeys(List<SQLForeignKey> fks) throws InvalidObjectException, MetaException
addForeignKeys
in interface RawStore
InvalidObjectException
MetaException
Copyright © 2021 The Apache Software Foundation. All rights reserved.