public class AlterTableDesc extends DDLDesc implements Serializable, DDLDesc.DDLDescWithWriteId
| Modifier and Type | Class and Description |
|---|---|
static class |
AlterTableDesc.AlterTableTypes
alterTableTypes.
|
static class |
AlterTableDesc.ProtectModeType |
DDLDesc.DDLDescWithWriteId| Modifier and Type | Field and Description |
|---|---|
static Set<AlterTableDesc.AlterTableTypes> |
alterTableTypesWithPartialSpec |
| Constructor and Description |
|---|
AlterTableDesc() |
AlterTableDesc(AlterTableDesc.AlterTableTypes alterType) |
AlterTableDesc(AlterTableDesc.AlterTableTypes alterType,
HashMap<String,String> partSpec,
boolean expectView) |
AlterTableDesc(AlterTableDesc.AlterTableTypes alterType,
ReplicationSpec replicationSpec) |
AlterTableDesc(String tableName,
boolean sortingOff,
HashMap<String,String> partSpec) |
AlterTableDesc(String tableName,
boolean turnOffSkewed,
List<String> skewedColNames,
List<List<String>> skewedColValues) |
AlterTableDesc(String tableName,
HashMap<String,String> partSpec,
int numBuckets) |
AlterTableDesc(String name,
HashMap<String,String> partSpec,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> newCols,
AlterTableDesc.AlterTableTypes alterType,
boolean isCascade) |
AlterTableDesc(String tblName,
HashMap<String,String> partSpec,
String oldColName,
String newColName,
String newType,
String newComment,
boolean first,
String afterCol,
boolean isCascade) |
AlterTableDesc(String tblName,
HashMap<String,String> partSpec,
String oldColName,
String newColName,
String newType,
String newComment,
boolean first,
String afterCol,
boolean isCascade,
List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeyCols,
List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeyCols,
List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uniqueConstraintCols,
List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> notNullConstraintCols,
List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> defaultConstraints,
List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> checkConstraints) |
AlterTableDesc(String tableName,
int numBuckets,
List<String> bucketCols,
List<org.apache.hadoop.hive.metastore.api.Order> sortCols,
HashMap<String,String> partSpec) |
AlterTableDesc(String tableName,
List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeyCols,
List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeyCols,
List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uniqueConstraintCols,
List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> notNullConstraintCols,
List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> defaultConstraints,
List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> checkConstraints,
ReplicationSpec replicationSpec) |
AlterTableDesc(String tableName,
List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeyCols,
List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeyCols,
List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uniqueConstraintCols,
ReplicationSpec replicationSpec) |
AlterTableDesc(String tableName,
Map<List<String>,String> locations,
HashMap<String,String> partSpec) |
AlterTableDesc(String tableName,
PrincipalDesc ownerPrincipal) |
AlterTableDesc(String oldName,
String newName,
boolean expectView,
ReplicationSpec replicationSpec) |
AlterTableDesc(String tableName,
String newLocation,
HashMap<String,String> partSpec) |
AlterTableDesc(String tableName,
String dropConstraintName,
ReplicationSpec replicationSpec) |
AlterTableDesc(String name,
String inputFormat,
String outputFormat,
String serdeName,
String storageHandler,
HashMap<String,String> partSpec) |
public static final Set<AlterTableDesc.AlterTableTypes> alterTableTypesWithPartialSpec
public AlterTableDesc()
public AlterTableDesc(String tblName, HashMap<String,String> partSpec, String oldColName, String newColName, String newType, String newComment, boolean first, String afterCol, boolean isCascade) throws SemanticException
tblName - table nameoldColName - old column namenewColName - new column namenewComment - newType - SemanticExceptionpublic AlterTableDesc(String tblName, HashMap<String,String> partSpec, String oldColName, String newColName, String newType, String newComment, boolean first, String afterCol, boolean isCascade, List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeyCols, List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeyCols, List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uniqueConstraintCols, List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> notNullConstraintCols, List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> defaultConstraints, List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> checkConstraints) throws SemanticException
SemanticExceptionpublic AlterTableDesc(String oldName, String newName, boolean expectView, ReplicationSpec replicationSpec) throws SemanticException
oldName - old name of the tablenewName - new name of the tableexpectView - Flag to denote if current table can be a viewreplicationSpec - Replication specification with current event IDSemanticExceptionpublic AlterTableDesc(String name, HashMap<String,String> partSpec, List<org.apache.hadoop.hive.metastore.api.FieldSchema> newCols, AlterTableDesc.AlterTableTypes alterType, boolean isCascade) throws SemanticException
name - name of the tablenewCols - new columns to be addedSemanticExceptionpublic AlterTableDesc(AlterTableDesc.AlterTableTypes alterType, ReplicationSpec replicationSpec)
alterType - type of alter opreplicationSpec - Replication specification with current event IDpublic AlterTableDesc(AlterTableDesc.AlterTableTypes alterType)
alterType - type of alter oppublic AlterTableDesc(AlterTableDesc.AlterTableTypes alterType, HashMap<String,String> partSpec, boolean expectView)
alterType - type of alter opexpectView - Flag to denote if current table can be a viewpartSpec - Partition specifier with map of key and values.public AlterTableDesc(String name, String inputFormat, String outputFormat, String serdeName, String storageHandler, HashMap<String,String> partSpec) throws SemanticException
name - name of the tableinputFormat - new table input formatoutputFormat - new table output formatpartSpec - SemanticExceptionpublic AlterTableDesc(String tableName, int numBuckets, List<String> bucketCols, List<org.apache.hadoop.hive.metastore.api.Order> sortCols, HashMap<String,String> partSpec) throws SemanticException
SemanticExceptionpublic AlterTableDesc(String tableName, boolean sortingOff, HashMap<String,String> partSpec) throws SemanticException
SemanticExceptionpublic AlterTableDesc(String tableName, String newLocation, HashMap<String,String> partSpec) throws SemanticException
SemanticExceptionpublic AlterTableDesc(String tableName, Map<List<String>,String> locations, HashMap<String,String> partSpec) throws SemanticException
SemanticExceptionpublic AlterTableDesc(String tableName, boolean turnOffSkewed, List<String> skewedColNames, List<List<String>> skewedColValues) throws SemanticException
SemanticExceptionpublic AlterTableDesc(String tableName, HashMap<String,String> partSpec, int numBuckets) throws SemanticException
SemanticExceptionpublic AlterTableDesc(String tableName, String dropConstraintName, ReplicationSpec replicationSpec) throws SemanticException
SemanticExceptionpublic AlterTableDesc(String tableName, List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeyCols, List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeyCols, List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uniqueConstraintCols, ReplicationSpec replicationSpec) throws SemanticException
SemanticExceptionpublic AlterTableDesc(String tableName, List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeyCols, List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeyCols, List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> uniqueConstraintCols, List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> notNullConstraintCols, List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> defaultConstraints, List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> checkConstraints, ReplicationSpec replicationSpec) throws SemanticException
SemanticExceptionpublic AlterTableDesc(String tableName, PrincipalDesc ownerPrincipal)
public void setOwnerPrincipal(PrincipalDesc ownerPrincipal)
ownerPrincipal - the owner principal of the tablepublic PrincipalDesc getOwnerPrincipal()
public String getAlterTableTypeString()
public String getOldName()
public void setOldName(String oldName) throws SemanticException
oldName - the oldName to setSemanticExceptionpublic String getNewName()
public void setNewName(String newName)
newName - the newName to setpublic AlterTableDesc.AlterTableTypes getOp()
public void setOp(AlterTableDesc.AlterTableTypes op)
op - the op to setpublic ArrayList<org.apache.hadoop.hive.metastore.api.FieldSchema> getNewCols()
public void setNewCols(ArrayList<org.apache.hadoop.hive.metastore.api.FieldSchema> newCols)
newCols - the newCols to setpublic String getSerdeName()
public void setSerdeName(String serdeName)
serdeName - the serdeName to setpublic String getInputFormat()
public void setInputFormat(String inputFormat)
inputFormat - the input format to setpublic String getOutputFormat()
public void setOutputFormat(String outputFormat)
outputFormat - the output format to setpublic String getStorageHandler()
public void setPrimaryKeyCols(List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> primaryKeyCols)
primaryKeyCols - the primary key cols to setpublic List<org.apache.hadoop.hive.metastore.api.SQLPrimaryKey> getPrimaryKeyCols()
public void setForeignKeyCols(List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> foreignKeyCols)
foreignKeyCols - the foreign key cols to setpublic List<org.apache.hadoop.hive.metastore.api.SQLForeignKey> getForeignKeyCols()
public List<org.apache.hadoop.hive.metastore.api.SQLUniqueConstraint> getUniqueConstraintCols()
public List<org.apache.hadoop.hive.metastore.api.SQLNotNullConstraint> getNotNullConstraintCols()
public List<org.apache.hadoop.hive.metastore.api.SQLDefaultConstraint> getDefaultConstraintCols()
public List<org.apache.hadoop.hive.metastore.api.SQLCheckConstraint> getCheckConstraintCols()
public String getConstraintName()
public void setDropConstraintName(String constraintName)
constraintName - the dropConstraintName to setpublic void setStorageHandler(String storageHandler)
storageHandler - the storage handler to setpublic int getNumberBuckets()
public void setNumberBuckets(int numberBuckets)
numberBuckets - the number of buckets to setpublic void setBucketColumns(ArrayList<String> bucketColumns)
bucketColumns - the bucket columns to setpublic ArrayList<org.apache.hadoop.hive.metastore.api.Order> getSortColumns()
public void setSortColumns(ArrayList<org.apache.hadoop.hive.metastore.api.Order> sortColumns)
sortColumns - the sort columns to setpublic String getOldColName()
public void setOldColName(String oldColName)
oldColName - the old column namepublic String getNewColName()
public void setNewColName(String newColName)
newColName - the new column namepublic String getNewColType()
public void setNewColType(String newType)
newType - new column's typepublic String getNewColComment()
public void setNewColComment(String newComment)
newComment - new column's commentpublic boolean getFirst()
public void setFirst(boolean first)
first - set the column to position 0public String getAfterCol()
public void setAfterCol(String afterCol)
afterCol - set the column's after positionpublic boolean getExpectView()
public void setExpectView(boolean expectView)
expectView - set whether to expect a view being alteredpublic String getNewLocation()
public void setNewLocation(String newLocation)
newLocation - new locationpublic boolean isProtectModeEnable()
public void setProtectModeEnable(boolean protectModeEnable)
public AlterTableDesc.ProtectModeType getProtectModeType()
public void setProtectModeType(AlterTableDesc.ProtectModeType protectModeType)
public Map<List<String>,String> getSkewedLocations()
public void setSkewedLocations(Map<List<String>,String> skewedLocations)
skewedLocations - the skewedLocations to setpublic boolean isTurnOffSorting()
public boolean isTurnOffSkewed()
public void setTurnOffSkewed(boolean turnOffSkewed)
turnOffSkewed - the turnOffSkewed to setpublic void setSkewedColNames(List<String> skewedColNames)
skewedColNames - the skewedColNames to setpublic void setSkewedColValues(List<List<String>> skewedColValues)
skewedColValues - the skewedColValues to setpublic void validate()
throws SemanticException
SemanticExceptionpublic void setTable(Table table)
table - the table to setpublic boolean isStoredAsSubDirectories()
public void setStoredAsSubDirectories(boolean isStoredAsSubDirectories)
isStoredAsSubDirectories - the isStoredAsSubDirectories to setpublic void setDropIfExists(boolean isDropIfExists)
isDropIfExists - the isDropIfExists to setpublic boolean getIsDropIfExists()
public boolean getIsCascade()
public void setIsCascade(boolean isCascade)
cascade - the isCascade to setpublic static boolean doesAlterTableTypeSupportPartialPartitionSpec(AlterTableDesc.AlterTableTypes type)
public org.apache.hadoop.hive.metastore.api.EnvironmentContext getEnvironmentContext()
public void setEnvironmentContext(org.apache.hadoop.hive.metastore.api.EnvironmentContext environmentContext)
public ReplicationSpec getReplicationSpec()
public void setWriteId(long writeId)
setWriteId in interface DDLDesc.DDLDescWithWriteIdpublic String getFullTableName()
getFullTableName in interface DDLDesc.DDLDescWithWriteIdpublic boolean mayNeedWriteId()
mayNeedWriteId in interface DDLDesc.DDLDescWithWriteIdpublic Long getWriteId()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.