public class PartitionPathUtils extends Object
Constructor and Description |
---|
PartitionPathUtils() |
Modifier and Type | Method and Description |
---|---|
static LinkedHashMap<String,String> |
extractPartitionSpecFromPath(Path currPath)
Make partition spec from path.
|
static List<String> |
generateHierarchicalPartitionPaths(LinkedHashMap<String,String> partitionSpec)
Generate all hierarchical paths from partition spec.
|
static String |
generatePartitionPath(LinkedHashMap<String,String> partitionSpec)
Make partition path from partition spec.
|
static String |
generatePartitionPath(Map<String,String> partitionSpec,
RowType partitionType) |
static List<String> |
generatePartitionPaths(List<Map<String,String>> partitions,
RowType partitionType) |
static String |
unescapePathName(String path) |
public static String generatePartitionPath(LinkedHashMap<String,String> partitionSpec)
partitionSpec
- The partition spec.public static List<String> generatePartitionPaths(List<Map<String,String>> partitions, RowType partitionType)
public static String generatePartitionPath(Map<String,String> partitionSpec, RowType partitionType)
public static List<String> generateHierarchicalPartitionPaths(LinkedHashMap<String,String> partitionSpec)
For example, if the partition spec is (pt1: '0601', pt2: '12', pt3: '30'), this method will return a list (start from index 0):
public static LinkedHashMap<String,String> extractPartitionSpecFromPath(Path currPath)
currPath
- partition file path.Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.