|
||||||||||
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.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,
org.apache.hadoop.hive.metastore.api.Partition tp)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Partition()
public Partition(Table tbl) throws HiveException
HiveException
public Partition(Table tbl, org.apache.hadoop.hive.metastore.api.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 static org.apache.hadoop.hive.metastore.api.Partition createMetaPartitionObject(Table tbl, Map<String,String> partSpec, org.apache.hadoop.fs.Path location) throws HiveException
HiveException
public static org.apache.hadoop.hive.metastore.api.StorageDescriptor cloneSd(Table tbl) throws HiveException
HiveException
public String getName()
public org.apache.hadoop.fs.Path[] getPath()
public org.apache.hadoop.fs.Path getDataLocation()
public final Deserializer getDeserializer()
public Properties getSchema()
public Properties getMetadataFromPartitionSchema()
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 void setBucketCount(int newBucketNum)
public List<String> getBucketCols()
public List<org.apache.hadoop.hive.metastore.api.Order> getSortCols()
public List<String> getSortColNames()
public org.apache.hadoop.fs.FileStatus[] getSortedPaths()
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 org.apache.hadoop.hive.metastore.api.Partition getTPartition()
public void setTPartition(org.apache.hadoop.hive.metastore.api.Partition partition)
public Map<String,String> getParameters()
public List<org.apache.hadoop.hive.metastore.api.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 boolean isStoredAsSubDirectories()
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 |