public class HiveAlterHandler extends Object implements AlterHandler
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.conf.Configuration |
conf |
| 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) |
Partition |
alterPartition(RawStore msdb,
Warehouse wh,
String catName,
String dbname,
String name,
List<String> part_vals,
Partition new_part,
EnvironmentContext environmentContext,
IHMSHandler handler,
String validWriteIds)
handles alter partition
|
List<Partition> |
alterPartitions(RawStore msdb,
Warehouse wh,
String dbname,
String name,
List<Partition> new_parts,
EnvironmentContext environmentContext)
Deprecated.
|
List<Partition> |
alterPartitions(RawStore msdb,
Warehouse wh,
String catName,
String dbname,
String name,
List<Partition> new_parts,
EnvironmentContext environmentContext,
String writeIdList,
long writeId,
IHMSHandler handler)
handles alter partitions
|
void |
alterTable(RawStore msdb,
Warehouse wh,
String catName,
String dbname,
String name,
Table newt,
EnvironmentContext environmentContext,
IHMSHandler handler,
String writeIdList)
handles alter table, the changes could be cascaded to partitions if applicable
|
static List<ColumnStatistics> |
deleteTableColumnStats(RawStore msdb,
Table oldTable,
Table newTable,
List<ColumnStatistics> multiColStats) |
static List<ColumnStatisticsObj> |
filterColumnStatsForTableColumns(List<FieldSchema> columns,
ColumnStatistics colStats) |
static List<ColumnStatistics> |
getColumnStats(RawStore msdb,
Table oldTable) |
org.apache.hadoop.conf.Configuration |
getConf() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
static List<ColumnStatistics> |
updateOrGetPartitionColumnStats(RawStore msdb,
String catName,
String dbname,
String tblname,
List<String> partVals,
List<FieldSchema> oldCols,
Table table,
Partition part,
List<FieldSchema> newCols,
List<String> deletedCols) |
void |
updateTableColumnStats(RawStore msdb,
Table newTable,
String validWriteIds,
List<ColumnStatistics> columnStatistics) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitalterTablepublic org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic void alterTable(RawStore msdb, Warehouse wh, String catName, String dbname, String name, Table newt, EnvironmentContext environmentContext, IHMSHandler handler, String writeIdList) throws InvalidOperationException, MetaException
AlterHandleralterTable in interface AlterHandlermsdb - object to get metadatawh - Hive Warehouse where table data is storedcatName - catalog of the table being altereddbname - 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 objecthandler - HMSHandle object (required to log event notification)InvalidOperationException - 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, NoSuchObjectException
alterPartition in interface AlterHandlermsdb - 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 objectInvalidOperationExceptionInvalidObjectExceptionAlreadyExistsExceptionMetaExceptionNoSuchObjectExceptionpublic Partition alterPartition(RawStore msdb, Warehouse wh, String catName, String dbname, String name, List<String> part_vals, Partition new_part, EnvironmentContext environmentContext, IHMSHandler handler, String validWriteIds) throws InvalidOperationException, InvalidObjectException, AlreadyExistsException, MetaException, NoSuchObjectException
AlterHandleralterPartition in interface AlterHandlermsdb - object to get metadatawh - physical warehouse classcatName - catalog namedbname - database of the partition being alteredname - table of the partition being alteredpart_vals - original values of the partition being alterednew_part - new partition objecthandler - HMSHandle object (required to log event notification)InvalidOperationExceptionInvalidObjectExceptionAlreadyExistsExceptionMetaExceptionNoSuchObjectException@Deprecated public List<Partition> alterPartitions(RawStore msdb, Warehouse wh, String dbname, String name, List<Partition> new_parts, EnvironmentContext environmentContext) throws InvalidOperationException, InvalidObjectException, AlreadyExistsException, MetaException
alterPartitions in interface AlterHandlermsdb - object to get metadatadbname - database of the partition being alteredname - table of the partition being alterednew_parts - new partition listInvalidOperationExceptionInvalidObjectExceptionAlreadyExistsExceptionMetaExceptionpublic List<Partition> alterPartitions(RawStore msdb, Warehouse wh, String catName, String dbname, String name, List<Partition> new_parts, EnvironmentContext environmentContext, String writeIdList, long writeId, IHMSHandler handler) throws InvalidOperationException, InvalidObjectException, AlreadyExistsException, MetaException
AlterHandleralterPartitions in interface AlterHandlermsdb - object to get metadatadbname - database of the partition being alteredname - table of the partition being alterednew_parts - new partition listhandler - HMSHandle object (required to log event notification)InvalidOperationExceptionInvalidObjectExceptionAlreadyExistsExceptionMetaExceptionpublic static List<ColumnStatistics> getColumnStats(RawStore msdb, Table oldTable) throws NoSuchObjectException, MetaException
NoSuchObjectExceptionMetaExceptionpublic static List<ColumnStatistics> deleteTableColumnStats(RawStore msdb, Table oldTable, Table newTable, List<ColumnStatistics> multiColStats) throws InvalidObjectException, MetaException
InvalidObjectExceptionMetaExceptionpublic void updateTableColumnStats(RawStore msdb, Table newTable, String validWriteIds, List<ColumnStatistics> columnStatistics) throws MetaException, InvalidObjectException
MetaExceptionInvalidObjectExceptionpublic static List<ColumnStatisticsObj> filterColumnStatsForTableColumns(List<FieldSchema> columns, ColumnStatistics colStats)
public static List<ColumnStatistics> updateOrGetPartitionColumnStats(RawStore msdb, String catName, String dbname, String tblname, List<String> partVals, List<FieldSchema> oldCols, Table table, Partition part, List<FieldSchema> newCols, List<String> deletedCols) throws MetaException, InvalidObjectException
MetaExceptionInvalidObjectExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.