|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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(Table table)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Table()
public Table(Table table)
public Table(String databaseName, String tableName)
Method Detail |
---|
public Table getTTable()
public void setTTable(Table tTable)
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 getSchema()
public final org.apache.hadoop.fs.Path getPath()
public final String getTableName()
public final URI 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 boolean isValidSpec(Map<String,String> spec) throws HiveException
HiveException
public void setProperty(String name, String value)
public String getProperty(String name)
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<FieldSchema> getPartCols()
public boolean isPartitionKey(String colName)
public String getBucketingDimensionId()
public void setDataLocation(URI uri)
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 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 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> getAllCols()
public void setPartCols(List<FieldSchema> partCols)
public String getDbName()
public int getNumBuckets()
protected void replaceFiles(org.apache.hadoop.fs.Path srcf) throws HiveException
srcf
- Source directory
HiveException
protected void copyFiles(org.apache.hadoop.fs.Path srcf) throws HiveException
srcf
- Files to be moved. Leaf directories or globbed file paths
HiveException
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 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<Order> getSortCols()
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 clearSerDeInfo()
public void setViewExpandedText(String viewExpandedText)
viewExpandedText
- the expanded view text to setpublic boolean isView()
public boolean isIndexTable()
public LinkedHashMap<String,String> createSpec(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<Index> getAllIndexes(short max) throws HiveException
HiveException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |