public class Table extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
class |
Table.ValidationFailureSemanticException
Marker SemanticException, so that processing that allows for table validation failures
and appropriately handles them can recover from these types of SemanticExceptions
|
| Constructor and Description |
|---|
Table()
Used only for serialization.
|
Table(String databaseName,
String tableName) |
Table(org.apache.hadoop.hive.metastore.api.Table table) |
public Table()
public Table(org.apache.hadoop.hive.metastore.api.Table table)
protected void initialize(org.apache.hadoop.hive.metastore.api.Table table)
public Table makeCopy()
public boolean isDummyTable()
public org.apache.hadoop.hive.metastore.api.Table getTTable()
public void setTTable(org.apache.hadoop.hive.metastore.api.Table tTable)
public static org.apache.hadoop.hive.metastore.api.Table getEmptyTable(String databaseName, String tableName)
public void checkValidity(org.apache.hadoop.conf.Configuration conf)
throws HiveException
HiveExceptionpublic void validateName(org.apache.hadoop.conf.Configuration conf)
throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.StorageDescriptor getSd()
public void setInputFormatClass(Class<? extends org.apache.hadoop.mapred.InputFormat> inputFormatClass)
public void setOutputFormatClass(Class<? extends org.apache.hadoop.mapred.OutputFormat> outputFormatClass)
public final Properties getMetadata()
public final org.apache.hadoop.fs.Path getPath()
public final String getTableName()
public TableName getFullTableName()
public final org.apache.hadoop.fs.Path getDataLocation()
public final Deserializer getDeserializer()
public final Class<? extends Deserializer> getDeserializerClass() throws Exception
Exceptionpublic final Deserializer getDeserializer(boolean skipConfError)
public final Deserializer getDeserializerFromMetaStore(boolean skipConfError)
public HiveStorageHandler getStorageHandler()
public HiveStorageHandler getStorageHandlerWithoutCaching()
public void setStorageHandler(HiveStorageHandler sh)
public StorageHandlerInfo getStorageHandlerInfo()
public void setStorageHandlerInfo(StorageHandlerInfo storageHandlerInfo)
public final Class<? extends org.apache.hadoop.mapred.InputFormat> getInputFormatClass()
public final Class<? extends org.apache.hadoop.mapred.OutputFormat> getOutputFormatClass()
public boolean isMaterializedTable()
public void setMaterializedTable(boolean materializedTable)
public final void validatePartColumnNames(Map<String,String> spec, boolean shouldBeFull) throws SemanticException
SemanticExceptionpublic boolean isImmutable()
public void setTableType(TableType tableType)
public TableType getTableType()
public ArrayList<StructField> getFields()
public StructField getField(String fld)
public int getBucketingVersion()
public List<org.apache.hadoop.hive.metastore.api.FieldSchema> getPartCols()
public org.apache.hadoop.hive.metastore.api.FieldSchema getPartColByName(String colName)
public boolean isPartitionKey(String colName)
public String getBucketingDimensionId()
public void setDataLocation(org.apache.hadoop.fs.Path path)
public void unsetDataLocation()
public void setBucketCols(List<String> bucketCols) throws HiveException
HiveExceptionpublic void setSortCols(List<org.apache.hadoop.hive.metastore.api.Order> sortOrder) throws HiveException
HiveExceptionpublic void setSkewedValueLocationMap(List<String> valList, String dirName) throws HiveException
HiveExceptionpublic void setSkewedColValues(List<List<String>> skewedValues) throws HiveException
HiveExceptionpublic void setSkewedColNames(List<String> skewedColNames) throws HiveException
HiveExceptionpublic org.apache.hadoop.hive.metastore.api.SkewedInfo getSkewedInfo()
public void setSkewedInfo(org.apache.hadoop.hive.metastore.api.SkewedInfo skewedInfo) throws HiveException
HiveExceptionpublic boolean isStoredAsSubDirectories()
public void setStoredAsSubDirectories(boolean storedAsSubDirectories)
throws HiveException
HiveExceptionpublic List<org.apache.hadoop.hive.metastore.api.FieldSchema> getCols()
public List<org.apache.hadoop.hive.metastore.api.FieldSchema> getColsForMetastore()
public List<org.apache.hadoop.hive.metastore.api.FieldSchema> getAllCols()
public void setPartCols(List<org.apache.hadoop.hive.metastore.api.FieldSchema> partCols)
public String getCatName()
public String getDbName()
public int getNumBuckets()
public void setInputFormatClass(String name) throws HiveException
HiveExceptionpublic void setOutputFormatClass(String name) throws HiveException
HiveExceptionpublic boolean isPartitioned()
public void setFields(List<org.apache.hadoop.hive.metastore.api.FieldSchema> fields)
public void setNumBuckets(int nb)
public String getOwner()
Table.getOwner()public org.apache.hadoop.hive.metastore.api.PrincipalType getOwnerType()
Table.getOwnerType()public Map<String,String> getParameters()
Table.getParameters()public int getRetention()
Table.getRetention()public void setOwner(String owner)
owner - Table.setOwner(java.lang.String)public void setOwnerType(org.apache.hadoop.hive.metastore.api.PrincipalType ownerType)
ownerType - Table.setOwnerType(org.apache.hadoop.hive.metastore.api.PrincipalType)public void setRetention(int retention)
retention - Table.setRetention(int)public void setSerializationLib(String lib)
public String getSerializationLib()
public List<org.apache.hadoop.hive.metastore.api.Order> getSortCols()
public void setTableName(String tableName)
public void setDbName(String databaseName)
public List<org.apache.hadoop.hive.metastore.api.FieldSchema> getPartitionKeys()
public String getViewOriginalText()
public void setViewOriginalText(String viewOriginalText)
viewOriginalText - the original view text to setpublic String getViewExpandedText()
public void setViewExpandedText(String viewExpandedText)
viewExpandedText - the expanded view text to setpublic boolean isRewriteEnabled()
public void setRewriteEnabled(boolean rewriteEnabled)
rewriteEnabled - whether this view can be used for rewriting queriespublic MaterializedViewMetadata getMVMetadata()
public void setMaterializedViewMetadata(MaterializedViewMetadata materializedViewMetadata)
materializedViewMetadata - the creation metadata (only for materialized views)public void clearSerDeInfo()
public boolean isView()
public boolean isMaterializedView()
public LinkedHashMap<String,String> createSpec(org.apache.hadoop.hive.metastore.api.Partition tp)
tp - Use the information from this partition.public Table copy() throws HiveException
HiveExceptionpublic int getCreateTime()
public void setCreateTime(int createTime)
public int getLastAccessTime()
public void setLastAccessTime(int lastAccessTime)
public boolean isNonNative()
public String getFullyQualifiedName()
public String getCompleteName()
public org.apache.hadoop.fs.FileStatus[] getSortedPaths()
public boolean isEmpty()
throws HiveException
HiveExceptionpublic boolean isTemporary()
public void setTemporary(boolean isTemporary)
public static boolean hasMetastoreBasedSchema(HiveConf conf, String serdeLib)
public static boolean shouldStoreFieldsInMetastore(HiveConf conf, String serdeLib, Map<String,String> tableParams)
public static void validateColumns(List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns, List<org.apache.hadoop.hive.metastore.api.FieldSchema> partCols) throws HiveException
HiveExceptionpublic BaseSemanticAnalyzer.TableSpec getTableSpec()
public void setTableSpec(BaseSemanticAnalyzer.TableSpec tableSpec)
public boolean hasDeserializer()
public String getCatalogName()
public void setOutdatedForRewriting(Boolean validForRewritingMaterializedView)
public Boolean isOutdatedForRewriting()
public org.apache.hadoop.hive.metastore.api.ColumnStatistics getColStats()
public void setStatsStateLikeNewTable()
public TableConstraintsInfo getTableConstraintsInfo()
public void setTableConstraintsInfo(TableConstraintsInfo tableConstraintsInfo)
public PrimaryKeyInfo getPrimaryKeyInfo()
public ForeignKeyInfo getForeignKeyInfo()
public UniqueConstraint getUniqueKeyInfo()
public NotNullConstraint getNotNullConstraint()
public DefaultConstraint getDefaultConstraint()
public CheckConstraint getCheckConstraint()
public void copyConstraints(Table tbl)
public boolean equalsWithIgnoreWriteId(Table tbl)
tbl - table to compare withpublic String getAsOfVersion()
public void setAsOfVersion(String asOfVersion)
public String getVersionIntervalFrom()
public void setVersionIntervalFrom(String versionIntervalFrom)
public String getAsOfTimestamp()
public void setAsOfTimestamp(String asOfTimestamp)
public String getMetaTable()
public void setMetaTable(String metaTable)
public String getSnapshotRef()
public void setSnapshotRef(String snapshotRef)
public org.apache.hadoop.hive.metastore.api.SourceTable createSourceTable()
Copyright © 2024 The Apache Software Foundation. All rights reserved.