Class GlueHiveMetastore
java.lang.Object
io.trino.plugin.hive.metastore.glue.v1.GlueHiveMetastore
- All Implemented Interfaces:
HiveMetastore
-
Constructor Summary
ConstructorsConstructorDescriptionGlueHiveMetastore(TrinoFileSystemFactory fileSystemFactory, GlueHiveMetastoreConfig glueConfig, Executor partitionsReadExecutor, GlueColumnStatisticsProviderFactory columnStatisticsProviderFactory, com.amazonaws.services.glue.AWSGlueAsync glueClient, GlueMetastoreStats stats, Predicate<com.amazonaws.services.glue.model.Table> tableFilter) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(String databaseName, String tableName, String columnName, HiveType columnType, String columnComment) voidaddPartitions(String databaseName, String tableName, List<PartitionWithStatistics> partitions) voidalterPartition(String databaseName, String tableName, PartitionWithStatistics partition) voidvoidvoidcommentTable(String databaseName, String tableName, Optional<String> comment) 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) 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) Ex: Partition keys = ['a', 'b'] Partition names = ['a=1/b=2', 'a=2/b=2']getStats()getTableColumnStatistics(String databaseName, String tableName, Set<String> columnNames) 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) 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) 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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.metastore.HiveMetastore
abortTransaction, acquireSharedReadLock, acquireTableWriteLock, addDynamicPartitions, allocateWriteId, alterTransactionalTable, commitTransaction, getConfigValue, getValidWriteIds, openTransaction, sendTransactionHeartbeat, updateTableWriteId, useSparkTableStatistics
-
Constructor Details
-
GlueHiveMetastore
@Inject public GlueHiveMetastore(TrinoFileSystemFactory fileSystemFactory, GlueHiveMetastoreConfig glueConfig, Executor partitionsReadExecutor, GlueColumnStatisticsProviderFactory columnStatisticsProviderFactory, com.amazonaws.services.glue.AWSGlueAsync glueClient, GlueMetastoreStats stats, Predicate<com.amazonaws.services.glue.model.Table> tableFilter)
-
-
Method Details
-
getStats
-
getAllDatabases
- Specified by:
getAllDatabasesin interfaceHiveMetastore
-
getDatabase
- Specified by:
getDatabasein interfaceHiveMetastore
-
createDatabase
- Specified by:
createDatabasein interfaceHiveMetastore
-
dropDatabase
- Specified by:
dropDatabasein interfaceHiveMetastore
-
renameDatabase
- Specified by:
renameDatabasein interfaceHiveMetastore
-
setDatabaseOwner
- Specified by:
setDatabaseOwnerin interfaceHiveMetastore
-
getTables
- Specified by:
getTablesin interfaceHiveMetastore
-
getTable
-
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
-
getTableColumnStatistics
public Map<String,HiveColumnStatistics> getTableColumnStatistics(String databaseName, String tableName, Set<String> columnNames) - Specified by:
getTableColumnStatisticsin interfaceHiveMetastore
-
updateTableStatistics
public void updateTableStatistics(String databaseName, String tableName, OptionalLong acidWriteId, StatisticsUpdateMode mode, PartitionStatistics statisticsUpdate) - Specified by:
updateTableStatisticsin interfaceHiveMetastore
-
addColumn
-
renameColumn
public void renameColumn(String databaseName, String tableName, String oldColumnName, String newColumnName) - Specified by:
renameColumnin interfaceHiveMetastore
-
dropColumn
- Specified by:
dropColumnin interfaceHiveMetastore
-
commentColumn
public void commentColumn(String databaseName, String tableName, String columnName, Optional<String> comment) - Specified by:
commentColumnin interfaceHiveMetastore
-
getPartitionNamesByFilter
public Optional<List<String>> getPartitionNamesByFilter(String databaseName, String tableName, List<String> columnNames, TupleDomain<String> partitionKeysFilter) - Specified by:
getPartitionNamesByFilterin interfaceHiveMetastore
-
getPartition
- Specified by:
getPartitionin interfaceHiveMetastore
-
getPartitionsByNames
public Map<String,Optional<Partition>> getPartitionsByNames(Table table, List<String> partitionNames) Ex: Partition keys = ['a', 'b'] Partition names = ['a=1/b=2', 'a=2/b=2']- Specified by:
getPartitionsByNamesin interfaceHiveMetastore- Parameters:
partitionNames- List of full partition names- Returns:
- Mapping of partition name to the partition object
-
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
-
getPartitionColumnStatistics
public Map<String,Map<String, getPartitionColumnStatisticsHiveColumnStatistics>> (String databaseName, String tableName, Set<String> partitionNames, Set<String> columnNames) - Specified by:
getPartitionColumnStatisticsin interfaceHiveMetastore
-
updatePartitionStatistics
public void updatePartitionStatistics(Table table, StatisticsUpdateMode mode, Map<String, PartitionStatistics> partitionUpdates) - Specified by:
updatePartitionStatisticsin 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
-
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
-
checkSupportsTransactions
public void checkSupportsTransactions()- Specified by:
checkSupportsTransactionsin interfaceHiveMetastore
-