public class LocalOrphanFilesClean extends OrphanFilesClean
OrphanFilesClean
, it will use thread pool to execute deletion.
Note that, this class will be used when the orphan clean mode is local, else orphan clean will use distributed one. See `FlinkOrphanFilesClean` and `SparkOrphanFilesClean`.
OrphanFilesClean.ReaderWithIOException<T>
fileCleaner, fileIO, location, LOG, olderThanMillis, partitionKeysNum, READ_FILE_RETRY_INTERVAL, READ_FILE_RETRY_NUM, table
Constructor and Description |
---|
LocalOrphanFilesClean(FileStoreTable table) |
LocalOrphanFilesClean(FileStoreTable table,
long olderThanMillis) |
LocalOrphanFilesClean(FileStoreTable table,
long olderThanMillis,
SerializableConsumer<Path> fileCleaner) |
Modifier and Type | Method and Description |
---|---|
List<Path> |
clean() |
static List<LocalOrphanFilesClean> |
createOrphanFilesCleans(Catalog catalog,
String databaseName,
String tableName,
long olderThanMillis,
SerializableConsumer<Path> fileCleaner,
Integer parallelism) |
static long |
executeDatabaseOrphanFiles(Catalog catalog,
String databaseName,
String tableName,
long olderThanMillis,
SerializableConsumer<Path> fileCleaner,
Integer parallelism) |
cleanSnapshotDir, collectWithoutDataFile, collectWithoutDataFileWithManifestFlag, createFileCleaner, listPaimonFileDirs, oldEnough, olderThanMillis, retryReadingFiles, safelyGetAllSnapshots, tryBestListingDirs, validBranches
public LocalOrphanFilesClean(FileStoreTable table)
public LocalOrphanFilesClean(FileStoreTable table, long olderThanMillis)
public LocalOrphanFilesClean(FileStoreTable table, long olderThanMillis, SerializableConsumer<Path> fileCleaner)
public List<Path> clean() throws IOException, ExecutionException, InterruptedException
public static List<LocalOrphanFilesClean> createOrphanFilesCleans(Catalog catalog, String databaseName, @Nullable String tableName, long olderThanMillis, SerializableConsumer<Path> fileCleaner, @Nullable Integer parallelism) throws Catalog.DatabaseNotExistException, Catalog.TableNotExistException
public static long executeDatabaseOrphanFiles(Catalog catalog, String databaseName, @Nullable String tableName, long olderThanMillis, SerializableConsumer<Path> fileCleaner, @Nullable Integer parallelism) throws Catalog.DatabaseNotExistException, Catalog.TableNotExistException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.