@Internal public class HiveMetastoreClientWrapper extends Object implements AutoCloseable
Constructor and Description |
---|
HiveMetastoreClientWrapper(HiveConf hiveConf,
HiveShim hiveShim) |
HiveMetastoreClientWrapper(HiveConf hiveConf,
String hiveVersion) |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.hive.metastore.api.Partition |
add_partition(org.apache.hadoop.hive.metastore.api.Partition partition) |
int |
add_partitions(List<org.apache.hadoop.hive.metastore.api.Partition> partitionList) |
void |
alter_partition(String databaseName,
String tableName,
org.apache.hadoop.hive.metastore.api.Partition partition) |
void |
alter_table(String databaseName,
String tableName,
org.apache.hadoop.hive.metastore.api.Table table) |
void |
alterDatabase(String name,
org.apache.hadoop.hive.metastore.api.Database database) |
void |
alterFunction(String databaseName,
String functionName,
org.apache.hadoop.hive.metastore.api.Function function) |
org.apache.hadoop.hive.metastore.api.LockResponse |
checkLock(long lockid) |
void |
close() |
void |
createDatabase(org.apache.hadoop.hive.metastore.api.Database database) |
void |
createFunction(org.apache.hadoop.hive.metastore.api.Function function) |
void |
createTable(org.apache.hadoop.hive.metastore.api.Table table) |
void |
createTableWithConstraints(org.apache.hadoop.hive.metastore.api.Table table,
org.apache.hadoop.conf.Configuration conf,
UniqueConstraint pk,
List<Byte> pkTraits,
List<String> notNullCols,
List<Byte> nnTraits) |
void |
dropDatabase(String name,
boolean deleteData,
boolean ignoreIfNotExists) |
void |
dropDatabase(String name,
boolean deleteData,
boolean ignoreIfNotExists,
boolean cascade) |
void |
dropFunction(String databaseName,
String functionName) |
boolean |
dropPartition(String databaseName,
String tableName,
List<String> partitionValues,
boolean deleteData) |
void |
dropTable(String databaseName,
String tableName) |
void |
dropTable(String dbName,
String tableName,
boolean deleteData,
boolean ignoreUnknownTable) |
List<String> |
getAllDatabases() |
List<String> |
getAllTables(String databaseName) |
org.apache.hadoop.hive.metastore.api.Database |
getDatabase(String name) |
List<String> |
getDatabases(String pattern) |
org.apache.hadoop.hive.metastore.api.Function |
getFunction(String databaseName,
String functionName) |
List<String> |
getFunctions(String databaseName,
String pattern) |
Set<String> |
getNotNullColumns(org.apache.hadoop.conf.Configuration conf,
String dbName,
String tableName) |
org.apache.hadoop.hive.metastore.api.Partition |
getPartition(String databaseName,
String tableName,
List<String> list) |
Map<String,List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj>> |
getPartitionColumnStatistics(String dbName,
String tableName,
List<String> partNames,
List<String> colNames) |
List<org.apache.hadoop.hive.metastore.api.Partition> |
getPartitionsByNames(String databaseName,
String tableName,
List<String> partitionNames) |
Optional<UniqueConstraint> |
getPrimaryKey(String dbName,
String tableName,
byte trait) |
org.apache.hadoop.hive.metastore.api.Table |
getTable(String databaseName,
String tableName) |
List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj> |
getTableColumnStatistics(String databaseName,
String tableName,
List<String> columnNames) |
List<String> |
getViews(String databaseName) |
List<String> |
listPartitionNames(String databaseName,
String tableName,
List<String> partitionValues,
short maxPartitions) |
List<String> |
listPartitionNames(String databaseName,
String tableName,
short maxPartitions) |
List<org.apache.hadoop.hive.metastore.api.Partition> |
listPartitions(String dbName,
String tblName,
List<String> partVals,
short max) |
List<org.apache.hadoop.hive.metastore.api.Partition> |
listPartitions(String dbName,
String tblName,
short max) |
org.apache.hadoop.hive.metastore.partition.spec.PartitionSpecProxy |
listPartitionSpecsByFilter(String dbName,
String tblName,
String filter,
short max) |
void |
loadPartition(org.apache.hadoop.fs.Path loadPath,
String tableName,
Map<String,String> partSpec,
boolean isSkewedStoreAsSubdir,
boolean replace,
boolean isSrcLocal) |
void |
loadTable(org.apache.hadoop.fs.Path loadPath,
String tableName,
boolean replace,
boolean isSrcLocal) |
org.apache.hadoop.hive.metastore.api.LockResponse |
lock(org.apache.hadoop.hive.metastore.api.LockRequest request) |
void |
renamePartition(String databaseName,
String tableName,
List<String> partitionValues,
org.apache.hadoop.hive.metastore.api.Partition partition) |
boolean |
tableExists(String databaseName,
String tableName) |
void |
unlock(long lockid) |
boolean |
updatePartitionColumnStatistics(org.apache.hadoop.hive.metastore.api.ColumnStatistics columnStatistics) |
boolean |
updateTableColumnStatistics(org.apache.hadoop.hive.metastore.api.ColumnStatistics columnStatistics) |
public void close()
close
in interface AutoCloseable
public List<String> getDatabases(String pattern) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public List<String> getAllDatabases() throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public List<String> getAllTables(String databaseName) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException, org.apache.hadoop.hive.metastore.api.UnknownDBException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.UnknownDBException
public void dropTable(String databaseName, String tableName) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public void dropTable(String dbName, String tableName, boolean deleteData, boolean ignoreUnknownTable) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.thrift.TException
public boolean tableExists(String databaseName, String tableName) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException, org.apache.hadoop.hive.metastore.api.UnknownDBException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.UnknownDBException
public org.apache.hadoop.hive.metastore.api.Database getDatabase(String name) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public org.apache.hadoop.hive.metastore.api.Table getTable(String databaseName, String tableName) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.thrift.TException
public org.apache.hadoop.hive.metastore.api.Partition add_partition(org.apache.hadoop.hive.metastore.api.Partition partition) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.AlreadyExistsException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.InvalidObjectException
org.apache.hadoop.hive.metastore.api.AlreadyExistsException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public int add_partitions(List<org.apache.hadoop.hive.metastore.api.Partition> partitionList) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.AlreadyExistsException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.InvalidObjectException
org.apache.hadoop.hive.metastore.api.AlreadyExistsException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public org.apache.hadoop.hive.metastore.api.Partition getPartition(String databaseName, String tableName, List<String> list) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public List<org.apache.hadoop.hive.metastore.api.Partition> getPartitionsByNames(String databaseName, String tableName, List<String> partitionNames) throws org.apache.thrift.TException
org.apache.thrift.TException
public List<String> listPartitionNames(String databaseName, String tableName, short maxPartitions) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public List<String> listPartitionNames(String databaseName, String tableName, List<String> partitionValues, short maxPartitions) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
public void createTable(org.apache.hadoop.hive.metastore.api.Table table) throws org.apache.hadoop.hive.metastore.api.AlreadyExistsException, org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.AlreadyExistsException
org.apache.hadoop.hive.metastore.api.InvalidObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.thrift.TException
public void createDatabase(org.apache.hadoop.hive.metastore.api.Database database) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.AlreadyExistsException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.InvalidObjectException
org.apache.hadoop.hive.metastore.api.AlreadyExistsException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public void dropDatabase(String name, boolean deleteData, boolean ignoreIfNotExists) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.InvalidOperationException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.InvalidOperationException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public void dropDatabase(String name, boolean deleteData, boolean ignoreIfNotExists, boolean cascade) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.InvalidOperationException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.InvalidOperationException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public void alterDatabase(String name, org.apache.hadoop.hive.metastore.api.Database database) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public boolean dropPartition(String databaseName, String tableName, List<String> partitionValues, boolean deleteData) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public void renamePartition(String databaseName, String tableName, List<String> partitionValues, org.apache.hadoop.hive.metastore.api.Partition partition) throws org.apache.hadoop.hive.metastore.api.InvalidOperationException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.InvalidOperationException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public void createFunction(org.apache.hadoop.hive.metastore.api.Function function) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.InvalidObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public void alterFunction(String databaseName, String functionName, org.apache.hadoop.hive.metastore.api.Function function) throws org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.InvalidObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public void dropFunction(String databaseName, String functionName) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.InvalidInputException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.InvalidObjectException
org.apache.hadoop.hive.metastore.api.InvalidInputException
org.apache.thrift.TException
public List<String> getFunctions(String databaseName, String pattern) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj> getTableColumnStatistics(String databaseName, String tableName, List<String> columnNames) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public Map<String,List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj>> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNames, List<String> colNames) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public boolean updateTableColumnStatistics(org.apache.hadoop.hive.metastore.api.ColumnStatistics columnStatistics) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException, org.apache.hadoop.hive.metastore.api.InvalidInputException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.InvalidObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.InvalidInputException
public boolean updatePartitionColumnStatistics(org.apache.hadoop.hive.metastore.api.ColumnStatistics columnStatistics) throws org.apache.hadoop.hive.metastore.api.NoSuchObjectException, org.apache.hadoop.hive.metastore.api.InvalidObjectException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException, org.apache.hadoop.hive.metastore.api.InvalidInputException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.InvalidObjectException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.InvalidInputException
public List<org.apache.hadoop.hive.metastore.api.Partition> listPartitions(String dbName, String tblName, List<String> partVals, short max) throws org.apache.thrift.TException
org.apache.thrift.TException
public List<org.apache.hadoop.hive.metastore.api.Partition> listPartitions(String dbName, String tblName, short max) throws org.apache.thrift.TException
org.apache.thrift.TException
public org.apache.hadoop.hive.metastore.partition.spec.PartitionSpecProxy listPartitionSpecsByFilter(String dbName, String tblName, String filter, short max) throws org.apache.thrift.TException
org.apache.thrift.TException
public Set<String> getNotNullColumns(org.apache.hadoop.conf.Configuration conf, String dbName, String tableName)
public Optional<UniqueConstraint> getPrimaryKey(String dbName, String tableName, byte trait)
public List<String> getViews(String databaseName) throws org.apache.hadoop.hive.metastore.api.UnknownDBException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.UnknownDBException
org.apache.thrift.TException
public org.apache.hadoop.hive.metastore.api.Function getFunction(String databaseName, String functionName) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public void alter_table(String databaseName, String tableName, org.apache.hadoop.hive.metastore.api.Table table) throws org.apache.hadoop.hive.metastore.api.InvalidOperationException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.InvalidOperationException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public void alter_partition(String databaseName, String tableName, org.apache.hadoop.hive.metastore.api.Partition partition) throws org.apache.hadoop.hive.metastore.api.InvalidOperationException, org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.InvalidOperationException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
public void createTableWithConstraints(org.apache.hadoop.hive.metastore.api.Table table, org.apache.hadoop.conf.Configuration conf, UniqueConstraint pk, List<Byte> pkTraits, List<String> notNullCols, List<Byte> nnTraits)
public org.apache.hadoop.hive.metastore.api.LockResponse checkLock(long lockid) throws org.apache.hadoop.hive.metastore.api.NoSuchTxnException, org.apache.hadoop.hive.metastore.api.TxnAbortedException, org.apache.hadoop.hive.metastore.api.NoSuchLockException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchTxnException
org.apache.hadoop.hive.metastore.api.TxnAbortedException
org.apache.hadoop.hive.metastore.api.NoSuchLockException
org.apache.thrift.TException
public org.apache.hadoop.hive.metastore.api.LockResponse lock(org.apache.hadoop.hive.metastore.api.LockRequest request) throws org.apache.hadoop.hive.metastore.api.NoSuchTxnException, org.apache.hadoop.hive.metastore.api.TxnAbortedException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchTxnException
org.apache.hadoop.hive.metastore.api.TxnAbortedException
org.apache.thrift.TException
public void unlock(long lockid) throws org.apache.hadoop.hive.metastore.api.NoSuchLockException, org.apache.hadoop.hive.metastore.api.TxnOpenException, org.apache.thrift.TException
org.apache.hadoop.hive.metastore.api.NoSuchLockException
org.apache.hadoop.hive.metastore.api.TxnOpenException
org.apache.thrift.TException
public void loadTable(org.apache.hadoop.fs.Path loadPath, String tableName, boolean replace, boolean isSrcLocal) throws org.apache.hadoop.hive.ql.metadata.HiveException
org.apache.hadoop.hive.ql.metadata.HiveException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.