@ThreadSafe public class FileHiveMetastore extends Object implements HiveMetastore
| Constructor and Description |
|---|
FileHiveMetastore(HdfsEnvironment hdfsEnvironment,
FileHiveMetastoreConfig config) |
FileHiveMetastore(HdfsEnvironment hdfsEnvironment,
String catalogDirectory,
String metastoreUser) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquireSharedReadLock, commitTransaction, getConfigValue, getValidWriteIds, openTransaction, sendTransactionHeartbeat@Inject public FileHiveMetastore(HdfsEnvironment hdfsEnvironment, FileHiveMetastoreConfig config)
public FileHiveMetastore(HdfsEnvironment hdfsEnvironment, String catalogDirectory, String metastoreUser)
public static FileHiveMetastore createTestingFileHiveMetastore(File catalogDirectory)
public void createDatabase(HiveIdentity identity, Database database)
createDatabase in interface HiveMetastorepublic void dropDatabase(HiveIdentity identity, String databaseName)
dropDatabase in interface HiveMetastorepublic void renameDatabase(HiveIdentity identity, String databaseName, String newDatabaseName)
renameDatabase in interface HiveMetastorepublic void setDatabaseOwner(HiveIdentity identity, String databaseName, HivePrincipal principal)
setDatabaseOwner in interface HiveMetastorepublic Optional<Database> getDatabase(String databaseName)
getDatabase in interface HiveMetastorepublic List<String> getAllDatabases()
getAllDatabases in interface HiveMetastorepublic void createTable(HiveIdentity identity, Table table, PrincipalPrivileges principalPrivileges)
createTable in interface HiveMetastorepublic Optional<Table> getTable(HiveIdentity identity, String databaseName, String tableName)
getTable in interface HiveMetastorepublic Set<ColumnStatisticType> getSupportedColumnStatistics(Type type)
getSupportedColumnStatistics in interface HiveMetastorepublic PartitionStatistics getTableStatistics(HiveIdentity identity, Table table)
getTableStatistics in interface HiveMetastorepublic Map<String,PartitionStatistics> getPartitionStatistics(HiveIdentity identity, Table table, List<Partition> partitions)
getPartitionStatistics in interface HiveMetastorepublic void updateTableStatistics(HiveIdentity identity, String databaseName, String tableName, Function<PartitionStatistics,PartitionStatistics> update)
updateTableStatistics in interface HiveMetastorepublic void updatePartitionStatistics(HiveIdentity identity, Table table, String partitionName, Function<PartitionStatistics,PartitionStatistics> update)
updatePartitionStatistics in interface HiveMetastorepublic List<String> getAllTables(String databaseName)
getAllTables in interface HiveMetastorepublic List<String> getTablesWithParameter(String databaseName, String parameterKey, String parameterValue)
getTablesWithParameter in interface HiveMetastorepublic List<String> getAllViews(String databaseName)
getAllViews in interface HiveMetastorepublic void dropTable(HiveIdentity identity, String databaseName, String tableName, boolean deleteData)
dropTable in interface HiveMetastorepublic void replaceTable(HiveIdentity identity, String databaseName, String tableName, Table newTable, PrincipalPrivileges principalPrivileges)
HiveMetastorereplaceTable in interface HiveMetastorepublic void renameTable(HiveIdentity identity, String databaseName, String tableName, String newDatabaseName, String newTableName)
renameTable in interface HiveMetastorepublic void commentTable(HiveIdentity identity, String databaseName, String tableName, Optional<String> comment)
commentTable in interface HiveMetastorepublic void addColumn(HiveIdentity identity, String databaseName, String tableName, String columnName, HiveType columnType, String columnComment)
addColumn in interface HiveMetastorepublic void renameColumn(HiveIdentity identity, String databaseName, String tableName, String oldColumnName, String newColumnName)
renameColumn in interface HiveMetastorepublic void dropColumn(HiveIdentity identity, String databaseName, String tableName, String columnName)
dropColumn in interface HiveMetastorepublic void addPartitions(HiveIdentity identity, String databaseName, String tableName, List<PartitionWithStatistics> partitions)
addPartitions in interface HiveMetastorepublic void dropPartition(HiveIdentity identity, String databaseName, String tableName, List<String> partitionValues, boolean deleteData)
dropPartition in interface HiveMetastorepublic void alterPartition(HiveIdentity identity, String databaseName, String tableName, PartitionWithStatistics partitionWithStatistics)
alterPartition in interface HiveMetastorepublic void createRole(String role, String grantor)
createRole in interface HiveMetastorepublic void dropRole(String role)
dropRole in interface HiveMetastorepublic Set<String> listRoles()
listRoles in interface HiveMetastorepublic void grantRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor)
grantRoles in interface HiveMetastorepublic void revokeRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor)
revokeRoles in interface HiveMetastorepublic Set<RoleGrant> listRoleGrants(HivePrincipal principal)
listRoleGrants in interface HiveMetastorepublic Optional<List<String>> getPartitionNames(HiveIdentity identity, String databaseName, String tableName)
getPartitionNames in interface HiveMetastorepublic Optional<Partition> getPartition(HiveIdentity identity, Table table, List<String> partitionValues)
getPartition in interface HiveMetastorepublic Optional<List<String>> getPartitionNamesByParts(HiveIdentity identity, String databaseName, String tableName, List<String> parts)
getPartitionNamesByParts in interface HiveMetastorepublic Map<String,Optional<Partition>> getPartitionsByNames(HiveIdentity identity, Table table, List<String> partitionNames)
getPartitionsByNames in interface HiveMetastorepublic Set<HivePrivilegeInfo> listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional<HivePrincipal> principal)
listTablePrivileges in interface HiveMetastoreprincipal - when empty, all table privileges are returnedpublic void grantTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
grantTablePrivileges in interface HiveMetastorepublic void revokeTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
revokeTablePrivileges in interface HiveMetastorepublic boolean isImpersonationEnabled()
isImpersonationEnabled in interface HiveMetastoreCopyright © 2012–2020. All rights reserved.