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) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkValidity(org.apache.hadoop.conf.Configuration conf) |
void |
clearSerDeInfo() |
Table |
copy() |
LinkedHashMap<String,String> |
createSpec(org.apache.hadoop.hive.metastore.api.Partition tp)
Creates a partition name -> value spec map object
|
boolean |
equals(Object obj) |
List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getAllCols()
Returns a list of all the columns of the table (data columns + partition
columns in that order.
|
List<String> |
getBucketCols() |
String |
getBucketingDimensionId() |
int |
getBucketingVersion() |
String |
getCatName() |
List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getCols() |
List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getColsForMetastore() |
String |
getCompleteName() |
static String |
getCompleteName(String dbName,
String tabName) |
int |
getCreateTime() |
org.apache.hadoop.hive.metastore.api.CreationMetadata |
getCreationMetadata() |
org.apache.hadoop.fs.Path |
getDataLocation() |
String |
getDbName() |
Deserializer |
getDeserializer() |
Deserializer |
getDeserializer(boolean skipConfError) |
Class<? extends Deserializer> |
getDeserializerClass() |
Deserializer |
getDeserializerFromMetaStore(boolean skipConfError) |
static org.apache.hadoop.hive.metastore.api.Table |
getEmptyTable(String databaseName,
String tableName)
Initialize an empty table.
|
StructField |
getField(String fld) |
ArrayList<StructField> |
getFields() |
String |
getFullyQualifiedName() |
Class<? extends org.apache.hadoop.mapred.InputFormat> |
getInputFormatClass() |
int |
getLastAccessTime() |
Properties |
getMetadata() |
int |
getNumBuckets() |
Class<? extends org.apache.hadoop.mapred.OutputFormat> |
getOutputFormatClass() |
String |
getOwner() |
org.apache.hadoop.hive.metastore.api.PrincipalType |
getOwnerType() |
Map<String,String> |
getParameters() |
org.apache.hadoop.hive.metastore.api.FieldSchema |
getPartColByName(String colName) |
List<String> |
getPartColNames() |
List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getPartCols() |
List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getPartitionKeys() |
org.apache.hadoop.fs.Path |
getPath() |
String |
getProperty(String name) |
int |
getRetention() |
org.apache.hadoop.hive.metastore.api.StorageDescriptor |
getSd() |
String |
getSerdeParam(String param) |
String |
getSerializationLib() |
List<String> |
getSkewedColNames() |
Map<List<String>,String> |
getSkewedColValueLocationMaps() |
List<List<String>> |
getSkewedColValues() |
org.apache.hadoop.hive.metastore.api.SkewedInfo |
getSkewedInfo() |
List<org.apache.hadoop.hive.metastore.api.Order> |
getSortCols() |
org.apache.hadoop.fs.FileStatus[] |
getSortedPaths() |
HiveStorageHandler |
getStorageHandler() |
String |
getTableName() |
BaseSemanticAnalyzer.TableSpec |
getTableSpec() |
TableType |
getTableType() |
org.apache.hadoop.hive.metastore.api.Table |
getTTable()
This function should only be used in serialization.
|
String |
getViewExpandedText() |
String |
getViewOriginalText() |
boolean |
hasDeserializer() |
int |
hashCode() |
static boolean |
hasMetastoreBasedSchema(HiveConf conf,
String serdeLib) |
protected void |
initialize(org.apache.hadoop.hive.metastore.api.Table table) |
boolean |
isDummyTable() |
boolean |
isEmpty() |
boolean |
isImmutable() |
boolean |
isMaterializedTable() |
boolean |
isMaterializedView() |
boolean |
isNonNative() |
boolean |
isPartitioned() |
boolean |
isPartitionKey(String colName) |
boolean |
isRewriteEnabled() |
boolean |
isStoredAsSubDirectories() |
boolean |
isTemporary() |
boolean |
isView() |
void |
setBucketCols(List<String> bucketCols) |
void |
setCreateTime(int createTime) |
void |
setCreationMetadata(org.apache.hadoop.hive.metastore.api.CreationMetadata creationMetadata) |
void |
setDataLocation(org.apache.hadoop.fs.Path path) |
void |
setDbName(String databaseName) |
void |
setFields(List<org.apache.hadoop.hive.metastore.api.FieldSchema> fields) |
void |
setInputFormatClass(Class<? extends org.apache.hadoop.mapred.InputFormat> inputFormatClass) |
void |
setInputFormatClass(String name) |
void |
setLastAccessTime(int lastAccessTime) |
void |
setMaterializedTable(boolean materializedTable) |
void |
setNumBuckets(int nb) |
void |
setOutputFormatClass(Class<? extends org.apache.hadoop.mapred.OutputFormat> outputFormatClass) |
void |
setOutputFormatClass(String name) |
void |
setOwner(String owner) |
void |
setOwnerType(org.apache.hadoop.hive.metastore.api.PrincipalType ownerType) |
void |
setParameters(Map<String,String> params) |
void |
setPartCols(List<org.apache.hadoop.hive.metastore.api.FieldSchema> partCols) |
void |
setProperty(String name,
String value) |
void |
setRetention(int retention) |
void |
setRewriteEnabled(boolean rewriteEnabled) |
String |
setSerdeParam(String param,
String value) |
void |
setSerializationLib(String lib) |
void |
setSkewedColNames(List<String> skewedColNames) |
void |
setSkewedColValues(List<List<String>> skewedValues) |
void |
setSkewedInfo(org.apache.hadoop.hive.metastore.api.SkewedInfo skewedInfo) |
void |
setSkewedValueLocationMap(List<String> valList,
String dirName) |
void |
setSortCols(List<org.apache.hadoop.hive.metastore.api.Order> sortOrder) |
void |
setStoredAsSubDirectories(boolean storedAsSubDirectories) |
void |
setTableName(String tableName) |
void |
setTableSpec(BaseSemanticAnalyzer.TableSpec tableSpec) |
void |
setTableType(TableType tableType) |
void |
setTTable(org.apache.hadoop.hive.metastore.api.Table tTable)
This function should only be called by Java serialization.
|
void |
setViewExpandedText(String viewExpandedText) |
void |
setViewOriginalText(String viewOriginalText) |
static boolean |
shouldStoreFieldsInMetastore(HiveConf conf,
String serdeLib,
Map<String,String> tableParams) |
String |
toString() |
void |
unsetDataLocation() |
static void |
validateColumns(List<org.apache.hadoop.hive.metastore.api.FieldSchema> columns,
List<org.apache.hadoop.hive.metastore.api.FieldSchema> partCols) |
void |
validatePartColumnNames(Map<String,String> spec,
boolean shouldBeFull) |
public Table()
public Table(org.apache.hadoop.hive.metastore.api.Table table)
protected void initialize(org.apache.hadoop.hive.metastore.api.Table table)
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 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 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 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()
org.apache.hadoop.hive.metastore.api.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 - org.apache.hadoop.hive.metastore.api.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 org.apache.hadoop.hive.metastore.api.CreationMetadata getCreationMetadata()
public void setCreationMetadata(org.apache.hadoop.hive.metastore.api.CreationMetadata creationMetadata)
creationMetadata - 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 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()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.