|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.hive.ql.metadata.Table
public class Table
A Hive Table: is a fundamental unit of data in Hive that shares a common schema/DDL. Please note that the ql code should always go through methods of this class to access the metadata, instead of directly accessing org.apache.hadoop.hive.metastore.api.Table. This helps to isolate the metastore code and the ql code.
Constructor Summary | |
---|---|
Table()
Used only for serialization. |
|
Table(String databaseName,
String tableName)
|
|
Table(org.apache.hadoop.hive.metastore.api.Table table)
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Table()
public Table(org.apache.hadoop.hive.metastore.api.Table table)
public Table(String databaseName, String tableName)
Method Detail |
---|
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() throws HiveException
HiveException
public void setInputFormatClass(Class<? extends org.apache.hadoop.mapred.InputFormat> inputFormatClass)
public void setOutputFormatClass(Class<? extends HiveOutputFormat> 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 HiveStorageHandler getStorageHandler()
public final Class<? extends org.apache.hadoop.mapred.InputFormat> getInputFormatClass()
public final Class<? extends HiveOutputFormat> getOutputFormatClass()
public final void validatePartColumnNames(Map<String,String> spec, boolean shouldBeFull) throws SemanticException
SemanticException
public void setProperty(String name, String value)
public String getProperty(String name)
public boolean isImmutable()
public void setTableType(TableType tableType)
public TableType getTableType()
public ArrayList<StructField> getFields()
public StructField getField(String fld)
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public List<org.apache.hadoop.hive.metastore.api.FieldSchema> getPartCols()
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<org.apache.hadoop.hive.metastore.api.Order> sortOrder) throws HiveException
HiveException
public void setSkewedValueLocationMap(List<String> valList, String dirName) throws HiveException
HiveException
public Map<List<String>,String> getSkewedColValueLocationMaps()
public void setSkewedColValues(List<List<String>> skewedValues) throws HiveException
HiveException
public List<List<String>> getSkewedColValues()
public void setSkewedColNames(List<String> skewedColNames) throws HiveException
HiveException
public List<String> getSkewedColNames()
public org.apache.hadoop.hive.metastore.api.SkewedInfo getSkewedInfo()
public void setSkewedInfo(org.apache.hadoop.hive.metastore.api.SkewedInfo skewedInfo) throws HiveException
HiveException
public boolean isStoredAsSubDirectories()
public void setStoredAsSubDirectories(boolean storedAsSubDirectories) throws HiveException
HiveException
public List<org.apache.hadoop.hive.metastore.api.FieldSchema> getCols()
public List<org.apache.hadoop.hive.metastore.api.FieldSchema> getAllCols()
public void setPartCols(List<org.apache.hadoop.hive.metastore.api.FieldSchema> partCols)
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<org.apache.hadoop.hive.metastore.api.FieldSchema> fields)
public void setNumBuckets(int nb)
public String getOwner()
Table.getOwner()
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 setRetention(int retention)
retention
- Table.setRetention(int)
public void setSerializationLib(String lib)
public String getSerializationLib()
public String getSerdeParam(String param)
public String setSerdeParam(String param, String value)
public List<String> getBucketCols()
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 clearSerDeInfo()
public void setViewExpandedText(String viewExpandedText)
viewExpandedText
- the expanded view text to setpublic boolean isView()
public boolean isIndexTable()
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
HiveException
public void setCreateTime(int createTime)
public int getLastAccessTime()
public void setLastAccessTime(int lastAccessTime)
public boolean isNonNative()
public void setProtectMode(ProtectMode protectMode)
protectMode
- public ProtectMode getProtectMode()
public boolean isOffline()
public boolean canDrop()
public boolean canWrite()
public String getCompleteName()
public List<org.apache.hadoop.hive.metastore.api.Index> getAllIndexes(short max) throws HiveException
HiveException
public org.apache.hadoop.fs.FileStatus[] getSortedPaths()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |