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(Table table) |
public Table()
public Table(Table table)
protected void initialize(Table table)
public boolean isDummyTable()
public Table getTTable()
public void setTTable(Table tTable)
public static Table getEmptyTable(String databaseName, String tableName)
public void checkValidity(org.apache.hadoop.conf.Configuration conf) throws HiveException
HiveException
public 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 final org.apache.hadoop.fs.Path getDataLocation()
public final Deserializer getDeserializer()
public final Class<? extends Deserializer> getDeserializerClass() throws Exception
Exception
public final Deserializer getDeserializer(boolean skipConfError)
public final Deserializer getDeserializerFromMetaStore(boolean skipConfError)
public HiveStorageHandler getStorageHandler()
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
SemanticException
public boolean isImmutable()
public void setTableType(TableType tableType)
public TableType getTableType()
public ArrayList<StructField> getFields()
public StructField getField(String fld)
public int getBucketingVersion()
public List<FieldSchema> getPartCols()
public 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
HiveException
public void setSortCols(List<Order> sortOrder) throws HiveException
HiveException
public void setSkewedValueLocationMap(List<String> valList, String dirName) throws HiveException
HiveException
public void setSkewedColValues(List<List<String>> skewedValues) throws HiveException
HiveException
public void setSkewedColNames(List<String> skewedColNames) throws HiveException
HiveException
public SkewedInfo getSkewedInfo()
public void setSkewedInfo(SkewedInfo skewedInfo) throws HiveException
HiveException
public boolean isStoredAsSubDirectories()
public void setStoredAsSubDirectories(boolean storedAsSubDirectories) throws HiveException
HiveException
public List<FieldSchema> getCols()
public List<FieldSchema> getColsForMetastore()
public List<FieldSchema> getAllCols()
public void setPartCols(List<FieldSchema> partCols)
public String getCatName()
public String getDbName()
public int getNumBuckets()
public void setInputFormatClass(String name) throws HiveException
HiveException
public void setOutputFormatClass(String name) throws HiveException
HiveException
public boolean isPartitioned()
public void setFields(List<FieldSchema> fields)
public void setNumBuckets(int nb)
public String getOwner()
Table.getOwner()
public 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(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 void setTableName(String tableName)
public void setDbName(String databaseName)
public List<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 CreationMetadata getCreationMetadata()
public void setCreationMetadata(CreationMetadata creationMetadata)
creationMetadata
- the creation metadata (only for materialized views)public void clearSerDeInfo()
public boolean isView()
public boolean isMaterializedView()
public LinkedHashMap<String,String> createSpec(Partition tp)
tp
- Use the information from this partition.public Table copy() throws HiveException
HiveException
public 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
HiveException
public 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<FieldSchema> columns, List<FieldSchema> partCols) throws HiveException
HiveException
public BaseSemanticAnalyzer.TableSpec getTableSpec()
public void setTableSpec(BaseSemanticAnalyzer.TableSpec tableSpec)
public boolean hasDeserializer()
Copyright © 2019 The Apache Software Foundation. All rights reserved.