public interface HiveMetastore
Optional<Table> getTable(HiveIdentity identity, String databaseName, String tableName)
Set<ColumnStatisticType> getSupportedColumnStatistics(Type type)
PartitionStatistics getTableStatistics(HiveIdentity identity, Table table)
Map<String,PartitionStatistics> getPartitionStatistics(HiveIdentity identity, Table table, List<Partition> partitions)
void updateTableStatistics(HiveIdentity identity, String databaseName, String tableName, Function<PartitionStatistics,PartitionStatistics> update)
void updatePartitionStatistics(HiveIdentity identity, Table table, String partitionName, Function<PartitionStatistics,PartitionStatistics> update)
List<String> getTablesWithParameter(String databaseName, String parameterKey, String parameterValue)
void createDatabase(HiveIdentity identity, Database database)
void dropDatabase(HiveIdentity identity, String databaseName)
void renameDatabase(HiveIdentity identity, String databaseName, String newDatabaseName)
void setDatabaseOwner(HiveIdentity identity, String databaseName, HivePrincipal principal)
void createTable(HiveIdentity identity, Table table, PrincipalPrivileges principalPrivileges)
void dropTable(HiveIdentity identity, String databaseName, String tableName, boolean deleteData)
void replaceTable(HiveIdentity identity, String databaseName, String tableName, Table newTable, PrincipalPrivileges principalPrivileges)
void renameTable(HiveIdentity identity, String databaseName, String tableName, String newDatabaseName, String newTableName)
void commentTable(HiveIdentity identity, String databaseName, String tableName, Optional<String> comment)
void addColumn(HiveIdentity identity, String databaseName, String tableName, String columnName, HiveType columnType, String columnComment)
void renameColumn(HiveIdentity identity, String databaseName, String tableName, String oldColumnName, String newColumnName)
void dropColumn(HiveIdentity identity, String databaseName, String tableName, String columnName)
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)
Map<String,Optional<Partition>> getPartitionsByNames(HiveIdentity identity, Table table, List<String> partitionNames)
void addPartitions(HiveIdentity identity, String databaseName, String tableName, List<PartitionWithStatistics> partitions)
void dropPartition(HiveIdentity identity, String databaseName, String tableName, List<String> parts, boolean deleteData)
void alterPartition(HiveIdentity identity, String databaseName, String tableName, PartitionWithStatistics partition)
void dropRole(String role)
void grantRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor)
void revokeRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor)
Set<RoleGrant> listRoleGrants(HivePrincipal principal)
void grantTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
void revokeTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
Set<HivePrivilegeInfo> listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional<HivePrincipal> principal)
principal - when empty, all table privileges are returnedboolean isImpersonationEnabled()
default long openTransaction(HiveIdentity identity)
default void commitTransaction(HiveIdentity identity, long transactionId)
default void sendTransactionHeartbeat(HiveIdentity identity, long transactionId)
default void acquireSharedReadLock(HiveIdentity identity, String queryId, long transactionId, List<SchemaTableName> fullTables, List<HivePartition> partitions)
default String getValidWriteIds(HiveIdentity identity, List<SchemaTableName> tables, long currentTransactionId)
Copyright © 2012–2020. All rights reserved.