|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.metadata.Partition
public class Partition
A Hive Table Partition: is a fundamental storage unit within a Table. 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.Partition. This helps to isolate the metastore code and the ql code.
Constructor Summary | |
---|---|
Partition()
Used only for serialization. |
|
Partition(Table tbl)
create an empty partition. |
|
Partition(Table tbl,
Map<String,String> partSpec,
org.apache.hadoop.fs.Path location)
Create partition object with the given info. |
|
Partition(Table tbl,
Partition tp)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Partition()
public Partition(Table tbl) throws HiveException
HiveException
public Partition(Table tbl, Partition tp) throws HiveException
HiveException
public Partition(Table tbl, Map<String,String> partSpec, org.apache.hadoop.fs.Path location) throws HiveException
tbl
- Table the partition will be in.partSpec
- Partition specifications.location
- Location of the partition, relative to the table.
HiveException
- Thrown if we could not create the partition.Method Detail |
---|
public List<String> getValues()
Partition.getValues()
public String getName()
public org.apache.hadoop.fs.Path[] getPath()
public org.apache.hadoop.fs.Path getPartitionPath()
public final URI getDataLocation()
public final Deserializer getDeserializer()
public final Deserializer getDeserializer(Properties props)
public Properties getSchema()
public Properties getSchemaFromTableSchema(Properties tblSchema)
public void setInputFormatClass(Class<? extends org.apache.hadoop.mapred.InputFormat> inputFormatClass)
inputFormatClass
- public void setOutputFormatClass(Class<? extends HiveOutputFormat> outputFormatClass)
outputFormatClass
- public final Class<? extends org.apache.hadoop.mapred.InputFormat> getInputFormatClass() throws HiveException
HiveException
public final Class<? extends HiveOutputFormat> getOutputFormatClass() throws HiveException
HiveException
public int getBucketCount()
public List<String> getBucketCols()
public List<Order> getSortCols()
public List<String> getSortColNames()
public org.apache.hadoop.fs.Path getBucketPath(int bucketNum)
public org.apache.hadoop.fs.Path[] getPath(Sample s) throws HiveException
HiveException
public LinkedHashMap<String,String> getSpec()
public String toString()
toString
in class Object
public Table getTable()
public void setTable(Table table)
public Partition getTPartition()
public void setTPartition(Partition partition)
public Map<String,String> getParameters()
public List<FieldSchema> getCols()
public String getLocation()
public void setLocation(String location)
public void setValues(Map<String,String> partSpec) throws HiveException
partSpec
- Partition specifications.
HiveException
- Thrown if we could not create the partition.public void setProtectMode(ProtectMode protectMode)
protectMode
- public ProtectMode getProtectMode()
public boolean isOffline()
public boolean canDrop()
public boolean canWrite()
public String getCompleteName()
public int getLastAccessTime()
public void setLastAccessTime(int lastAccessTime)
public List<List<String>> getSkewedColValues()
public List<String> getSkewedColNames()
public void setSkewedValueLocationMap(List<String> valList, String dirName) throws HiveException
HiveException
public Map<List<String>,String> getSkewedColValueLocationMaps()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |