@PublicEvolving public class HiveTablePartition extends Object implements Serializable
Constructor and Description |
---|
HiveTablePartition(org.apache.hadoop.hive.metastore.api.StorageDescriptor storageDescriptor,
Map<String,String> partitionSpec,
Properties tableProps)
Creates a HiveTablePartition to describe a hive table or partition.
|
HiveTablePartition(org.apache.hadoop.hive.metastore.api.StorageDescriptor storageDescriptor,
Properties tableProps)
Creates a HiveTablePartition to describe a hive table.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Map<String,String> |
getPartitionSpec() |
org.apache.hadoop.hive.metastore.api.StorageDescriptor |
getStorageDescriptor() |
Properties |
getTableProps() |
int |
hashCode() |
static HiveTablePartition |
ofPartition(HiveConf hiveConf,
String hiveVersion,
String dbName,
String tableName,
LinkedHashMap<String,String> partitionSpec)
Creates a HiveTablePartition to represent a hive partition.
|
static HiveTablePartition |
ofTable(HiveConf hiveConf,
String hiveVersion,
String dbName,
String tableName)
Creates a HiveTablePartition to represent a hive table.
|
String |
toString() |
public HiveTablePartition(org.apache.hadoop.hive.metastore.api.StorageDescriptor storageDescriptor, Properties tableProps)
storageDescriptor
- SD of the hive tabletableProps
- properties of the hive tablepublic HiveTablePartition(org.apache.hadoop.hive.metastore.api.StorageDescriptor storageDescriptor, Map<String,String> partitionSpec, Properties tableProps)
storageDescriptor
- SD of the hive table or partitionpartitionSpec
- the spec for the hive partition, and should be empty if the
HiveTablePartition is to describe a hive tabletableProps
- properties of the hive table or partitionpublic org.apache.hadoop.hive.metastore.api.StorageDescriptor getStorageDescriptor()
public Properties getTableProps()
public static HiveTablePartition ofTable(HiveConf hiveConf, @Nullable String hiveVersion, String dbName, String tableName)
hiveConf
- the HiveConf used to connect to HMShiveVersion
- the version of hive in use, if it's null the version will be automatically
detecteddbName
- name of the databasetableName
- name of the tablepublic static HiveTablePartition ofPartition(HiveConf hiveConf, @Nullable String hiveVersion, String dbName, String tableName, LinkedHashMap<String,String> partitionSpec)
hiveConf
- the HiveConf used to connect to HMShiveVersion
- the version of hive in use, if it's null the version will be automatically
detecteddbName
- name of the databasetableName
- name of the tablepartitionSpec
- map from each partition column to its value. The map should contain
exactly all the partition columns and in the order in which the partition columns are
definedCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.