public class SessionHiveMetaStoreClient extends HiveMetaStoreClient implements IMetaStoreClient
IMetaStoreClient.IncompatibleMetastoreException, IMetaStoreClient.NotificationFilter
conf, LOG
Modifier and Type | Method and Description |
---|---|
void |
alter_table(String dbname,
String tbl_name,
Table new_tbl,
boolean cascade) |
void |
alter_table(String dbname,
String tbl_name,
Table new_tbl,
EnvironmentContext envContext) |
protected void |
create_table_with_environment_context(Table tbl,
EnvironmentContext envContext) |
boolean |
deleteTableColumnStatistics(String dbName,
String tableName,
String colName)
Delete table level column statistics given dbName, tableName and colName
|
protected void |
drop_table_with_environment_context(String dbname,
String name,
boolean deleteData,
EnvironmentContext envContext) |
PrincipalPrivilegeSet |
get_privilege_set(HiveObjectRef hiveObject,
String userName,
List<String> groupNames)
Return the privileges that the user, group have directly and indirectly through roles
on the given hiveObject
|
List<String> |
getAllTables(String dbName)
Get the names of all tables in the specified database.
|
List<FieldSchema> |
getSchema(String dbName,
String tableName) |
Table |
getTable(String dbname,
String name)
Get a table object.
|
List<ColumnStatisticsObj> |
getTableColumnStatistics(String dbName,
String tableName,
List<String> colNames)
Get table column statistics given dbName, tableName and multiple colName-s
|
List<Table> |
getTableObjectsByName(String dbName,
List<String> tableNames) |
List<String> |
getTables(String dbName,
String tablePattern)
Get the names of all tables in the specified database that satisfy the supplied
table name pattern.
|
boolean |
tableExists(String databaseName,
String tableName) |
boolean |
updateTableColumnStatistics(ColumnStatistics statsObj)
Write table level column statistics to persistent store
|
add_partition, add_partition, add_partitions_pspec, add_partitions, add_partitions, addDynamicPartitions, alter_index, alter_partition, alter_partitions, alter_table, alterDatabase, alterFunction, appendPartition, appendPartition, appendPartition, appendPartition, appendPartitionByName, appendPartitionByName, cancelDelegationToken, checkLock, close, commitTxn, compact, create_role, createDatabase, createFunction, createIndex, createTable, createTable, createType, deepCopy, deepCopy, deepCopyFieldSchemas, deletePartitionColumnStatistics, drop_role, dropDatabase, dropDatabase, dropDatabase, dropFunction, dropIndex, dropPartition, dropPartition, dropPartition, dropPartition, dropPartition, dropPartition, dropPartition, dropPartitionByName, dropPartitionByName, dropPartitions, dropPartitions, dropPartitions, dropTable, dropTable, dropTable, dropTable, dropTable, dropType, exchange_partition, fireListenerEvent, get_principals_in_role, get_role_grants_for_principal, getAggrColStatsFor, getAllDatabases, getConfigValue, getCurrentNotificationEventId, getDatabase, getDatabases, getDelegationToken, getDelegationToken, getFields, getFunction, getFunctions, getIndex, getMetaConf, getNextNotification, getPartition, getPartition, getPartitionColumnStatistics, getPartitionsByNames, getPartitionWithAuthInfo, getTable, getTokenStrForm, getType, getTypeAll, getValidTxns, getValidTxns, grant_privileges, grant_role, heartbeat, heartbeatTxnRange, isCompatibleWith, isPartitionMarkedForEvent, list_privileges, list_roles, listIndexes, listIndexNames, listPartitionNames, listPartitionNames, listPartitions, listPartitions, listPartitionsByExpr, listPartitionsByFilter, listPartitionSpecs, listPartitionSpecsByFilter, listPartitionsWithAuthInfo, listPartitionsWithAuthInfo, listRoleNames, listTableNamesByFilter, lock, markPartitionForEvent, newSynchronizedClient, openTxn, openTxns, partitionNameToSpec, partitionNameToVals, reconnect, renamePartition, renewDelegationToken, revoke_privileges, revoke_role, rollbackTxn, setHiveAddedJars, setMetaConf, setPartitionColumnStatistics, showCompactions, showLocks, showTxns, tableExists, unlock, updatePartitionColumnStatistics, validatePartitionNameCharacters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add_partition, add_partitions_pspec, add_partitions, add_partitions, addDynamicPartitions, alter_index, alter_partition, alter_partitions, alter_table, alterDatabase, alterFunction, appendPartition, appendPartition, cancelDelegationToken, checkLock, close, commitTxn, compact, create_role, createDatabase, createFunction, createIndex, createTable, deletePartitionColumnStatistics, drop_role, dropDatabase, dropDatabase, dropDatabase, dropFunction, dropIndex, dropPartition, dropPartition, dropPartition, dropPartitions, dropPartitions, dropPartitions, dropTable, dropTable, dropTable, dropTable, exchange_partition, fireListenerEvent, get_principals_in_role, get_role_grants_for_principal, getAggrColStatsFor, getAllDatabases, getConfigValue, getCurrentNotificationEventId, getDatabase, getDatabases, getDelegationToken, getFields, getFunction, getFunctions, getIndex, getMetaConf, getNextNotification, getPartition, getPartition, getPartitionColumnStatistics, getPartitionsByNames, getPartitionWithAuthInfo, getTable, getTokenStrForm, getValidTxns, getValidTxns, grant_privileges, grant_role, heartbeat, heartbeatTxnRange, isCompatibleWith, isPartitionMarkedForEvent, list_privileges, list_roles, listIndexes, listIndexNames, listPartitionNames, listPartitionNames, listPartitions, listPartitions, listPartitionsByExpr, listPartitionsByFilter, listPartitionSpecs, listPartitionSpecsByFilter, listPartitionsWithAuthInfo, listPartitionsWithAuthInfo, listRoleNames, listTableNamesByFilter, lock, markPartitionForEvent, openTxn, openTxns, partitionNameToSpec, partitionNameToVals, reconnect, renamePartition, renewDelegationToken, revoke_privileges, revoke_role, rollbackTxn, setHiveAddedJars, setMetaConf, setPartitionColumnStatistics, showCompactions, showLocks, showTxns, tableExists, unlock, updatePartitionColumnStatistics, validatePartitionNameCharacters
protected void create_table_with_environment_context(Table tbl, EnvironmentContext envContext) throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, org.apache.thrift.TException
create_table_with_environment_context
in class HiveMetaStoreClient
AlreadyExistsException
InvalidObjectException
MetaException
NoSuchObjectException
org.apache.thrift.TException
protected void drop_table_with_environment_context(String dbname, String name, boolean deleteData, EnvironmentContext envContext) throws MetaException, org.apache.thrift.TException, NoSuchObjectException, UnsupportedOperationException
drop_table_with_environment_context
in class HiveMetaStoreClient
MetaException
org.apache.thrift.TException
NoSuchObjectException
UnsupportedOperationException
public Table getTable(String dbname, String name) throws MetaException, org.apache.thrift.TException, NoSuchObjectException
IMetaStoreClient
getTable
in interface IMetaStoreClient
getTable
in class HiveMetaStoreClient
dbname
- The database the table is located in.name
- Name of the table to fetch.MetaException
- Could not fetch the tableorg.apache.thrift.TException
- A thrift communication error occurredNoSuchObjectException
- In case the table wasn't found.ThriftHiveMetastore.Iface.get_table(java.lang.String,
java.lang.String)
public List<String> getAllTables(String dbName) throws MetaException
HiveMetaStoreClient
getAllTables
in interface IMetaStoreClient
getAllTables
in class HiveMetaStoreClient
MetaException
public List<String> getTables(String dbName, String tablePattern) throws MetaException
HiveMetaStoreClient
getTables
in interface IMetaStoreClient
getTables
in class HiveMetaStoreClient
MetaException
public List<Table> getTableObjectsByName(String dbName, List<String> tableNames) throws MetaException, InvalidOperationException, UnknownDBException, org.apache.thrift.TException
HiveMetaStoreClient
getTableObjectsByName
in interface IMetaStoreClient
getTableObjectsByName
in class HiveMetaStoreClient
dbName
- The database the tables are located in.tableNames
- The names of the tables to fetchMetaException
- Any other errorsInvalidOperationException
- The input to this operation is invalid (e.g., the list of tables names is null)UnknownDBException
- The requested database could not be fetched.org.apache.thrift.TException
- A thrift communication error occurredpublic boolean tableExists(String databaseName, String tableName) throws MetaException, org.apache.thrift.TException, UnknownDBException
tableExists
in interface IMetaStoreClient
tableExists
in class HiveMetaStoreClient
MetaException
org.apache.thrift.TException
UnknownDBException
public List<FieldSchema> getSchema(String dbName, String tableName) throws MetaException, org.apache.thrift.TException, UnknownTableException, UnknownDBException
getSchema
in interface IMetaStoreClient
getSchema
in class HiveMetaStoreClient
MetaException
UnknownTableException
UnknownDBException
org.apache.thrift.TException
ThriftHiveMetastore.Iface.get_schema(java.lang.String,
java.lang.String)
public void alter_table(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws InvalidOperationException, MetaException, org.apache.thrift.TException
alter_table
in interface IMetaStoreClient
alter_table
in class HiveMetaStoreClient
InvalidOperationException
MetaException
org.apache.thrift.TException
public void alter_table(String dbname, String tbl_name, Table new_tbl, EnvironmentContext envContext) throws InvalidOperationException, MetaException, org.apache.thrift.TException
alter_table
in class HiveMetaStoreClient
InvalidOperationException
MetaException
org.apache.thrift.TException
public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String userName, List<String> groupNames) throws MetaException, org.apache.thrift.TException
IMetaStoreClient
get_privilege_set
in interface IMetaStoreClient
get_privilege_set
in class HiveMetaStoreClient
MetaException
org.apache.thrift.TException
public boolean updateTableColumnStatistics(ColumnStatistics statsObj) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException, InvalidInputException
updateTableColumnStatistics
in interface IMetaStoreClient
updateTableColumnStatistics
in class HiveMetaStoreClient
NoSuchObjectException
InvalidObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
public List<ColumnStatisticsObj> getTableColumnStatistics(String dbName, String tableName, List<String> colNames) throws NoSuchObjectException, MetaException, org.apache.thrift.TException, InvalidInputException, InvalidObjectException
getTableColumnStatistics
in interface IMetaStoreClient
getTableColumnStatistics
in class HiveMetaStoreClient
NoSuchObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
InvalidObjectException
public boolean deleteTableColumnStatistics(String dbName, String tableName, String colName) throws NoSuchObjectException, InvalidObjectException, MetaException, org.apache.thrift.TException, InvalidInputException
deleteTableColumnStatistics
in interface IMetaStoreClient
deleteTableColumnStatistics
in class HiveMetaStoreClient
NoSuchObjectException
InvalidObjectException
MetaException
org.apache.thrift.TException
InvalidInputException
Copyright © 2017 The Apache Software Foundation. All rights reserved.