Class FileHiveMetastore
java.lang.Object
io.trino.plugin.hive.metastore.file.FileHiveMetastore
- All Implemented Interfaces:
HiveMetastore
-
Constructor Summary
ConstructorsConstructorDescriptionFileHiveMetastore(NodeVersion nodeVersion, TrinoFileSystemFactory fileSystemFactory, boolean hideDeltaLakeTables, FileHiveMetastoreConfig config) -
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 partitionWithStatistics) voidvoidcommentTable(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> partitionValues, 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) 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, checkSupportsTransactions, commitTransaction, getConfigValue, getValidWriteIds, openTransaction, sendTransactionHeartbeat, updateTableWriteId, useSparkTableStatistics
-
Constructor Details
-
FileHiveMetastore
public FileHiveMetastore(NodeVersion nodeVersion, TrinoFileSystemFactory fileSystemFactory, boolean hideDeltaLakeTables, FileHiveMetastoreConfig config)
-
-
Method Details
-
createDatabase
- Specified by:
createDatabasein interfaceHiveMetastore
-
dropDatabase
- Specified by:
dropDatabasein interfaceHiveMetastore
-
renameDatabase
- Specified by:
renameDatabasein interfaceHiveMetastore
-
setDatabaseOwner
- Specified by:
setDatabaseOwnerin interfaceHiveMetastore
-
getDatabase
- Specified by:
getDatabasein interfaceHiveMetastore
-
getAllDatabases
- Specified by:
getAllDatabasesin interfaceHiveMetastore
-
createTable
- Specified by:
createTablein interfaceHiveMetastore
-
getTable
-
setTableOwner
- Specified by:
setTableOwnerin interfaceHiveMetastore
-
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
-
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
-
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
-
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
-
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> partitionValues, boolean deleteData) - Specified by:
dropPartitionin interfaceHiveMetastore
-
alterPartition
public void alterPartition(String databaseName, String tableName, PartitionWithStatistics partitionWithStatistics) - 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
-
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
-
listTablePrivileges
public Set<HivePrivilegeInfo> listTablePrivileges(String databaseName, String tableName, Optional<String> tableOwner, Optional<HivePrincipal> principal) - Specified by:
listTablePrivilegesin 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
-
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
-