org.apache.hadoop.hive.metastore
Interface IMetaStoreClient

All Known Implementing Classes:
HiveMetaStoreClient

public interface IMetaStoreClient

TODO Unnecessary when the server sides for both dbstore and filestore are merged


Method Summary
 Partition add_partition(Partition partition)
          Add a partition to the table.
 int add_partitions(List<Partition> partitions)
          Add partitions to the table.
 void alter_index(String dbName, String tblName, String indexName, Index index)
           
 void alter_partition(String dbName, String tblName, Partition newPart)
          updates a partition to new partition
 void alter_table(String defaultDatabaseName, String tblName, Table table)
           
 void alterDatabase(String name, Database db)
           
 Partition appendPartition(String tableName, String dbName, List<String> partVals)
           
 Partition appendPartition(String tableName, String dbName, String name)
           
 void cancelDelegationToken(String tokenStrForm)
           
 void close()
           
 boolean create_role(Role role)
           
 void createDatabase(Database db)
           
 void createIndex(Index index, Table indexTable)
          create an index
 void createTable(Table tbl)
           
 boolean drop_role(String role_name)
           
 void dropDatabase(String name)
           
 void dropDatabase(String name, boolean deleteData, boolean ignoreUnknownDb)
           
 void dropDatabase(String name, boolean deleteData, boolean ignoreUnknownDb, boolean cascade)
           
 boolean dropIndex(String db_name, String tbl_name, String name, boolean deleteData)
           
 boolean dropPartition(String db_name, String tbl_name, List<String> part_vals, boolean deleteData)
           
 boolean dropPartition(String db_name, String tbl_name, String name, boolean deleteData)
           
 void dropTable(String tableName, boolean deleteData)
          Deprecated. As of release 0.6.0 replaced by dropTable(String, String, boolean, boolean). This method will be removed in release 0.7.0.
 void dropTable(String dbname, String tableName)
           
 void dropTable(String dbname, String tableName, boolean deleteData, boolean ignoreUknownTab)
          Drop the table.
 PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List<String> group_names)
           
 List<String> getAllDatabases()
          Get the names of all databases in the MetaStore.
 List<String> getAllTables(String dbName)
          Get the names of all tables in the specified database.
 String getConfigValue(String name, String defaultValue)
           
 Database getDatabase(String databaseName)
          Get a Database Object
 List<String> getDatabases(String databasePattern)
          Get the names of all databases in the MetaStore that match the given pattern.
 String getDelegationToken(String owner, String renewerKerberosPrincipalName)
           
 List<FieldSchema> getFields(String db, String tableName)
           
 Index getIndex(String dbName, String tblName, String indexName)
           
 Partition getPartition(String tblName, String dbName, List<String> partVals)
           
 Partition getPartition(String dbName, String tblName, String name)
           
 List<Partition> getPartitionsByNames(String db_name, String tbl_name, List<String> part_names)
          Get partitions by a list of partition names.
 Partition getPartitionWithAuthInfo(String dbName, String tableName, List<String> pvals, String userName, List<String> groupNames)
           
 List<FieldSchema> getSchema(String db, String tableName)
           
 Table getTable(String tableName)
          Deprecated. As of release 0.6.0 replaced by getTable(String, String). This method will be removed in release 0.7.0.
 Table getTable(String dbName, String tableName)
          Get a table object.
 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 grant_privileges(PrivilegeBag privileges)
           
 boolean grant_role(String role_name, String user_name, PrincipalType principalType, String grantor, PrincipalType grantorType, boolean grantOption)
           
 boolean isPartitionMarkedForEvent(String db_name, String tbl_name, Map<String,String> partKVs, PartitionEventType eventType)
           
 List<HiveObjectPrivilege> list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject)
           
 List<Role> list_roles(String principalName, PrincipalType principalType)
           
 List<Index> listIndexes(String db_name, String tbl_name, short max)
          list indexes of the give base table
 List<String> listIndexNames(String db_name, String tbl_name, short max)
          list all the index names of the give base table.
 List<String> listPartitionNames(String db_name, String tbl_name, List<String> part_vals, short max_parts)
           
 List<String> listPartitionNames(String db_name, String tbl_name, short max_parts)
           
 List<Partition> listPartitions(String db_name, String tbl_name, List<String> part_vals, short max_parts)
           
 List<Partition> listPartitions(String db_name, String tbl_name, short max_parts)
           
 List<Partition> listPartitionsByFilter(String db_name, String tbl_name, String filter, short max_parts)
          Get list of partitions matching specified filter
 List<Partition> listPartitionsWithAuthInfo(String dbName, String tableName, List<String> partialPvals, short s, String userName, List<String> groupNames)
           
 List<Partition> listPartitionsWithAuthInfo(String dbName, String tableName, short s, String userName, List<String> groupNames)
           
 List<String> listRoleNames()
          list all role names
 List<String> listTableNamesByFilter(String dbName, String filter, short maxTables)
          Get a list of table names that match a filter.
 void markPartitionForEvent(String db_name, String tbl_name, Map<String,String> partKVs, PartitionEventType eventType)
           
 Map<String,String> partitionNameToSpec(String name)
           
 List<String> partitionNameToVals(String name)
           
 void renamePartition(String dbname, String name, List<String> part_vals, Partition newPart)
          rename a partition to a new partition
 long renewDelegationToken(String tokenStrForm)
           
 boolean revoke_privileges(PrivilegeBag privileges)
           
 boolean revoke_role(String role_name, String user_name, PrincipalType principalType)
           
 boolean tableExists(String tableName)
          Deprecated. As of release 0.6.0 replaced by tableExists(String, String). This method will be removed in release 0.7.0.
 boolean tableExists(String databaseName, String tableName)
           
 

Method Detail

close

void close()

getDatabases

List<String> getDatabases(String databasePattern)
                          throws MetaException,
                                 org.apache.thrift.TException
Get the names of all databases in the MetaStore that match the given pattern.

Parameters:
databasePattern -
Returns:
List of database names.
Throws:
MetaException
org.apache.thrift.TException

getAllDatabases

List<String> getAllDatabases()
                             throws MetaException,
                                    org.apache.thrift.TException
Get the names of all databases in the MetaStore.

Returns:
List of database names.
Throws:
MetaException
org.apache.thrift.TException

getTables

List<String> getTables(String dbName,
                       String tablePattern)
                       throws MetaException,
                              org.apache.thrift.TException,
                              UnknownDBException
Get the names of all tables in the specified database that satisfy the supplied table name pattern.

Parameters:
dbName -
tablePattern -
Returns:
List of table names.
Throws:
MetaException
org.apache.thrift.TException
UnknownDBException

getAllTables

List<String> getAllTables(String dbName)
                          throws MetaException,
                                 org.apache.thrift.TException,
                                 UnknownDBException
Get the names of all tables in the specified database.

Parameters:
dbName -
Returns:
List of table names.
Throws:
MetaException
org.apache.thrift.TException
UnknownDBException

listTableNamesByFilter

List<String> listTableNamesByFilter(String dbName,
                                    String filter,
                                    short maxTables)
                                    throws MetaException,
                                           org.apache.thrift.TException,
                                           InvalidOperationException,
                                           UnknownDBException
Get a list of table names that match a filter. The filter operators are LIKE, <, <=, >, >=, =, <> In the filter statement, values interpreted as strings must be enclosed in quotes, while values interpreted as integers should not be. Strings and integers are the only supported value types. The currently supported key names in the filter are: Constants.HIVE_FILTER_FIELD_OWNER, which filters on the tables' owner's name and supports all filter operators Constants.HIVE_FILTER_FIELD_LAST_ACCESS, which filters on the last access times and supports all filter operators except LIKE Constants.HIVE_FILTER_FIELD_PARAMS, which filters on the tables' parameter keys and values and only supports the filter operators = and <>. Append the parameter key name to HIVE_FILTER_FIELD_PARAMS in the filter statement. For example, to filter on parameter keys called "retention", the key name in the filter statement should be Constants.HIVE_FILTER_FIELD_PARAMS + "retention" Also, = and <> only work for keys that exist in the tables. E.g., filtering on tables where key1 <> value will only return tables that have a value for the parameter key1. Some example filter statements include: filter = Constants.HIVE_FILTER_FIELD_OWNER + " like \".*test.*\" and " + Constants.HIVE_FILTER_FIELD_LAST_ACCESS + " = 0"; filter = Constants.HIVE_FILTER_FIELD_OWNER + " = \"test_user\" and (" + Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"30\" or " + Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"90\")"

Parameters:
dbName - The name of the database from which you will retrieve the table names
filterType - The type of filter
filter - The filter string
max_tables - The maximum number of tables returned
Returns:
A list of table names that match the desired filter
Throws:
MetaException
org.apache.thrift.TException
InvalidOperationException
UnknownDBException

dropTable

void dropTable(String dbname,
               String tableName,
               boolean deleteData,
               boolean ignoreUknownTab)
               throws MetaException,
                      org.apache.thrift.TException,
                      NoSuchObjectException
Drop the table.

Parameters:
dbname - The database for this table
tableName - The table to drop
Throws:
MetaException - Could not drop table properly.
NoSuchObjectException - The table wasn't found.
org.apache.thrift.TException - A thrift communication error occurred
ExistingDependentsException

dropTable

@Deprecated
void dropTable(String tableName,
                          boolean deleteData)
               throws MetaException,
                      UnknownTableException,
                      org.apache.thrift.TException,
                      NoSuchObjectException
Deprecated. As of release 0.6.0 replaced by dropTable(String, String, boolean, boolean). This method will be removed in release 0.7.0.

Drop the table in the DEFAULT database.

Parameters:
tableName - The table to drop
deleteData - Should we delete the underlying data
Throws:
MetaException - Could not drop table properly.
UnknownTableException - The table wasn't found.
org.apache.thrift.TException - A thrift communication error occurred
NoSuchObjectException - The table wasn't found.

dropTable

void dropTable(String dbname,
               String tableName)
               throws MetaException,
                      org.apache.thrift.TException,
                      NoSuchObjectException
Throws:
MetaException
org.apache.thrift.TException
NoSuchObjectException

tableExists

boolean tableExists(String databaseName,
                    String tableName)
                    throws MetaException,
                           org.apache.thrift.TException,
                           UnknownDBException
Throws:
MetaException
org.apache.thrift.TException
UnknownDBException

tableExists

@Deprecated
boolean tableExists(String tableName)
                    throws MetaException,
                           org.apache.thrift.TException,
                           UnknownDBException
Deprecated. As of release 0.6.0 replaced by tableExists(String, String). This method will be removed in release 0.7.0.

Check to see if the specified table exists in the DEFAULT database.

Parameters:
tableName -
Returns:
TRUE if DEFAULT.tableName exists, FALSE otherwise.
Throws:
MetaException
org.apache.thrift.TException
UnknownDBException

getTable

@Deprecated
Table getTable(String tableName)
               throws MetaException,
                      org.apache.thrift.TException,
                      NoSuchObjectException
Deprecated. As of release 0.6.0 replaced by getTable(String, String). This method will be removed in release 0.7.0.

Get a table object from the DEFAULT database.

Parameters:
tableName - Name of the table to fetch.
Returns:
An object representing the table.
Throws:
MetaException - Could not fetch the table
org.apache.thrift.TException - A thrift communication error occurred
NoSuchObjectException - In case the table wasn't found.

getDatabase

Database getDatabase(String databaseName)
                     throws NoSuchObjectException,
                            MetaException,
                            org.apache.thrift.TException
Get a Database Object

Parameters:
databaseName - name of the database to fetch
Returns:
Throws:
NoSuchObjectException - The database does not exist
MetaException - Could not fetch the database
org.apache.thrift.TException - A thrift communication error occurred

getTable

Table getTable(String dbName,
               String tableName)
               throws MetaException,
                      org.apache.thrift.TException,
                      NoSuchObjectException
Get a table object.

Parameters:
dbName - The database the table is located in.
tableName - Name of the table to fetch.
Returns:
An object representing the table.
Throws:
MetaException - Could not fetch the table
org.apache.thrift.TException - A thrift communication error occurred
NoSuchObjectException - In case the table wasn't found.

getTableObjectsByName

List<Table> getTableObjectsByName(String dbName,
                                  List<String> tableNames)
                                  throws MetaException,
                                         InvalidOperationException,
                                         UnknownDBException,
                                         org.apache.thrift.TException
Parameters:
dbName - The database the tables are located in.
tableNames - The names of the tables to fetch
Returns:
A list of objects representing the tables. Only the tables that can be retrieved from the database are returned. For example, if none of the requested tables could be retrieved, an empty list is returned. There is no guarantee of ordering of the returned tables.
Throws:
InvalidOperationException - 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 occurred
MetaException - Any other errors

appendPartition

Partition appendPartition(String tableName,
                          String dbName,
                          List<String> partVals)
                          throws InvalidObjectException,
                                 AlreadyExistsException,
                                 MetaException,
                                 org.apache.thrift.TException
Parameters:
tableName -
dbName -
partVals -
Returns:
the partition object
Throws:
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException
See Also:
ThriftHiveMetastore.Iface.append_partition(java.lang.String, java.lang.String, java.util.List)

appendPartition

Partition appendPartition(String tableName,
                          String dbName,
                          String name)
                          throws InvalidObjectException,
                                 AlreadyExistsException,
                                 MetaException,
                                 org.apache.thrift.TException
Throws:
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException

add_partition

Partition add_partition(Partition partition)
                        throws InvalidObjectException,
                               AlreadyExistsException,
                               MetaException,
                               org.apache.thrift.TException
Add a partition to the table.

Parameters:
partition - The partition to add
Returns:
The partition added
Throws:
InvalidObjectException - Could not find table to add to
AlreadyExistsException - Partition already exists
MetaException - Could not add partition
org.apache.thrift.TException - Thrift exception

add_partitions

int add_partitions(List<Partition> partitions)
                   throws InvalidObjectException,
                          AlreadyExistsException,
                          MetaException,
                          org.apache.thrift.TException
Add partitions to the table.

Parameters:
partitions - The partitions to add
Throws:
InvalidObjectException - Could not find table to add to
AlreadyExistsException - Partition already exists
MetaException - Could not add partition
org.apache.thrift.TException - Thrift exception

getPartition

Partition getPartition(String tblName,
                       String dbName,
                       List<String> partVals)
                       throws NoSuchObjectException,
                              MetaException,
                              org.apache.thrift.TException
Parameters:
tblName -
dbName -
partVals -
Returns:
the partition object
Throws:
MetaException
org.apache.thrift.TException
NoSuchObjectException
See Also:
ThriftHiveMetastore.Iface.get_partition(java.lang.String, java.lang.String, java.util.List)

getPartition

Partition getPartition(String dbName,
                       String tblName,
                       String name)
                       throws MetaException,
                              UnknownTableException,
                              NoSuchObjectException,
                              org.apache.thrift.TException
Parameters:
dbName -
tblName -
name - - partition name i.e. 'ds=2010-02-03/ts=2010-02-03 18%3A16%3A01'
Returns:
the partition object
Throws:
MetaException
org.apache.thrift.TException
UnknownTableException
NoSuchObjectException
See Also:
ThriftHiveMetastore.Iface.get_partition(java.lang.String, java.lang.String, java.util.List)

getPartitionWithAuthInfo

Partition getPartitionWithAuthInfo(String dbName,
                                   String tableName,
                                   List<String> pvals,
                                   String userName,
                                   List<String> groupNames)
                                   throws MetaException,
                                          UnknownTableException,
                                          NoSuchObjectException,
                                          org.apache.thrift.TException
Parameters:
dbName -
tableName -
pvals -
userName -
groupNames -
Returns:
Throws:
MetaException
UnknownTableException
NoSuchObjectException
org.apache.thrift.TException

listPartitions

List<Partition> listPartitions(String db_name,
                               String tbl_name,
                               short max_parts)
                               throws NoSuchObjectException,
                                      MetaException,
                                      org.apache.thrift.TException
Parameters:
tbl_name -
db_name -
max_parts -
Returns:
the list of partitions
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException

listPartitions

List<Partition> listPartitions(String db_name,
                               String tbl_name,
                               List<String> part_vals,
                               short max_parts)
                               throws NoSuchObjectException,
                                      MetaException,
                                      org.apache.thrift.TException
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException

listPartitionNames

List<String> listPartitionNames(String db_name,
                                String tbl_name,
                                short max_parts)
                                throws MetaException,
                                       org.apache.thrift.TException
Throws:
MetaException
org.apache.thrift.TException

listPartitionNames

List<String> listPartitionNames(String db_name,
                                String tbl_name,
                                List<String> part_vals,
                                short max_parts)
                                throws MetaException,
                                       org.apache.thrift.TException
Throws:
MetaException
org.apache.thrift.TException

listPartitionsByFilter

List<Partition> listPartitionsByFilter(String db_name,
                                       String tbl_name,
                                       String filter,
                                       short max_parts)
                                       throws MetaException,
                                              NoSuchObjectException,
                                              org.apache.thrift.TException
Get list of partitions matching specified filter

Parameters:
db_name - the database name
tbl_name - the table name
filter - the filter string, for example "part1 = \"p1_abc\" and part2 <= "\p2_test\"". Filtering can be done only on string partition keys.
max_parts - the maximum number of partitions to return, all partitions are returned if -1 is passed
Returns:
list of partitions
Throws:
MetaException
NoSuchObjectException
org.apache.thrift.TException

listPartitionsWithAuthInfo

List<Partition> listPartitionsWithAuthInfo(String dbName,
                                           String tableName,
                                           short s,
                                           String userName,
                                           List<String> groupNames)
                                           throws MetaException,
                                                  org.apache.thrift.TException,
                                                  NoSuchObjectException
Parameters:
dbName -
tableName -
s -
userName -
groupNames -
Returns:
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException

getPartitionsByNames

List<Partition> getPartitionsByNames(String db_name,
                                     String tbl_name,
                                     List<String> part_names)
                                     throws NoSuchObjectException,
                                            MetaException,
                                            org.apache.thrift.TException
Get partitions by a list of partition names.

Parameters:
db_name - database name
tbl_name - table name
part_names - list of partition names
Returns:
list of Partition objects
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException

listPartitionsWithAuthInfo

List<Partition> listPartitionsWithAuthInfo(String dbName,
                                           String tableName,
                                           List<String> partialPvals,
                                           short s,
                                           String userName,
                                           List<String> groupNames)
                                           throws MetaException,
                                                  org.apache.thrift.TException,
                                                  NoSuchObjectException
Parameters:
dbName -
tableName -
partialPvals -
s -
userName -
groupNames -
Returns:
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException

markPartitionForEvent

void markPartitionForEvent(String db_name,
                           String tbl_name,
                           Map<String,String> partKVs,
                           PartitionEventType eventType)
                           throws MetaException,
                                  NoSuchObjectException,
                                  org.apache.thrift.TException,
                                  UnknownTableException,
                                  UnknownDBException,
                                  UnknownPartitionException,
                                  InvalidPartitionException
Parameters:
db_name -
tbl_name -
partKVs -
eventType -
Throws:
MetaException
NoSuchObjectException
org.apache.thrift.TException
UnknownTableException
UnknownDBException
UnknownPartitionException
InvalidPartitionException

isPartitionMarkedForEvent

boolean isPartitionMarkedForEvent(String db_name,
                                  String tbl_name,
                                  Map<String,String> partKVs,
                                  PartitionEventType eventType)
                                  throws MetaException,
                                         NoSuchObjectException,
                                         org.apache.thrift.TException,
                                         UnknownTableException,
                                         UnknownDBException,
                                         UnknownPartitionException,
                                         InvalidPartitionException
Parameters:
db_name -
tbl_name -
partKVs -
eventType -
Throws:
MetaException
NoSuchObjectException
org.apache.thrift.TException
UnknownTableException
UnknownDBException
UnknownPartitionException
InvalidPartitionException

createTable

void createTable(Table tbl)
                 throws AlreadyExistsException,
                        InvalidObjectException,
                        MetaException,
                        NoSuchObjectException,
                        org.apache.thrift.TException
Parameters:
tbl -
Throws:
AlreadyExistsException
InvalidObjectException
MetaException
NoSuchObjectException
org.apache.thrift.TException
See Also:
ThriftHiveMetastore.Iface.create_table(org.apache.hadoop.hive.metastore.api.Table)

alter_table

void alter_table(String defaultDatabaseName,
                 String tblName,
                 Table table)
                 throws InvalidOperationException,
                        MetaException,
                        org.apache.thrift.TException
Throws:
InvalidOperationException
MetaException
org.apache.thrift.TException

createDatabase

void createDatabase(Database db)
                    throws InvalidObjectException,
                           AlreadyExistsException,
                           MetaException,
                           org.apache.thrift.TException
Throws:
InvalidObjectException
AlreadyExistsException
MetaException
org.apache.thrift.TException

dropDatabase

void dropDatabase(String name)
                  throws NoSuchObjectException,
                         InvalidOperationException,
                         MetaException,
                         org.apache.thrift.TException
Throws:
NoSuchObjectException
InvalidOperationException
MetaException
org.apache.thrift.TException

dropDatabase

void dropDatabase(String name,
                  boolean deleteData,
                  boolean ignoreUnknownDb)
                  throws NoSuchObjectException,
                         InvalidOperationException,
                         MetaException,
                         org.apache.thrift.TException
Throws:
NoSuchObjectException
InvalidOperationException
MetaException
org.apache.thrift.TException

dropDatabase

void dropDatabase(String name,
                  boolean deleteData,
                  boolean ignoreUnknownDb,
                  boolean cascade)
                  throws NoSuchObjectException,
                         InvalidOperationException,
                         MetaException,
                         org.apache.thrift.TException
Throws:
NoSuchObjectException
InvalidOperationException
MetaException
org.apache.thrift.TException

alterDatabase

void alterDatabase(String name,
                   Database db)
                   throws NoSuchObjectException,
                          MetaException,
                          org.apache.thrift.TException
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException

dropPartition

boolean dropPartition(String db_name,
                      String tbl_name,
                      List<String> part_vals,
                      boolean deleteData)
                      throws NoSuchObjectException,
                             MetaException,
                             org.apache.thrift.TException
Parameters:
db_name -
tbl_name -
part_vals -
deleteData - delete the underlying data or just delete the table in metadata
Returns:
true or false
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException
See Also:
ThriftHiveMetastore.Iface.drop_partition(java.lang.String, java.lang.String, java.util.List, boolean)

dropPartition

boolean dropPartition(String db_name,
                      String tbl_name,
                      String name,
                      boolean deleteData)
                      throws NoSuchObjectException,
                             MetaException,
                             org.apache.thrift.TException
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException

alter_partition

void alter_partition(String dbName,
                     String tblName,
                     Partition newPart)
                     throws InvalidOperationException,
                            MetaException,
                            org.apache.thrift.TException
updates a partition to new partition

Parameters:
dbName - database of the old partition
tblName - table name of the old partition
newPart - new partition
Throws:
InvalidOperationException - if the old partition does not exist
MetaException - if error in updating metadata
org.apache.thrift.TException - if error in communicating with metastore server

renamePartition

void renamePartition(String dbname,
                     String name,
                     List<String> part_vals,
                     Partition newPart)
                     throws InvalidOperationException,
                            MetaException,
                            org.apache.thrift.TException
rename a partition to a new partition

Parameters:
dbname - database of the old partition
name - table name of the old partition
part_vals - values of the old partition
newPart - new partition
Throws:
InvalidOperationException - if srcFs and destFs are different
MetaException - if error in updating metadata
org.apache.thrift.TException - if error in communicating with metastore server

getFields

List<FieldSchema> getFields(String db,
                            String tableName)
                            throws MetaException,
                                   org.apache.thrift.TException,
                                   UnknownTableException,
                                   UnknownDBException
Parameters:
db -
tableName -
Throws:
UnknownTableException
UnknownDBException
MetaException
org.apache.thrift.TException
See Also:
ThriftHiveMetastore.Iface.get_fields(java.lang.String, java.lang.String)

getSchema

List<FieldSchema> getSchema(String db,
                            String tableName)
                            throws MetaException,
                                   org.apache.thrift.TException,
                                   UnknownTableException,
                                   UnknownDBException
Parameters:
db -
tableName -
Throws:
UnknownTableException
UnknownDBException
MetaException
org.apache.thrift.TException
See Also:
ThriftHiveMetastore.Iface.get_schema(java.lang.String, java.lang.String)

getConfigValue

String getConfigValue(String name,
                      String defaultValue)
                      throws org.apache.thrift.TException,
                             ConfigValSecurityException
Parameters:
name - name of the configuration property to get the value of
defaultValue - the value to return if property with the given name doesn't exist
Returns:
value of the specified configuration property
Throws:
org.apache.thrift.TException
ConfigValSecurityException

partitionNameToVals

List<String> partitionNameToVals(String name)
                                 throws MetaException,
                                        org.apache.thrift.TException
Parameters:
name - the partition name e.g. ("ds=2010-03-03/hr=12")
Returns:
a list containing the partition col values, in the same order as the name
Throws:
MetaException
org.apache.thrift.TException

partitionNameToSpec

Map<String,String> partitionNameToSpec(String name)
                                       throws MetaException,
                                              org.apache.thrift.TException
Parameters:
name - the partition name e.g. ("ds=2010-03-03/hr=12")
Returns:
a map from the partition col to the value, as listed in the name
Throws:
MetaException
org.apache.thrift.TException

createIndex

void createIndex(Index index,
                 Table indexTable)
                 throws InvalidObjectException,
                        MetaException,
                        NoSuchObjectException,
                        org.apache.thrift.TException,
                        AlreadyExistsException
create an index

Parameters:
index - the index object
Throws:
InvalidObjectException
MetaException
NoSuchObjectException
org.apache.thrift.TException
AlreadyExistsException

alter_index

void alter_index(String dbName,
                 String tblName,
                 String indexName,
                 Index index)
                 throws InvalidOperationException,
                        MetaException,
                        org.apache.thrift.TException
Throws:
InvalidOperationException
MetaException
org.apache.thrift.TException

getIndex

Index getIndex(String dbName,
               String tblName,
               String indexName)
               throws MetaException,
                      UnknownTableException,
                      NoSuchObjectException,
                      org.apache.thrift.TException
Parameters:
dbName -
tblName -
indexName -
Returns:
Throws:
MetaException
UnknownTableException
NoSuchObjectException
org.apache.thrift.TException

listIndexes

List<Index> listIndexes(String db_name,
                        String tbl_name,
                        short max)
                        throws NoSuchObjectException,
                               MetaException,
                               org.apache.thrift.TException
list indexes of the give base table

Parameters:
db_name -
tbl_name -
max -
Returns:
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException

listIndexNames

List<String> listIndexNames(String db_name,
                            String tbl_name,
                            short max)
                            throws MetaException,
                                   org.apache.thrift.TException
list all the index names of the give base table.

Parameters:
db_name -
tbl_name -
max -
Returns:
Throws:
MetaException
org.apache.thrift.TException

dropIndex

boolean dropIndex(String db_name,
                  String tbl_name,
                  String name,
                  boolean deleteData)
                  throws NoSuchObjectException,
                         MetaException,
                         org.apache.thrift.TException
Parameters:
db_name -
tbl_name -
name - index name
deleteData -
Returns:
Throws:
NoSuchObjectException
MetaException
org.apache.thrift.TException

create_role

boolean create_role(Role role)
                    throws MetaException,
                           org.apache.thrift.TException
Parameters:
Role - role object
Returns:
Throws:
MetaException
org.apache.thrift.TException

drop_role

boolean drop_role(String role_name)
                  throws MetaException,
                         org.apache.thrift.TException
Parameters:
role_name - role name
db_name -
Returns:
Throws:
MetaException
org.apache.thrift.TException

listRoleNames

List<String> listRoleNames()
                           throws MetaException,
                                  org.apache.thrift.TException
list all role names

Returns:
Throws:
org.apache.thrift.TException
MetaException

grant_role

boolean grant_role(String role_name,
                   String user_name,
                   PrincipalType principalType,
                   String grantor,
                   PrincipalType grantorType,
                   boolean grantOption)
                   throws MetaException,
                          org.apache.thrift.TException
Parameters:
role_name -
user_name -
principalType -
grantor -
grantorType -
grantOption -
Returns:
Throws:
MetaException
org.apache.thrift.TException

revoke_role

boolean revoke_role(String role_name,
                    String user_name,
                    PrincipalType principalType)
                    throws MetaException,
                           org.apache.thrift.TException
Parameters:
role_name - role name
user_name - user name
principalType -
db_name -
Returns:
Throws:
MetaException
org.apache.thrift.TException

list_roles

List<Role> list_roles(String principalName,
                      PrincipalType principalType)
                      throws MetaException,
                             org.apache.thrift.TException
Parameters:
principalName -
principalType -
Returns:
Throws:
MetaException
org.apache.thrift.TException

get_privilege_set

PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject,
                                        String user_name,
                                        List<String> group_names)
                                        throws MetaException,
                                               org.apache.thrift.TException
Parameters:
hiveObject -
user_name -
group_names -
Returns:
Throws:
MetaException
org.apache.thrift.TException

list_privileges

List<HiveObjectPrivilege> list_privileges(String principal_name,
                                          PrincipalType principal_type,
                                          HiveObjectRef hiveObject)
                                          throws MetaException,
                                                 org.apache.thrift.TException
Parameters:
principal_name -
principal_type -
hiveObject -
Returns:
Throws:
MetaException
org.apache.thrift.TException

grant_privileges

boolean grant_privileges(PrivilegeBag privileges)
                         throws MetaException,
                                org.apache.thrift.TException
Parameters:
privileges -
Returns:
Throws:
MetaException
org.apache.thrift.TException

revoke_privileges

boolean revoke_privileges(PrivilegeBag privileges)
                          throws MetaException,
                                 org.apache.thrift.TException
Parameters:
privileges -
Returns:
Throws:
MetaException
org.apache.thrift.TException

getDelegationToken

String getDelegationToken(String owner,
                          String renewerKerberosPrincipalName)
                          throws MetaException,
                                 org.apache.thrift.TException
Parameters:
owner - the intended owner for the token
renewerKerberosPrincipalName -
Returns:
Throws:
MetaException
org.apache.thrift.TException

renewDelegationToken

long renewDelegationToken(String tokenStrForm)
                          throws MetaException,
                                 org.apache.thrift.TException
Parameters:
tokenStrForm -
Returns:
Throws:
MetaException
org.apache.thrift.TException

cancelDelegationToken

void cancelDelegationToken(String tokenStrForm)
                           throws MetaException,
                                  org.apache.thrift.TException
Parameters:
tokenStrForm -
Throws:
MetaException
org.apache.thrift.TException


Copyright © 2011 The Apache Software Foundation