public class HivePartitionUtils extends Object
Constructor and Description |
---|
HivePartitionUtils() |
Modifier and Type | Method and Description |
---|---|
static List<HiveTablePartition> |
getAllPartitions(org.apache.hadoop.mapred.JobConf jobConf,
String hiveVersion,
ObjectPath tablePath,
List<String> partitionColNames,
List<Map<String,String>> remainingPartitions)
Returns all HiveTablePartitions of a hive table, returns single HiveTablePartition if the
hive table is not partitioned.
|
static org.apache.hadoop.fs.FileStatus[] |
getFileStatusRecurse(org.apache.hadoop.fs.Path path,
int expectLevel,
org.apache.hadoop.fs.FileSystem fs) |
static Map<String,Object> |
parsePartitionValues(Map<String,String> partitionSpecs,
String[] fieldNames,
DataType[] fieldTypes,
String defaultPartitionName,
HiveShim shim)
Parse partition string specs into object values.
|
static List<String> |
partitionSpecToValues(Map<String,String> spec,
List<String> partitionColNames) |
static Object |
restorePartitionValueFromType(HiveShim shim,
String valStr,
LogicalType partitionType,
String defaultPartitionName) |
static HiveTablePartition |
toHiveTablePartition(List<String> partitionKeys,
Properties tableProps,
org.apache.hadoop.hive.metastore.api.Partition partition) |
public static Map<String,Object> parsePartitionValues(Map<String,String> partitionSpecs, String[] fieldNames, DataType[] fieldTypes, String defaultPartitionName, HiveShim shim)
public static Object restorePartitionValueFromType(HiveShim shim, String valStr, LogicalType partitionType, String defaultPartitionName)
public static List<HiveTablePartition> getAllPartitions(org.apache.hadoop.mapred.JobConf jobConf, String hiveVersion, ObjectPath tablePath, List<String> partitionColNames, List<Map<String,String>> remainingPartitions)
public static List<String> partitionSpecToValues(Map<String,String> spec, List<String> partitionColNames)
public static HiveTablePartition toHiveTablePartition(List<String> partitionKeys, Properties tableProps, org.apache.hadoop.hive.metastore.api.Partition partition)
public static org.apache.hadoop.fs.FileStatus[] getFileStatusRecurse(org.apache.hadoop.fs.Path path, int expectLevel, org.apache.hadoop.fs.FileSystem fs)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.