Class BridgingHiveMetastore
java.lang.Object
io.trino.plugin.hive.metastore.thrift.BridgingHiveMetastore
- All Implemented Interfaces:
HiveMetastore
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabortTransaction(long transactionId) voidacquireSharedReadLock(AcidTransactionOwner transactionOwner, String queryId, long transactionId, List<SchemaTableName> fullTables, List<HivePartition> partitions) voidacquireTableWriteLock(AcidTransactionOwner transactionOwner, String queryId, long transactionId, String dbName, String tableName, AcidOperation acidOperation, boolean isDynamicPartitionWrite) voidaddColumn(String databaseName, String tableName, String columnName, HiveType columnType, String columnComment) voidaddDynamicPartitions(String dbName, String tableName, List<String> partitionNames, long transactionId, long writeId, AcidOperation operation) voidaddPartitions(String databaseName, String tableName, List<PartitionWithStatistics> partitions) longallocateWriteId(String dbName, String tableName, long transactionId) voidalterPartition(String databaseName, String tableName, PartitionWithStatistics partition) voidalterTransactionalTable(Table table, long transactionId, long writeId, PrincipalPrivileges principalPrivileges) voidvoidvoidcommentTable(String databaseName, String tableName, Optional<String> comment) voidcommitTransaction(long transactionId) voidcreateDatabase(Database database) voidcreateFunction(String databaseName, String functionName, LanguageFunction function) voidcreateRole(String role, String grantor) voidcreateTable(Table table, PrincipalPrivileges principalPrivileges) voiddropColumn(String databaseName, String tableName, String columnName) voiddropDatabase(String databaseName, boolean deleteData) voiddropFunction(String databaseName, String functionName, String signatureToken) voiddropPartition(String databaseName, String tableName, List<String> parts, boolean deleteData) voidvoidbooleanfunctionExists(String databaseName, String functionName, String signatureToken) getAllFunctions(String databaseName) getConfigValue(String name) getDatabase(String databaseName) getFunctions(String databaseName, String functionName) getPartition(Table table, List<String> partitionValues) getPartitionColumnStatistics(String databaseName, String tableName, Set<String> partitionNames, Set<String> columnNames) getPartitionNamesByFilter(String databaseName, String tableName, List<String> columnNames, TupleDomain<String> partitionKeysFilter) getPartitionsByNames(Table table, List<String> partitionNames) getTableColumnStatistics(String databaseName, String tableName, Set<String> columnNames) getValidWriteIds(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, HivePrincipal grantor, Set<HivePrivilegeInfo.HivePrivilege> privileges, boolean grantOption) listRoleGrants(HivePrincipal principal) listTablePrivileges(String databaseName, String tableName, Optional<String> tableOwner, Optional<HivePrincipal> principal) longopenTransaction(AcidTransactionOwner transactionOwner) voidrenameColumn(String databaseName, String tableName, String oldColumnName, String newColumnName) voidrenameDatabase(String databaseName, String newDatabaseName) voidrenameTable(String databaseName, String tableName, String newDatabaseName, String newTableName) voidreplaceFunction(String databaseName, String functionName, LanguageFunction function) voidreplaceTable(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, HivePrincipal grantor, Set<HivePrivilegeInfo.HivePrivilege> privileges, boolean grantOption) voidsendTransactionHeartbeat(long transactionId) voidsetDatabaseOwner(String databaseName, HivePrincipal principal) voidsetTableOwner(String databaseName, String tableName, HivePrincipal principal) voidupdatePartitionStatistics(Table table, StatisticsUpdateMode mode, Map<String, PartitionStatistics> partitionUpdates) voidupdateTableStatistics(String databaseName, String tableName, OptionalLong acidWriteId, StatisticsUpdateMode mode, PartitionStatistics statisticsUpdate) voidupdateTableWriteId(String dbName, String tableName, long transactionId, long writeId, OptionalLong rowCountChange) boolean
-
Constructor Details
-
BridgingHiveMetastore
-
-
Method Details
-
getDatabase
- Specified by:
getDatabasein interfaceHiveMetastore
-
getAllDatabases
- Specified by:
getAllDatabasesin interfaceHiveMetastore
-
getTable
-
getTableColumnStatistics
public Map<String,HiveColumnStatistics> getTableColumnStatistics(String databaseName, String tableName, Set<String> columnNames) - Specified by:
getTableColumnStatisticsin interfaceHiveMetastore
-
getPartitionColumnStatistics
public Map<String,Map<String, getPartitionColumnStatisticsHiveColumnStatistics>> (String databaseName, String tableName, Set<String> partitionNames, Set<String> columnNames) - Specified by:
getPartitionColumnStatisticsin interfaceHiveMetastore
-
useSparkTableStatistics
public boolean useSparkTableStatistics()- Specified by:
useSparkTableStatisticsin interfaceHiveMetastore
-
updateTableStatistics
public void updateTableStatistics(String databaseName, String tableName, OptionalLong acidWriteId, StatisticsUpdateMode mode, PartitionStatistics statisticsUpdate) - Specified by:
updateTableStatisticsin interfaceHiveMetastore
-
updatePartitionStatistics
public void updatePartitionStatistics(Table table, StatisticsUpdateMode mode, Map<String, PartitionStatistics> partitionUpdates) - Specified by:
updatePartitionStatisticsin interfaceHiveMetastore
-
getTables
- Specified by:
getTablesin interfaceHiveMetastore
-
createDatabase
- Specified by:
createDatabasein interfaceHiveMetastore
-
dropDatabase
- Specified by:
dropDatabasein interfaceHiveMetastore
-
renameDatabase
- Specified by:
renameDatabasein interfaceHiveMetastore
-
setDatabaseOwner
- Specified by:
setDatabaseOwnerin interfaceHiveMetastore
-
createTable
- Specified by:
createTablein interfaceHiveMetastore
-
dropTable
- Specified by:
dropTablein interfaceHiveMetastore
-
replaceTable
public void replaceTable(String databaseName, String tableName, Table newTable, PrincipalPrivileges principalPrivileges) - Specified by:
replaceTablein interfaceHiveMetastore
-
renameTable
public void renameTable(String databaseName, String tableName, String newDatabaseName, String newTableName) - Specified by:
renameTablein interfaceHiveMetastore
-
commentTable
- Specified by:
commentTablein interfaceHiveMetastore
-
setTableOwner
- Specified by:
setTableOwnerin interfaceHiveMetastore
-
commentColumn
public void commentColumn(String databaseName, String tableName, String columnName, Optional<String> comment) - Specified by:
commentColumnin interfaceHiveMetastore
-
addColumn
-
renameColumn
public void renameColumn(String databaseName, String tableName, String oldColumnName, String newColumnName) - Specified by:
renameColumnin interfaceHiveMetastore
-
dropColumn
- Specified by:
dropColumnin interfaceHiveMetastore
-
getPartition
- Specified by:
getPartitionin interfaceHiveMetastore
-
getPartitionNamesByFilter
public Optional<List<String>> getPartitionNamesByFilter(String databaseName, String tableName, List<String> columnNames, TupleDomain<String> partitionKeysFilter) - Specified by:
getPartitionNamesByFilterin interfaceHiveMetastore
-
getPartitionsByNames
public Map<String,Optional<Partition>> getPartitionsByNames(Table table, List<String> partitionNames) - Specified by:
getPartitionsByNamesin interfaceHiveMetastore
-
addPartitions
public void addPartitions(String databaseName, String tableName, List<PartitionWithStatistics> partitions) - Specified by:
addPartitionsin interfaceHiveMetastore
-
dropPartition
public void dropPartition(String databaseName, String tableName, List<String> parts, boolean deleteData) - Specified by:
dropPartitionin interfaceHiveMetastore
-
alterPartition
public void alterPartition(String databaseName, String tableName, PartitionWithStatistics partition) - Specified by:
alterPartitionin interfaceHiveMetastore
-
createRole
- Specified by:
createRolein interfaceHiveMetastore
-
dropRole
- Specified by:
dropRolein interfaceHiveMetastore
-
listRoles
- Specified by:
listRolesin interfaceHiveMetastore
-
grantRoles
public void grantRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor) - Specified by:
grantRolesin interfaceHiveMetastore
-
revokeRoles
public void revokeRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor) - Specified by:
revokeRolesin interfaceHiveMetastore
-
listRoleGrants
- Specified by:
listRoleGrantsin interfaceHiveMetastore
-
grantTablePrivileges
public void grantTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, HivePrincipal grantor, Set<HivePrivilegeInfo.HivePrivilege> privileges, boolean grantOption) - Specified by:
grantTablePrivilegesin interfaceHiveMetastore
-
revokeTablePrivileges
public void revokeTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, HivePrincipal grantor, Set<HivePrivilegeInfo.HivePrivilege> privileges, boolean grantOption) - Specified by:
revokeTablePrivilegesin interfaceHiveMetastore
-
listTablePrivileges
public Set<HivePrivilegeInfo> listTablePrivileges(String databaseName, String tableName, Optional<String> tableOwner, Optional<HivePrincipal> principal) - Specified by:
listTablePrivilegesin interfaceHiveMetastore
-
getConfigValue
- Specified by:
getConfigValuein interfaceHiveMetastore
-
checkSupportsTransactions
public void checkSupportsTransactions()- Specified by:
checkSupportsTransactionsin interfaceHiveMetastore
-
openTransaction
- Specified by:
openTransactionin interfaceHiveMetastore
-
commitTransaction
public void commitTransaction(long transactionId) - Specified by:
commitTransactionin interfaceHiveMetastore
-
abortTransaction
public void abortTransaction(long transactionId) - Specified by:
abortTransactionin interfaceHiveMetastore
-
sendTransactionHeartbeat
public void sendTransactionHeartbeat(long transactionId) - Specified by:
sendTransactionHeartbeatin interfaceHiveMetastore
-
getValidWriteIds
- Specified by:
getValidWriteIdsin interfaceHiveMetastore
-
allocateWriteId
- Specified by:
allocateWriteIdin interfaceHiveMetastore
-
acquireTableWriteLock
public void acquireTableWriteLock(AcidTransactionOwner transactionOwner, String queryId, long transactionId, String dbName, String tableName, AcidOperation acidOperation, boolean isDynamicPartitionWrite) - Specified by:
acquireTableWriteLockin interfaceHiveMetastore
-
updateTableWriteId
public void updateTableWriteId(String dbName, String tableName, long transactionId, long writeId, OptionalLong rowCountChange) - Specified by:
updateTableWriteIdin interfaceHiveMetastore
-
addDynamicPartitions
public void addDynamicPartitions(String dbName, String tableName, List<String> partitionNames, long transactionId, long writeId, AcidOperation operation) - Specified by:
addDynamicPartitionsin interfaceHiveMetastore
-
alterTransactionalTable
public void alterTransactionalTable(Table table, long transactionId, long writeId, PrincipalPrivileges principalPrivileges) - Specified by:
alterTransactionalTablein interfaceHiveMetastore
-
functionExists
- Specified by:
functionExistsin interfaceHiveMetastore
-
getAllFunctions
- Specified by:
getAllFunctionsin interfaceHiveMetastore
-
getFunctions
- Specified by:
getFunctionsin interfaceHiveMetastore
-
createFunction
- Specified by:
createFunctionin interfaceHiveMetastore
-
replaceFunction
- Specified by:
replaceFunctionin interfaceHiveMetastore
-
dropFunction
- Specified by:
dropFunctionin interfaceHiveMetastore
-