public class GlueHiveMetastore extends Object implements HiveMetastore
| Constructor and Description |
|---|
GlueHiveMetastore(HdfsEnvironment hdfsEnvironment,
GlueHiveMetastoreConfig glueConfig) |
GlueHiveMetastore(HdfsEnvironment hdfsEnvironment,
GlueHiveMetastoreConfig glueConfig,
com.amazonaws.services.glue.AWSGlueAsync glueClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(String databaseName,
String tableName,
String columnName,
HiveType columnType,
String columnComment) |
void |
addPartitions(String databaseName,
String tableName,
List<PartitionWithStatistics> partitions) |
void |
alterPartition(String databaseName,
String tableName,
PartitionWithStatistics partition) |
void |
commentTable(String databaseName,
String tableName,
Optional<String> comment) |
void |
createDatabase(Database database) |
void |
createRole(String role,
String grantor) |
void |
createTable(Table table,
PrincipalPrivileges principalPrivileges) |
void |
dropColumn(String databaseName,
String tableName,
String columnName) |
void |
dropDatabase(String databaseName) |
void |
dropPartition(String databaseName,
String tableName,
List<String> parts,
boolean deleteData) |
void |
dropRole(String role) |
void |
dropTable(String databaseName,
String tableName,
boolean deleteData) |
List<String> |
getAllDatabases() |
Optional<List<String>> |
getAllTables(String databaseName) |
Optional<List<String>> |
getAllViews(String databaseName) |
Optional<Database> |
getDatabase(String databaseName) |
Optional<Partition> |
getPartition(String databaseName,
String tableName,
List<String> partitionValues) |
Optional<List<String>> |
getPartitionNames(String databaseName,
String tableName) |
Optional<List<String>> |
getPartitionNamesByParts(String databaseName,
String tableName,
List<String> parts)
Ex: Partition keys = ['a', 'b', 'c']
Valid partition values:
['1','2','3'] or
['', '2', '']
|
Map<String,Optional<Partition>> |
getPartitionsByNames(String databaseName,
String tableName,
List<String> partitionNames)
Ex: Partition keys = ['a', 'b']
Partition names = ['a=1/b=2', 'a=2/b=2']
|
Map<String,PartitionStatistics> |
getPartitionStatistics(String databaseName,
String tableName,
Set<String> partitionNames) |
Set<ColumnStatisticType> |
getSupportedColumnStatistics(Type type) |
Optional<Table> |
getTable(String databaseName,
String tableName) |
PartitionStatistics |
getTableStatistics(String databaseName,
String tableName) |
void |
grantRoles(Set<String> roles,
Set<HivePrincipal> grantees,
boolean withAdminOption,
HivePrincipal grantor) |
void |
grantTablePrivileges(String databaseName,
String tableName,
HivePrincipal grantee,
Set<HivePrivilegeInfo> privileges) |
Set<RoleGrant> |
listRoleGrants(HivePrincipal principal) |
Set<String> |
listRoles() |
Set<HivePrivilegeInfo> |
listTablePrivileges(String databaseName,
String tableName,
HivePrincipal principal) |
void |
renameColumn(String databaseName,
String tableName,
String oldColumnName,
String newColumnName) |
void |
renameDatabase(String databaseName,
String newDatabaseName) |
void |
renameTable(String databaseName,
String tableName,
String newDatabaseName,
String newTableName) |
void |
replaceTable(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,
HivePrincipal grantee,
Set<HivePrivilegeInfo> privileges) |
void |
updatePartitionStatistics(String databaseName,
String tableName,
String partitionName,
Function<PartitionStatistics,PartitionStatistics> update) |
void |
updateTableStatistics(String databaseName,
String tableName,
Function<PartitionStatistics,PartitionStatistics> update) |
@Inject public GlueHiveMetastore(HdfsEnvironment hdfsEnvironment, GlueHiveMetastoreConfig glueConfig)
public GlueHiveMetastore(HdfsEnvironment hdfsEnvironment, GlueHiveMetastoreConfig glueConfig, com.amazonaws.services.glue.AWSGlueAsync glueClient)
public Optional<Database> getDatabase(String databaseName)
getDatabase in interface HiveMetastorepublic List<String> getAllDatabases()
getAllDatabases in interface HiveMetastorepublic Optional<Table> getTable(String databaseName, String tableName)
getTable in interface HiveMetastorepublic Set<ColumnStatisticType> getSupportedColumnStatistics(Type type)
getSupportedColumnStatistics in interface HiveMetastorepublic PartitionStatistics getTableStatistics(String databaseName, String tableName)
getTableStatistics in interface HiveMetastorepublic Map<String,PartitionStatistics> getPartitionStatistics(String databaseName, String tableName, Set<String> partitionNames)
getPartitionStatistics in interface HiveMetastorepublic void updateTableStatistics(String databaseName, String tableName, Function<PartitionStatistics,PartitionStatistics> update)
updateTableStatistics in interface HiveMetastorepublic void updatePartitionStatistics(String databaseName, String tableName, String partitionName, Function<PartitionStatistics,PartitionStatistics> update)
updatePartitionStatistics in interface HiveMetastorepublic Optional<List<String>> getAllTables(String databaseName)
getAllTables in interface HiveMetastorepublic Optional<List<String>> getAllViews(String databaseName)
getAllViews in interface HiveMetastorepublic void createDatabase(Database database)
createDatabase in interface HiveMetastorepublic void dropDatabase(String databaseName)
dropDatabase in interface HiveMetastorepublic void renameDatabase(String databaseName, String newDatabaseName)
renameDatabase in interface HiveMetastorepublic void createTable(Table table, PrincipalPrivileges principalPrivileges)
createTable in interface HiveMetastorepublic void dropTable(String databaseName, String tableName, boolean deleteData)
dropTable in interface HiveMetastorepublic void replaceTable(String databaseName, String tableName, Table newTable, PrincipalPrivileges principalPrivileges)
HiveMetastorereplaceTable in interface HiveMetastorepublic void renameTable(String databaseName, String tableName, String newDatabaseName, String newTableName)
renameTable in interface HiveMetastorepublic void commentTable(String databaseName, String tableName, Optional<String> comment)
commentTable in interface HiveMetastorepublic void addColumn(String databaseName, String tableName, String columnName, HiveType columnType, String columnComment)
addColumn in interface HiveMetastorepublic void renameColumn(String databaseName, String tableName, String oldColumnName, String newColumnName)
renameColumn in interface HiveMetastorepublic void dropColumn(String databaseName, String tableName, String columnName)
dropColumn in interface HiveMetastorepublic Optional<Partition> getPartition(String databaseName, String tableName, List<String> partitionValues)
getPartition in interface HiveMetastorepublic Optional<List<String>> getPartitionNames(String databaseName, String tableName)
getPartitionNames in interface HiveMetastorepublic Optional<List<String>> getPartitionNamesByParts(String databaseName, String tableName, List<String> parts)
Ex: Partition keys = ['a', 'b', 'c']
Valid partition values:
['1','2','3'] or
['', '2', '']
getPartitionNamesByParts in interface HiveMetastoreparts - Full or partial list of partition values to filter on. Keys without filter will be empty strings.public Map<String,Optional<Partition>> getPartitionsByNames(String databaseName, String tableName, List<String> partitionNames)
Ex: Partition keys = ['a', 'b']
Partition names = ['a=1/b=2', 'a=2/b=2']
getPartitionsByNames in interface HiveMetastorepartitionNames - List of full partition namespublic void addPartitions(String databaseName, String tableName, List<PartitionWithStatistics> partitions)
addPartitions in interface HiveMetastorepublic void dropPartition(String databaseName, String tableName, List<String> parts, boolean deleteData)
dropPartition in interface HiveMetastorepublic void alterPartition(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, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
grantTablePrivileges in interface HiveMetastorepublic void revokeTablePrivileges(String databaseName, String tableName, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
revokeTablePrivileges in interface HiveMetastorepublic Set<HivePrivilegeInfo> listTablePrivileges(String databaseName, String tableName, HivePrincipal principal)
listTablePrivileges in interface HiveMetastoreCopyright © 2012–2019. All rights reserved.