@Internal public class PartitionTempFileManager extends Object
Temporary file directory contains the following directory parts: 1.temporary base path directory. 2.task id directory. 3.directories to specify partitioning. 4.data files. eg: /tmp/task-0-attempt-0/p0=1/p1=2/fileName.
Constructor and Description |
---|
PartitionTempFileManager(FileSystemFactory factory,
Path tmpPath,
int taskNumber,
int attemptNumber) |
PartitionTempFileManager(FileSystemFactory factory,
Path tmpPath,
int taskNumber,
int attemptNumber,
OutputFileConfig outputFileConfig) |
Modifier and Type | Method and Description |
---|---|
static Map<LinkedHashMap<String,String>,List<Path>> |
collectPartSpecToPaths(FileSystem fs,
List<Path> taskPaths,
int partColSize)
Collect all partitioned paths, aggregate according to partition spec.
|
Path |
createPartitionDir(String... partitions)
Generate a new partition directory with partitions.
|
static List<Path> |
listTaskTemporaryPaths(FileSystem fs,
Path basePath,
java.util.function.BiPredicate<Integer,Integer> taskAttemptFilter)
Returns task temporary paths in this checkpoint.
|
public PartitionTempFileManager(FileSystemFactory factory, Path tmpPath, int taskNumber, int attemptNumber) throws IOException
IOException
public PartitionTempFileManager(FileSystemFactory factory, Path tmpPath, int taskNumber, int attemptNumber, OutputFileConfig outputFileConfig) throws IOException
IOException
public Path createPartitionDir(String... partitions)
public static List<Path> listTaskTemporaryPaths(FileSystem fs, Path basePath, java.util.function.BiPredicate<Integer,Integer> taskAttemptFilter) throws Exception
Exception
public static Map<LinkedHashMap<String,String>,List<Path>> collectPartSpecToPaths(FileSystem fs, List<Path> taskPaths, int partColSize)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.