Class CompactFileUtils
- java.lang.Object
-
- org.apache.flink.connector.file.table.utils.CompactFileUtils
-
public class CompactFileUtils extends Object
Utils for compacting files.
-
-
Constructor Summary
Constructors Constructor Description CompactFileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Path
doCompact(FileSystem fileSystem, String partition, List<Path> paths, Path target, Configuration config, CompactReader.Factory<T> readerFactory, CompactWriter.Factory<T> writerFactory)
Do Compaction: - Target file exists, do nothing. - Can do compaction: - Single file, do atomic renaming, there are optimizations for FileSystem. - Multiple file, do reading and writing.
-
-
-
Method Detail
-
doCompact
@Nullable public static <T> Path doCompact(FileSystem fileSystem, String partition, List<Path> paths, Path target, Configuration config, CompactReader.Factory<T> readerFactory, CompactWriter.Factory<T> writerFactory) throws IOException
Do Compaction: - Target file exists, do nothing. - Can do compaction: - Single file, do atomic renaming, there are optimizations for FileSystem. - Multiple file, do reading and writing.- Throws:
IOException
-
-