Package io.trino.plugin.hive
Class HiveMetastoreClosure
- java.lang.Object
-
- io.trino.plugin.hive.HiveMetastoreClosure
-
public class HiveMetastoreClosure extends Object
-
-
Constructor Summary
Constructors Constructor Description HiveMetastoreClosure(HiveMetastore delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacquireSharedReadLock(HiveIdentity identity, String queryId, long transactionId, List<SchemaTableName> fullTables, List<HivePartition> partitions)voidacquireTableWriteLock(HiveIdentity identity, String queryId, long transactionId, String dbName, String tableName, org.apache.hadoop.hive.metastore.api.DataOperationType operation, boolean isPartitioned)voidaddColumn(HiveIdentity identity, String databaseName, String tableName, String columnName, HiveType columnType, String columnComment)voidaddDynamicPartitions(HiveIdentity identity, String dbName, String tableName, List<String> partitionNames, long transactionId, long writeId, AcidOperation operation)voidaddPartitions(HiveIdentity identity, String databaseName, String tableName, List<PartitionWithStatistics> partitions)longallocateWriteId(HiveIdentity identity, String dbName, String tableName, long transactionId)voidalterPartition(HiveIdentity identity, String databaseName, String tableName, PartitionWithStatistics partition)voidalterPartitions(HiveIdentity identity, String dbName, String tableName, List<Partition> partitions, long writeId)voidalterTransactionalTable(HiveIdentity identity, Table table, long transactionId, long writeId, PrincipalPrivileges principalPrivileges)voidcommentColumn(HiveIdentity identity, String databaseName, String tableName, String columnName, Optional<String> comment)voidcommentTable(HiveIdentity identity, String databaseName, String tableName, Optional<String> comment)voidcommitTransaction(HiveIdentity identity, long transactionId)voidcreateDatabase(HiveIdentity identity, Database database)voidcreateRole(String role, String grantor)voidcreateTable(HiveIdentity identity, Table table, PrincipalPrivileges principalPrivileges)voiddropColumn(HiveIdentity identity, String databaseName, String tableName, String columnName)voiddropDatabase(HiveIdentity identity, String databaseName)voiddropPartition(HiveIdentity identity, String databaseName, String tableName, List<String> parts, boolean deleteData)voiddropRole(String role)voiddropTable(HiveIdentity identity, String databaseName, String tableName, boolean deleteData)List<String>getAllDatabases()List<String>getAllTables(String databaseName)List<String>getAllViews(String databaseName)Optional<String>getConfigValue(String name)Optional<Database>getDatabase(String databaseName)Optional<Partition>getPartition(HiveIdentity identity, String databaseName, String tableName, List<String> partitionValues)Optional<List<String>>getPartitionNamesByFilter(HiveIdentity identity, String databaseName, String tableName, List<String> columnNames, TupleDomain<String> partitionKeysFilter)Map<String,Optional<Partition>>getPartitionsByNames(HiveIdentity identity, String databaseName, String tableName, List<String> partitionNames)Map<String,PartitionStatistics>getPartitionStatistics(HiveIdentity identity, String databaseName, String tableName, Set<String> partitionNames)Set<ColumnStatisticType>getSupportedColumnStatistics(Type type)Optional<Table>getTable(HiveIdentity identity, String databaseName, String tableName)PartitionStatisticsgetTableStatistics(HiveIdentity identity, String databaseName, String tableName)List<String>getTablesWithParameter(String databaseName, String parameterKey, String parameterValue)StringgetValidWriteIds(HiveIdentity identity, List<SchemaTableName> tables, long currentTransactionId)voidgrantRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor)voidgrantTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)booleanisImpersonationEnabled()Set<RoleGrant>listGrantedPrincipals(String role)Set<RoleGrant>listRoleGrants(HivePrincipal principal)Set<String>listRoles()Set<HivePrivilegeInfo>listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional<HivePrincipal> principal)longopenTransaction(HiveIdentity identity)voidrenameColumn(HiveIdentity identity, String databaseName, String tableName, String oldColumnName, String newColumnName)voidrenameDatabase(HiveIdentity identity, String databaseName, String newDatabaseName)voidrenameTable(HiveIdentity identity, String databaseName, String tableName, String newDatabaseName, String newTableName)voidreplaceTable(HiveIdentity identity, String databaseName, String tableName, Table newTable, PrincipalPrivileges principalPrivileges)voidrevokeRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor)voidrevokeTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)voidsendTransactionHeartbeat(HiveIdentity identity, long transactionId)voidsetDatabaseOwner(HiveIdentity identity, String databaseName, HivePrincipal principal)voidsetTableOwner(HiveIdentity identity, String databaseName, String tableName, HivePrincipal principal)voidupdatePartitionStatistics(HiveIdentity identity, String databaseName, String tableName, String partitionName, Function<PartitionStatistics,PartitionStatistics> update)voidupdateTableStatistics(HiveIdentity identity, String databaseName, String tableName, AcidTransaction transaction, Function<PartitionStatistics,PartitionStatistics> update)voidupdateTableWriteId(HiveIdentity identity, String dbName, String tableName, long transactionId, long writeId, OptionalLong rowCountChange)
-
-
-
Constructor Detail
-
HiveMetastoreClosure
public HiveMetastoreClosure(HiveMetastore delegate)
-
-
Method Detail
-
getTable
public Optional<Table> getTable(HiveIdentity identity, String databaseName, String tableName)
-
getSupportedColumnStatistics
public Set<ColumnStatisticType> getSupportedColumnStatistics(Type type)
-
getTableStatistics
public PartitionStatistics getTableStatistics(HiveIdentity identity, String databaseName, String tableName)
-
getPartitionStatistics
public Map<String,PartitionStatistics> getPartitionStatistics(HiveIdentity identity, String databaseName, String tableName, Set<String> partitionNames)
-
updateTableStatistics
public void updateTableStatistics(HiveIdentity identity, String databaseName, String tableName, AcidTransaction transaction, Function<PartitionStatistics,PartitionStatistics> update)
-
updatePartitionStatistics
public void updatePartitionStatistics(HiveIdentity identity, String databaseName, String tableName, String partitionName, Function<PartitionStatistics,PartitionStatistics> update)
-
getTablesWithParameter
public List<String> getTablesWithParameter(String databaseName, String parameterKey, String parameterValue)
-
createDatabase
public void createDatabase(HiveIdentity identity, Database database)
-
dropDatabase
public void dropDatabase(HiveIdentity identity, String databaseName)
-
renameDatabase
public void renameDatabase(HiveIdentity identity, String databaseName, String newDatabaseName)
-
setDatabaseOwner
public void setDatabaseOwner(HiveIdentity identity, String databaseName, HivePrincipal principal)
-
setTableOwner
public void setTableOwner(HiveIdentity identity, String databaseName, String tableName, HivePrincipal principal)
-
createTable
public void createTable(HiveIdentity identity, Table table, PrincipalPrivileges principalPrivileges)
-
dropTable
public void dropTable(HiveIdentity identity, String databaseName, String tableName, boolean deleteData)
-
replaceTable
public void replaceTable(HiveIdentity identity, String databaseName, String tableName, Table newTable, PrincipalPrivileges principalPrivileges)
-
renameTable
public void renameTable(HiveIdentity identity, String databaseName, String tableName, String newDatabaseName, String newTableName)
-
commentTable
public void commentTable(HiveIdentity identity, String databaseName, String tableName, Optional<String> comment)
-
commentColumn
public void commentColumn(HiveIdentity identity, String databaseName, String tableName, String columnName, Optional<String> comment)
-
addColumn
public void addColumn(HiveIdentity identity, String databaseName, String tableName, String columnName, HiveType columnType, String columnComment)
-
renameColumn
public void renameColumn(HiveIdentity identity, String databaseName, String tableName, String oldColumnName, String newColumnName)
-
dropColumn
public void dropColumn(HiveIdentity identity, String databaseName, String tableName, String columnName)
-
getPartition
public Optional<Partition> getPartition(HiveIdentity identity, String databaseName, String tableName, List<String> partitionValues)
-
getPartitionNamesByFilter
public Optional<List<String>> getPartitionNamesByFilter(HiveIdentity identity, String databaseName, String tableName, List<String> columnNames, TupleDomain<String> partitionKeysFilter)
-
getPartitionsByNames
public Map<String,Optional<Partition>> getPartitionsByNames(HiveIdentity identity, String databaseName, String tableName, List<String> partitionNames)
-
addPartitions
public void addPartitions(HiveIdentity identity, String databaseName, String tableName, List<PartitionWithStatistics> partitions)
-
dropPartition
public void dropPartition(HiveIdentity identity, String databaseName, String tableName, List<String> parts, boolean deleteData)
-
alterPartition
public void alterPartition(HiveIdentity identity, String databaseName, String tableName, PartitionWithStatistics partition)
-
dropRole
public void dropRole(String role)
-
grantRoles
public void grantRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor)
-
revokeRoles
public void revokeRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor)
-
listRoleGrants
public Set<RoleGrant> listRoleGrants(HivePrincipal principal)
-
grantTablePrivileges
public void grantTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
-
revokeTablePrivileges
public void revokeTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
-
listTablePrivileges
public Set<HivePrivilegeInfo> listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional<HivePrincipal> principal)
-
isImpersonationEnabled
public boolean isImpersonationEnabled()
-
openTransaction
public long openTransaction(HiveIdentity identity)
-
commitTransaction
public void commitTransaction(HiveIdentity identity, long transactionId)
-
sendTransactionHeartbeat
public void sendTransactionHeartbeat(HiveIdentity identity, long transactionId)
-
acquireSharedReadLock
public void acquireSharedReadLock(HiveIdentity identity, String queryId, long transactionId, List<SchemaTableName> fullTables, List<HivePartition> partitions)
-
getValidWriteIds
public String getValidWriteIds(HiveIdentity identity, List<SchemaTableName> tables, long currentTransactionId)
-
allocateWriteId
public long allocateWriteId(HiveIdentity identity, String dbName, String tableName, long transactionId)
-
acquireTableWriteLock
public void acquireTableWriteLock(HiveIdentity identity, String queryId, long transactionId, String dbName, String tableName, org.apache.hadoop.hive.metastore.api.DataOperationType operation, boolean isPartitioned)
-
updateTableWriteId
public void updateTableWriteId(HiveIdentity identity, String dbName, String tableName, long transactionId, long writeId, OptionalLong rowCountChange)
-
alterPartitions
public void alterPartitions(HiveIdentity identity, String dbName, String tableName, List<Partition> partitions, long writeId)
-
addDynamicPartitions
public void addDynamicPartitions(HiveIdentity identity, String dbName, String tableName, List<String> partitionNames, long transactionId, long writeId, AcidOperation operation)
-
alterTransactionalTable
public void alterTransactionalTable(HiveIdentity identity, Table table, long transactionId, long writeId, PrincipalPrivileges principalPrivileges)
-
-