@ThreadSafe public class ThriftHiveMetastore extends Object implements ThriftMetastore
| Constructor and Description |
|---|
ThriftHiveMetastore(MetastoreLocator metastoreLocator,
HiveConfig hiveConfig,
ThriftMetastoreConfig thriftConfig,
HiveAuthenticationConfig authenticationConfig,
HdfsEnvironment hdfsEnvironment) |
| Modifier and Type | Method and Description |
|---|---|
void |
acquireSharedReadLock(HiveIdentity identity,
String queryId,
long transactionId,
List<SchemaTableName> fullTables,
List<HivePartition> partitions) |
void |
addPartitions(HiveIdentity identity,
String databaseName,
String tableName,
List<PartitionWithStatistics> partitionsWithStatistics) |
void |
alterDatabase(HiveIdentity identity,
String databaseName,
org.apache.hadoop.hive.metastore.api.Database database) |
void |
alterPartition(HiveIdentity identity,
String databaseName,
String tableName,
PartitionWithStatistics partitionWithStatistics) |
void |
alterTable(HiveIdentity identity,
String databaseName,
String tableName,
org.apache.hadoop.hive.metastore.api.Table table) |
void |
commitTransaction(HiveIdentity identity,
long transactionId) |
void |
createDatabase(HiveIdentity identity,
org.apache.hadoop.hive.metastore.api.Database database) |
void |
createRole(String role,
String grantor) |
void |
createTable(HiveIdentity identity,
org.apache.hadoop.hive.metastore.api.Table table) |
void |
dropDatabase(HiveIdentity identity,
String databaseName) |
void |
dropPartition(HiveIdentity identity,
String databaseName,
String tableName,
List<String> parts,
boolean deleteData) |
void |
dropRole(String role) |
void |
dropTable(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<org.apache.hadoop.hive.metastore.api.Database> |
getDatabase(String databaseName) |
Optional<List<org.apache.hadoop.hive.metastore.api.FieldSchema>> |
getFields(HiveIdentity identity,
String databaseName,
String tableName) |
Optional<org.apache.hadoop.hive.metastore.api.Partition> |
getPartition(HiveIdentity identity,
String databaseName,
String tableName,
List<String> partitionValues) |
Optional<List<String>> |
getPartitionNames(HiveIdentity identity,
String databaseName,
String tableName) |
Optional<List<String>> |
getPartitionNamesByParts(HiveIdentity identity,
String databaseName,
String tableName,
List<String> parts) |
List<org.apache.hadoop.hive.metastore.api.Partition> |
getPartitionsByNames(HiveIdentity identity,
String databaseName,
String tableName,
List<String> partitionNames) |
Map<String,PartitionStatistics> |
getPartitionStatistics(HiveIdentity identity,
org.apache.hadoop.hive.metastore.api.Table table,
List<org.apache.hadoop.hive.metastore.api.Partition> partitions) |
ThriftMetastoreStats |
getStats() |
Set<ColumnStatisticType> |
getSupportedColumnStatistics(Type type) |
Optional<org.apache.hadoop.hive.metastore.api.Table> |
getTable(HiveIdentity identity,
String databaseName,
String tableName) |
PartitionStatistics |
getTableStatistics(HiveIdentity identity,
org.apache.hadoop.hive.metastore.api.Table table) |
List<String> |
getTablesWithParameter(String databaseName,
String parameterKey,
String parameterValue) |
String |
getValidWriteIds(HiveIdentity identity,
List<SchemaTableName> tables,
long currentTransactionId) |
void |
grantRoles(Set<String> roles,
Set<HivePrincipal> grantees,
boolean adminOption,
HivePrincipal grantor) |
void |
grantTablePrivileges(String databaseName,
String tableName,
String tableOwner,
HivePrincipal grantee,
Set<HivePrivilegeInfo> privileges) |
boolean |
isImpersonationEnabled() |
Set<RoleGrant> |
listRoleGrants(HivePrincipal principal) |
Set<String> |
listRoles() |
Set<HivePrivilegeInfo> |
listTablePrivileges(String databaseName,
String tableName,
String tableOwner,
Optional<HivePrincipal> principal) |
long |
openTransaction(HiveIdentity identity) |
void |
revokeRoles(Set<String> roles,
Set<HivePrincipal> grantees,
boolean adminOption,
HivePrincipal grantor) |
void |
revokeTablePrivileges(String databaseName,
String tableName,
String tableOwner,
HivePrincipal grantee,
Set<HivePrivilegeInfo> privileges) |
void |
sendTransactionHeartbeat(HiveIdentity identity,
long transactionId) |
void |
updatePartitionStatistics(HiveIdentity identity,
org.apache.hadoop.hive.metastore.api.Table table,
String partitionName,
Function<PartitionStatistics,PartitionStatistics> update) |
void |
updateTableStatistics(HiveIdentity identity,
String databaseName,
String tableName,
Function<PartitionStatistics,PartitionStatistics> update) |
@Inject public ThriftHiveMetastore(MetastoreLocator metastoreLocator, HiveConfig hiveConfig, ThriftMetastoreConfig thriftConfig, HiveAuthenticationConfig authenticationConfig, HdfsEnvironment hdfsEnvironment)
public ThriftMetastoreStats getStats()
public List<String> getAllDatabases()
getAllDatabases in interface ThriftMetastorepublic Optional<org.apache.hadoop.hive.metastore.api.Database> getDatabase(String databaseName)
getDatabase in interface ThriftMetastorepublic List<String> getAllTables(String databaseName)
getAllTables in interface ThriftMetastorepublic List<String> getTablesWithParameter(String databaseName, String parameterKey, String parameterValue)
getTablesWithParameter in interface ThriftMetastorepublic Optional<org.apache.hadoop.hive.metastore.api.Table> getTable(HiveIdentity identity, String databaseName, String tableName)
getTable in interface ThriftMetastorepublic Set<ColumnStatisticType> getSupportedColumnStatistics(Type type)
getSupportedColumnStatistics in interface ThriftMetastorepublic PartitionStatistics getTableStatistics(HiveIdentity identity, org.apache.hadoop.hive.metastore.api.Table table)
getTableStatistics in interface ThriftMetastorepublic Map<String,PartitionStatistics> getPartitionStatistics(HiveIdentity identity, org.apache.hadoop.hive.metastore.api.Table table, List<org.apache.hadoop.hive.metastore.api.Partition> partitions)
getPartitionStatistics in interface ThriftMetastorepublic Optional<List<org.apache.hadoop.hive.metastore.api.FieldSchema>> getFields(HiveIdentity identity, String databaseName, String tableName)
getFields in interface ThriftMetastorepublic void updateTableStatistics(HiveIdentity identity, String databaseName, String tableName, Function<PartitionStatistics,PartitionStatistics> update)
updateTableStatistics in interface ThriftMetastorepublic void updatePartitionStatistics(HiveIdentity identity, org.apache.hadoop.hive.metastore.api.Table table, String partitionName, Function<PartitionStatistics,PartitionStatistics> update)
updatePartitionStatistics in interface ThriftMetastorepublic void createRole(String role, String grantor)
createRole in interface ThriftMetastorepublic void dropRole(String role)
dropRole in interface ThriftMetastorepublic Set<String> listRoles()
listRoles in interface ThriftMetastorepublic void grantRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor)
grantRoles in interface ThriftMetastorepublic void revokeRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, HivePrincipal grantor)
revokeRoles in interface ThriftMetastorepublic Set<RoleGrant> listRoleGrants(HivePrincipal principal)
listRoleGrants in interface ThriftMetastorepublic List<String> getAllViews(String databaseName)
getAllViews in interface ThriftMetastorepublic void createDatabase(HiveIdentity identity, org.apache.hadoop.hive.metastore.api.Database database)
createDatabase in interface ThriftMetastorepublic void dropDatabase(HiveIdentity identity, String databaseName)
dropDatabase in interface ThriftMetastorepublic void alterDatabase(HiveIdentity identity, String databaseName, org.apache.hadoop.hive.metastore.api.Database database)
alterDatabase in interface ThriftMetastorepublic void createTable(HiveIdentity identity, org.apache.hadoop.hive.metastore.api.Table table)
createTable in interface ThriftMetastorepublic void dropTable(HiveIdentity identity, String databaseName, String tableName, boolean deleteData)
dropTable in interface ThriftMetastorepublic void alterTable(HiveIdentity identity, String databaseName, String tableName, org.apache.hadoop.hive.metastore.api.Table table)
alterTable in interface ThriftMetastorepublic Optional<List<String>> getPartitionNames(HiveIdentity identity, String databaseName, String tableName)
getPartitionNames in interface ThriftMetastorepublic Optional<List<String>> getPartitionNamesByParts(HiveIdentity identity, String databaseName, String tableName, List<String> parts)
getPartitionNamesByParts in interface ThriftMetastorepublic void addPartitions(HiveIdentity identity, String databaseName, String tableName, List<PartitionWithStatistics> partitionsWithStatistics)
addPartitions in interface ThriftMetastorepublic void dropPartition(HiveIdentity identity, String databaseName, String tableName, List<String> parts, boolean deleteData)
dropPartition in interface ThriftMetastorepublic void alterPartition(HiveIdentity identity, String databaseName, String tableName, PartitionWithStatistics partitionWithStatistics)
alterPartition in interface ThriftMetastorepublic Optional<org.apache.hadoop.hive.metastore.api.Partition> getPartition(HiveIdentity identity, String databaseName, String tableName, List<String> partitionValues)
getPartition in interface ThriftMetastorepublic List<org.apache.hadoop.hive.metastore.api.Partition> getPartitionsByNames(HiveIdentity identity, String databaseName, String tableName, List<String> partitionNames)
getPartitionsByNames in interface ThriftMetastorepublic void grantTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
grantTablePrivileges in interface ThriftMetastorepublic void revokeTablePrivileges(String databaseName, String tableName, String tableOwner, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
revokeTablePrivileges in interface ThriftMetastorepublic Set<HivePrivilegeInfo> listTablePrivileges(String databaseName, String tableName, String tableOwner, Optional<HivePrincipal> principal)
listTablePrivileges in interface ThriftMetastoreprincipal - when empty, all table privileges are returnedpublic long openTransaction(HiveIdentity identity)
openTransaction in interface ThriftMetastorepublic void commitTransaction(HiveIdentity identity, long transactionId)
commitTransaction in interface ThriftMetastorepublic void sendTransactionHeartbeat(HiveIdentity identity, long transactionId)
sendTransactionHeartbeat in interface ThriftMetastorepublic void acquireSharedReadLock(HiveIdentity identity, String queryId, long transactionId, List<SchemaTableName> fullTables, List<HivePartition> partitions)
acquireSharedReadLock in interface ThriftMetastorepublic String getValidWriteIds(HiveIdentity identity, List<SchemaTableName> tables, long currentTransactionId)
getValidWriteIds in interface ThriftMetastorepublic Optional<String> getConfigValue(String name)
getConfigValue in interface ThriftMetastorepublic boolean isImpersonationEnabled()
isImpersonationEnabled in interface ThriftMetastoreCopyright © 2012–2020. All rights reserved.