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)
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
|
void |
alterTable(RawStore msdb,
Warehouse wh,
String dbname,
String name,
Table newt,
boolean cascade)
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) throws InvalidOperationException, MetaException
AlterHandler
alterTable
in interface AlterHandler
msdb
- object to get metadatawh
- TODOdbname
- 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 void alterTable(RawStore msdb, Warehouse wh, String dbname, String name, Table newt, boolean cascade) 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 objectcascade
- if the changes will be cascaded to its partitions if applicableInvalidOperationException
- 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) 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) 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 © 2017 The Apache Software Foundation. All rights reserved.