public class AlluxioHiveMetastore extends Object implements HiveMetastore
HiveMetastore interface through Alluxio.| Constructor and Description |
|---|
AlluxioHiveMetastore(alluxio.client.table.TableMasterClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(HiveIdentity identity,
String databaseName,
String tableName,
String columnName,
HiveType columnType,
String columnComment) |
void |
addPartitions(HiveIdentity identity,
String databaseName,
String tableName,
List<PartitionWithStatistics> partitions) |
void |
alterPartition(HiveIdentity identity,
String databaseName,
String tableName,
PartitionWithStatistics partition) |
void |
commentTable(HiveIdentity identity,
String databaseName,
String tableName,
Optional<String> comment) |
void |
createDatabase(HiveIdentity identity,
Database database) |
void |
createRole(String role,
String grantor) |
void |
createTable(HiveIdentity identity,
Table table,
PrincipalPrivileges principalPrivileges) |
void |
dropColumn(HiveIdentity identity,
String databaseName,
String tableName,
String columnName) |
void |
dropDatabase(HiveIdentity identity,
String databaseName) |
void |
dropPartition(HiveIdentity identity,
String databaseName,
String tableName,
List<String> parts,
boolean deleteData) |
void |
dropRole(String role) |
void |
dropTable(HiveIdentity identity,
String databaseName,
String tableName,
boolean deleteData) |
List<String> |
getAllDatabases() |
List<String> |
getAllTables(String databaseName) |
List<String> |
getAllViews(String databaseName) |
Optional<Database> |
getDatabase(String databaseName) |
Optional<Partition> |
getPartition(HiveIdentity identity,
Table table,
List<String> partitionValues) |
Optional<List<String>> |
getPartitionNames(HiveIdentity identity,
String databaseName,
String tableName) |
Optional<List<String>> |
getPartitionNamesByParts(HiveIdentity identity,
String databaseName,
String tableName,
List<String> parts)
return a list of partition names by which the values of each partition is at least
contained which the
parts argument |
Map<String,Optional<Partition>> |
getPartitionsByNames(HiveIdentity identity,
Table table,
List<String> partitionNames) |
Map<String,PartitionStatistics> |
getPartitionStatistics(HiveIdentity identity,
Table table,
List<Partition> partitions) |
Set<ColumnStatisticType> |
getSupportedColumnStatistics(Type type) |
Optional<Table> |
getTable(HiveIdentity identity,
String databaseName,
String tableName) |
PartitionStatistics |
getTableStatistics(HiveIdentity identity,
Table table) |
List<String> |
getTablesWithParameter(String databaseName,
String parameterKey,
String parameterValue) |
void |
grantRoles(Set<String> roles,
Set<HivePrincipal> grantees,
boolean withAdminOption,
HivePrincipal grantor) |
void |
grantTablePrivileges(String databaseName,
String tableName,
String tableOwner,
HivePrincipal grantee,
Set<HivePrivilegeInfo> privileges) |
boolean |
isImpersonationEnabled() |
Set<RoleGrant> |
listRoleGrants(HivePrincipal principal) |
Set<String> |
listRoles() |
Set<HivePrivilegeInfo> |
listTablePrivileges(String databaseName,
String tableName,
String tableOwner,
Optional<HivePrincipal> principal) |
void |
renameColumn(HiveIdentity identity,
String databaseName,
String tableName,
String oldColumnName,
String newColumnName) |
void |
renameDatabase(HiveIdentity identity,
String databaseName,
String newDatabaseName) |
void |
renameTable(HiveIdentity identity,
String databaseName,
String tableName,
String newDatabaseName,
String newTableName) |
void |
replaceTable(HiveIdentity identity,
String databaseName,
String tableName,
Table newTable,
PrincipalPrivileges principalPrivileges)
This should only be used if the semantic here is drop and add.
|
void |
revokeRoles(Set<String> roles,
Set<HivePrincipal> grantees,
boolean adminOptionFor,
HivePrincipal grantor) |
void |
revokeTablePrivileges(String databaseName,
String tableName,
String tableOwner,
HivePrincipal grantee,
Set<HivePrivilegeInfo> privileges) |
void |
setDatabaseOwner(HiveIdentity identity,
String databaseName,
HivePrincipal principal) |
void |
updatePartitionStatistics(HiveIdentity identity,
Table table,
String partitionName,
Function<PartitionStatistics,PartitionStatistics> update) |
void |
updateTableStatistics(HiveIdentity identity,
String databaseName,
String tableName,
Function<PartitionStatistics,PartitionStatistics> update) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquireSharedReadLock, commitTransaction, getConfigValue, getValidWriteIds, openTransaction, sendTransactionHeartbeat@Inject public AlluxioHiveMetastore(alluxio.client.table.TableMasterClient client)
public Optional<Database> getDatabase(String databaseName)
getDatabase in interface HiveMetastorepublic List<String> getAllDatabases()
getAllDatabases in interface HiveMetastorepublic Optional<Table> getTable(HiveIdentity identity, String databaseName, String tableName)
getTable in interface HiveMetastorepublic Set<ColumnStatisticType> getSupportedColumnStatistics(Type type)
getSupportedColumnStatistics in interface HiveMetastorepublic PartitionStatistics getTableStatistics(HiveIdentity identity, Table table)
getTableStatistics in interface HiveMetastorepublic Map<String,PartitionStatistics> getPartitionStatistics(HiveIdentity identity, Table table, List<Partition> partitions)
getPartitionStatistics in interface HiveMetastorepublic void updateTableStatistics(HiveIdentity identity, String databaseName, String tableName, Function<PartitionStatistics,PartitionStatistics> update)
updateTableStatistics in interface HiveMetastorepublic void updatePartitionStatistics(HiveIdentity identity, Table table, String partitionName, Function<PartitionStatistics,PartitionStatistics> update)
updatePartitionStatistics in interface HiveMetastorepublic List<String> getAllTables(String databaseName)
getAllTables in interface HiveMetastorepublic List<String> getTablesWithParameter(String databaseName, String parameterKey, String parameterValue)
getTablesWithParameter in interface HiveMetastorepublic List<String> getAllViews(String databaseName)
getAllViews in interface HiveMetastorepublic void createDatabase(HiveIdentity identity, Database database)
createDatabase in interface HiveMetastorepublic void dropDatabase(HiveIdentity identity, String databaseName)
dropDatabase in interface HiveMetastorepublic void renameDatabase(HiveIdentity identity, String databaseName, String newDatabaseName)
renameDatabase in interface HiveMetastorepublic void setDatabaseOwner(HiveIdentity identity, String databaseName, HivePrincipal principal)
setDatabaseOwner in interface HiveMetastorepublic void createTable(HiveIdentity identity, Table table, PrincipalPrivileges principalPrivileges)
createTable in interface HiveMetastorepublic void dropTable(HiveIdentity identity, String databaseName, String tableName, boolean deleteData)
dropTable in interface HiveMetastorepublic void replaceTable(HiveIdentity identity, String databaseName, String tableName, Table newTable, PrincipalPrivileges principalPrivileges)
HiveMetastorereplaceTable in interface HiveMetastorepublic void renameTable(HiveIdentity identity, String databaseName, String tableName, String newDatabaseName, String newTableName)
renameTable in interface HiveMetastorepublic void commentTable(HiveIdentity identity, String databaseName, String tableName, Optional<String> comment)
commentTable in interface HiveMetastorepublic void addColumn(HiveIdentity identity, String databaseName, String tableName, String columnName, HiveType columnType, String columnComment)
addColumn in interface HiveMetastorepublic void renameColumn(HiveIdentity identity, String databaseName, String tableName, String oldColumnName, String newColumnName)
renameColumn in interface HiveMetastorepublic void dropColumn(HiveIdentity identity, String databaseName, String tableName, String columnName)
dropColumn in interface HiveMetastorepublic Optional<Partition> getPartition(HiveIdentity identity, Table table, List<String> partitionValues)
getPartition in interface HiveMetastorepublic Optional<List<String>> getPartitionNames(HiveIdentity identity, String databaseName, String tableName)
getPartitionNames in interface HiveMetastorepublic Optional<List<String>> getPartitionNamesByParts(HiveIdentity identity, String databaseName, String tableName, List<String> parts)
parts argumentgetPartitionNamesByParts in interface HiveMetastoredatabaseName - the name of the databasetableName - the name of the tableparts - list of values which returned partitions should containpublic Map<String,Optional<Partition>> getPartitionsByNames(HiveIdentity identity, Table table, List<String> partitionNames)
getPartitionsByNames in interface HiveMetastorepublic void addPartitions(HiveIdentity identity, String databaseName, String tableName, List<PartitionWithStatistics> partitions)
addPartitions in interface HiveMetastorepublic void dropPartition(HiveIdentity identity, String databaseName, String tableName, List<String> parts, boolean deleteData)
dropPartition in interface HiveMetastorepublic void alterPartition(HiveIdentity identity, String databaseName, String tableName, PartitionWithStatistics partition)
alterPartition in interface HiveMetastorepublic void createRole(String role, String grantor)
createRole in interface HiveMetastorepublic void dropRole(String role)
dropRole in interface HiveMetastorepublic Set<String> listRoles()
listRoles in interface HiveMetastorepublic void grantRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean withAdminOption, HivePrincipal grantor)
grantRoles in interface HiveMetastorepublic void revokeRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOptionFor, HivePrincipal grantor)
revokeRoles in interface HiveMetastorepublic Set<RoleGrant> listRoleGrants(HivePrincipal principal)
listRoleGrants in interface HiveMetastorepublic void grantTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
grantTablePrivileges in interface HiveMetastorepublic void revokeTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
revokeTablePrivileges in interface HiveMetastorepublic Set<HivePrivilegeInfo> listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional<HivePrincipal> principal)
listTablePrivileges in interface HiveMetastoreprincipal - when empty, all table privileges are returnedpublic boolean isImpersonationEnabled()
isImpersonationEnabled in interface HiveMetastoreCopyright © 2012–2020. All rights reserved.