org.apache.hadoop.hive.metastore
Class HiveAlterHandler

java.lang.Object
  extended by org.apache.hadoop.hive.metastore.HiveAlterHandler
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, AlterHandler

public class HiveAlterHandler
extends Object
implements AlterHandler

Hive specific implementation of alter


Field Summary
protected  org.apache.hadoop.conf.Configuration hiveConf
           
 
Constructor Summary
HiveAlterHandler()
           
 
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_parts)
          handles alter partitions
 void alterTable(RawStore msdb, Warehouse wh, String dbname, String name, Table newt)
          handles alter table
 org.apache.hadoop.conf.Configuration getConf()
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hiveConf

protected org.apache.hadoop.conf.Configuration hiveConf
Constructor Detail

HiveAlterHandler

public HiveAlterHandler()
Method Detail

getConf

public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable

alterTable

public void alterTable(RawStore msdb,
                       Warehouse wh,
                       String dbname,
                       String name,
                       Table newt)
                throws InvalidOperationException,
                       MetaException
Description copied from interface: AlterHandler
handles alter table

Specified by:
alterTable in interface AlterHandler
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.
newt - new table object
Throws:
InvalidOperationException - thrown if the newTable object is invalid
MetaException - thrown if there is any other erro

alterPartition

public Partition alterPartition(RawStore msdb,
                                Warehouse wh,
                                String dbname,
                                String name,
                                List<String> part_vals,
                                Partition new_part)
                         throws InvalidOperationException,
                                InvalidObjectException,
                                AlreadyExistsException,
                                MetaException
Description copied from interface: AlterHandler
handles alter partition

Specified by:
alterPartition in interface AlterHandler
Parameters:
msdb - object to get metadata
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

public List<Partition> alterPartitions(RawStore msdb,
                                       Warehouse wh,
                                       String dbname,
                                       String name,
                                       List<Partition> new_parts)
                                throws InvalidOperationException,
                                       InvalidObjectException,
                                       AlreadyExistsException,
                                       MetaException
Description copied from interface: AlterHandler
handles alter partitions

Specified by:
alterPartitions in interface AlterHandler
Parameters:
msdb - object to get metadata
dbname - database of the partition being altered
name - table of the partition being altered
Returns:
the altered partition list
Throws:
InvalidOperationException
InvalidObjectException
AlreadyExistsException
MetaException


Copyright © 2013 The Apache Software Foundation