org.apache.hadoop.hive.metastore
Interface AlterHandler

All Superinterfaces:
org.apache.hadoop.conf.Configurable
All Known Implementing Classes:
HiveAlterHandler

public interface AlterHandler
extends org.apache.hadoop.conf.Configurable

Interface for Alter Table and Alter Partition code


Method Summary
 Partition alterPartition(RawStore msdb, Warehouse wh, String dbname, String name, List<String> part_vals, Partition new_part)
          handles alter partition
 List<Partition> alterPartitions(RawStore msdb, Warehouse wh, String dbname, String name, List<Partition> new_part)
          handles alter partitions
 void alterTable(RawStore msdb, Warehouse wh, String dbname, String name, Table newTable)
          handles alter table
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Method Detail

alterTable

void alterTable(RawStore msdb,
                Warehouse wh,
                String dbname,
                String name,
                Table newTable)
                throws InvalidOperationException,
                       MetaException
handles alter table

Parameters:
msdb - object to get metadata
wh - TODO
dbname - database of the table being altered
name - original name of the table being altered. same as newTable.tableName if alter op is not a rename.
newTable - new table object
Throws:
InvalidOperationException - thrown if the newTable object is invalid
MetaException - thrown if there is any other erro

alterPartition

Partition alterPartition(RawStore msdb,
                         Warehouse wh,
                         String dbname,
                         String name,
                         List<String> part_vals,
                         Partition new_part)
                         throws InvalidOperationException,
                                InvalidObjectException,
                                AlreadyExistsException,
                                MetaException
handles alter partition

Parameters:
msdb - object to get metadata
wh -
dbname - database of the partition being altered
name - table of the partition being altered
part_vals - original values of the partition being altered
new_part - new partition object
Returns:
the altered partition
Throws:
InvalidOperationException
InvalidObjectException
AlreadyExistsException
MetaException

alterPartitions

List<Partition> alterPartitions(RawStore msdb,
                                Warehouse wh,
                                String dbname,
                                String name,
                                List<Partition> new_part)
                                throws InvalidOperationException,
                                       InvalidObjectException,
                                       AlreadyExistsException,
                                       MetaException
handles alter partitions

Parameters:
msdb - object to get metadata
wh -
dbname - database of the partition being altered
name - table of the partition being altered
new_parts - new partition list
Returns:
the altered partition list
Throws:
InvalidOperationException
InvalidObjectException
AlreadyExistsException
MetaException


Copyright © 2013 The Apache Software Foundation