public class HiveAlterHandler extends Object implements AlterHandler
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.conf.Configuration |
hiveConf |
Constructor and Description |
---|
HiveAlterHandler() |
Modifier and Type | Method and Description |
---|---|
Partition |
alterPartition(RawStore msdb,
Warehouse wh,
String dbname,
String name,
List<String> part_vals,
Partition new_part,
EnvironmentContext environmentContext)
handles alter partition
|
List<Partition> |
alterPartitions(RawStore msdb,
Warehouse wh,
String dbname,
String name,
List<Partition> new_parts,
EnvironmentContext environmentContext)
handles alter partitions
|
void |
alterTable(RawStore msdb,
Warehouse wh,
String dbname,
String name,
Table newt,
EnvironmentContext environmentContext)
handles alter table, the changes could be cascaded to partitions if applicable
|
org.apache.hadoop.conf.Configuration |
getConf() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public void alterTable(RawStore msdb, Warehouse wh, String dbname, String name, Table newt, EnvironmentContext environmentContext) throws InvalidOperationException, MetaException
AlterHandler
alterTable
in interface AlterHandler
msdb
- object to get metadatawh
- Hive Warehouse where table data is storeddbname
- database of the table being alteredname
- original name of the table being altered. same as
newTable.tableName if alter op is not a rename.newt
- new table objectInvalidOperationException
- thrown if the newTable object is invalidMetaException
- thrown if there is any other errorpublic Partition alterPartition(RawStore msdb, Warehouse wh, String dbname, String name, List<String> part_vals, Partition new_part, EnvironmentContext environmentContext) throws InvalidOperationException, InvalidObjectException, AlreadyExistsException, MetaException
AlterHandler
alterPartition
in interface AlterHandler
msdb
- object to get metadatadbname
- database of the partition being alteredname
- table of the partition being alteredpart_vals
- original values of the partition being alterednew_part
- new partition objectInvalidOperationException
InvalidObjectException
AlreadyExistsException
MetaException
public List<Partition> alterPartitions(RawStore msdb, Warehouse wh, String dbname, String name, List<Partition> new_parts, EnvironmentContext environmentContext) throws InvalidOperationException, InvalidObjectException, AlreadyExistsException, MetaException
AlterHandler
alterPartitions
in interface AlterHandler
msdb
- object to get metadatadbname
- database of the partition being alteredname
- table of the partition being alteredInvalidOperationException
InvalidObjectException
AlreadyExistsException
MetaException
Copyright © 2016 The Apache Software Foundation. All rights reserved.