public class Partition extends Object implements Serializable
| Constructor and Description |
|---|
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) |
public Partition()
public Partition(Table tbl) throws HiveException
HiveExceptionpublic Partition(Table tbl, org.apache.hadoop.hive.metastore.api.Partition tp) throws HiveException
HiveExceptionpublic 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.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
HiveExceptionprotected void initialize(Table table, org.apache.hadoop.hive.metastore.api.Partition tPartition) throws HiveException
table - Table the partition belongs totPartition - Thrift Partition objectHiveException - Thrown if we cannot initialize the partitionpublic String getName()
public org.apache.hadoop.fs.Path[] getPath()
public org.apache.hadoop.fs.Path getPartitionPath()
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
HiveExceptionpublic final Class<? extends org.apache.hadoop.mapred.OutputFormat> getOutputFormatClass() throws HiveException
HiveExceptionpublic int getBucketCount()
public void setBucketCount(int newBucketNum)
public List<org.apache.hadoop.hive.metastore.api.Order> getSortCols()
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
HiveExceptionpublic LinkedHashMap<String,String> getSpec()
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 List<org.apache.hadoop.hive.metastore.api.FieldSchema> getCols()
public List<org.apache.hadoop.hive.metastore.api.FieldSchema> getColsForMetastore()
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 String getCompleteName()
public int getLastAccessTime()
public void setLastAccessTime(int lastAccessTime)
public boolean isStoredAsSubDirectories()
public void setSkewedValueLocationMap(List<String> valList, String dirName) throws HiveException
HiveExceptionpublic void checkValidity()
throws HiveException
HiveExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.