@ThreadSafe public class ThriftHiveMetastore extends Object implements ThriftMetastore
| Constructor and Description |
|---|
ThriftHiveMetastore(MetastoreLocator metastoreLocator,
ThriftHiveMetastoreConfig thriftConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPartitions(String databaseName,
String tableName,
List<PartitionWithStatistics> partitionsWithStatistics) |
void |
alterDatabase(String databaseName,
org.apache.hadoop.hive.metastore.api.Database database) |
void |
alterPartition(String databaseName,
String tableName,
PartitionWithStatistics partitionWithStatistics) |
void |
alterTable(String databaseName,
String tableName,
org.apache.hadoop.hive.metastore.api.Table table) |
void |
createDatabase(org.apache.hadoop.hive.metastore.api.Database database) |
void |
createRole(String role,
String grantor) |
void |
createTable(org.apache.hadoop.hive.metastore.api.Table table) |
void |
dropDatabase(String databaseName) |
void |
dropPartition(String databaseName,
String tableName,
List<String> parts,
boolean deleteData) |
void |
dropRole(String role) |
void |
dropTable(String databaseName,
String tableName,
boolean deleteData) |
List<String> |
getAllDatabases() |
Optional<List<String>> |
getAllTables(String databaseName) |
Optional<List<String>> |
getAllViews(String databaseName) |
Optional<org.apache.hadoop.hive.metastore.api.Database> |
getDatabase(String databaseName) |
Optional<List<org.apache.hadoop.hive.metastore.api.FieldSchema>> |
getFields(String databaseName,
String tableName) |
Optional<org.apache.hadoop.hive.metastore.api.Partition> |
getPartition(String databaseName,
String tableName,
List<String> partitionValues) |
Optional<List<String>> |
getPartitionNames(String databaseName,
String tableName) |
Optional<List<String>> |
getPartitionNamesByParts(String databaseName,
String tableName,
List<String> parts) |
List<org.apache.hadoop.hive.metastore.api.Partition> |
getPartitionsByNames(String databaseName,
String tableName,
List<String> partitionNames) |
Map<String,PartitionStatistics> |
getPartitionStatistics(String databaseName,
String tableName,
Set<String> partitionNames) |
ThriftHiveMetastoreStats |
getStats() |
Set<ColumnStatisticType> |
getSupportedColumnStatistics(Type type) |
Optional<org.apache.hadoop.hive.metastore.api.Table> |
getTable(String databaseName,
String tableName) |
PartitionStatistics |
getTableStatistics(String databaseName,
String tableName) |
void |
grantRoles(Set<String> roles,
Set<HivePrincipal> grantees,
boolean withAdminOption,
HivePrincipal grantor) |
void |
grantTablePrivileges(String databaseName,
String tableName,
HivePrincipal grantee,
Set<HivePrivilegeInfo> privileges) |
Set<RoleGrant> |
listRoleGrants(HivePrincipal principal) |
Set<String> |
listRoles() |
Set<HivePrivilegeInfo> |
listTablePrivileges(String databaseName,
String tableName,
HivePrincipal principal) |
void |
revokeRoles(Set<String> roles,
Set<HivePrincipal> grantees,
boolean adminOptionFor,
HivePrincipal grantor) |
void |
revokeTablePrivileges(String databaseName,
String tableName,
HivePrincipal grantee,
Set<HivePrivilegeInfo> privileges) |
void |
updatePartitionStatistics(String databaseName,
String tableName,
String partitionName,
Function<PartitionStatistics,PartitionStatistics> update) |
void |
updateTableStatistics(String databaseName,
String tableName,
Function<PartitionStatistics,PartitionStatistics> update) |
@Inject public ThriftHiveMetastore(MetastoreLocator metastoreLocator, ThriftHiveMetastoreConfig thriftConfig)
public ThriftHiveMetastoreStats getStats()
public List<String> getAllDatabases()
getAllDatabases in interface ThriftMetastorepublic Optional<org.apache.hadoop.hive.metastore.api.Database> getDatabase(String databaseName)
getDatabase in interface ThriftMetastorepublic Optional<List<String>> getAllTables(String databaseName)
getAllTables in interface ThriftMetastorepublic Optional<org.apache.hadoop.hive.metastore.api.Table> getTable(String databaseName, String tableName)
getTable in interface ThriftMetastorepublic Set<ColumnStatisticType> getSupportedColumnStatistics(Type type)
getSupportedColumnStatistics in interface ThriftMetastorepublic PartitionStatistics getTableStatistics(String databaseName, String tableName)
getTableStatistics in interface ThriftMetastorepublic Map<String,PartitionStatistics> getPartitionStatistics(String databaseName, String tableName, Set<String> partitionNames)
getPartitionStatistics in interface ThriftMetastorepublic Optional<List<org.apache.hadoop.hive.metastore.api.FieldSchema>> getFields(String databaseName, String tableName)
getFields in interface ThriftMetastorepublic void updateTableStatistics(String databaseName, String tableName, Function<PartitionStatistics,PartitionStatistics> update)
updateTableStatistics in interface ThriftMetastorepublic void updatePartitionStatistics(String databaseName, String tableName, 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 withAdminOption, HivePrincipal grantor)
grantRoles in interface ThriftMetastorepublic void revokeRoles(Set<String> roles, Set<HivePrincipal> grantees, boolean adminOptionFor, HivePrincipal grantor)
revokeRoles in interface ThriftMetastorepublic Set<RoleGrant> listRoleGrants(HivePrincipal principal)
listRoleGrants in interface ThriftMetastorepublic Optional<List<String>> getAllViews(String databaseName)
getAllViews in interface ThriftMetastorepublic void createDatabase(org.apache.hadoop.hive.metastore.api.Database database)
createDatabase in interface ThriftMetastorepublic void dropDatabase(String databaseName)
dropDatabase in interface ThriftMetastorepublic void alterDatabase(String databaseName, org.apache.hadoop.hive.metastore.api.Database database)
alterDatabase in interface ThriftMetastorepublic void createTable(org.apache.hadoop.hive.metastore.api.Table table)
createTable in interface ThriftMetastorepublic void dropTable(String databaseName, String tableName, boolean deleteData)
dropTable in interface ThriftMetastorepublic void alterTable(String databaseName, String tableName, org.apache.hadoop.hive.metastore.api.Table table)
alterTable in interface ThriftMetastorepublic Optional<List<String>> getPartitionNames(String databaseName, String tableName)
getPartitionNames in interface ThriftMetastorepublic Optional<List<String>> getPartitionNamesByParts(String databaseName, String tableName, List<String> parts)
getPartitionNamesByParts in interface ThriftMetastorepublic void addPartitions(String databaseName, String tableName, List<PartitionWithStatistics> partitionsWithStatistics)
addPartitions in interface ThriftMetastorepublic void dropPartition(String databaseName, String tableName, List<String> parts, boolean deleteData)
dropPartition in interface ThriftMetastorepublic void alterPartition(String databaseName, String tableName, PartitionWithStatistics partitionWithStatistics)
alterPartition in interface ThriftMetastorepublic Optional<org.apache.hadoop.hive.metastore.api.Partition> getPartition(String databaseName, String tableName, List<String> partitionValues)
getPartition in interface ThriftMetastorepublic List<org.apache.hadoop.hive.metastore.api.Partition> getPartitionsByNames(String databaseName, String tableName, List<String> partitionNames)
getPartitionsByNames in interface ThriftMetastorepublic void grantTablePrivileges(String databaseName, String tableName, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
grantTablePrivileges in interface ThriftMetastorepublic void revokeTablePrivileges(String databaseName, String tableName, HivePrincipal grantee, Set<HivePrivilegeInfo> privileges)
revokeTablePrivileges in interface ThriftMetastorepublic Set<HivePrivilegeInfo> listTablePrivileges(String databaseName, String tableName, HivePrincipal principal)
listTablePrivileges in interface ThriftMetastoreCopyright © 2012–2019. All rights reserved.