Package org.apache.polaris.service.task
Class FileCleanupTaskHandler
java.lang.Object
org.apache.polaris.service.task.FileCleanupTaskHandler
- All Implemented Interfaces:
TaskHandler
- Direct Known Subclasses:
BatchFileCleanupTaskHandler,ManifestFileCleanupTaskHandler
FileCleanupTaskHandler responsible for cleaning up files in table tasks. Handles retries
for file deletions and skips files that are already missing. Subclasses must implement
task-specific logic.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ExecutorServicestatic final intfinal TaskFileIOSupplierstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionFileCleanupTaskHandler(TaskFileIOSupplier fileIOSupplier, ExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescriptionabstract booleancanHandleTask(org.apache.polaris.core.entity.TaskEntity task) abstract booleanhandleTask(org.apache.polaris.core.entity.TaskEntity task, org.apache.polaris.core.context.CallContext callContext) tryDelete(org.apache.iceberg.catalog.TableIdentifier tableId, org.apache.iceberg.io.FileIO fileIO, String baseFile, String file, Throwable e, int attempt)
-
Field Details
-
MAX_ATTEMPTS
public static final int MAX_ATTEMPTS- See Also:
-
FILE_DELETION_RETRY_MILLIS
public static final int FILE_DELETION_RETRY_MILLIS- See Also:
-
fileIOSupplier
-
executorService
-
-
Constructor Details
-
FileCleanupTaskHandler
-
-
Method Details
-
canHandleTask
public abstract boolean canHandleTask(org.apache.polaris.core.entity.TaskEntity task) - Specified by:
canHandleTaskin interfaceTaskHandler
-
handleTask
public abstract boolean handleTask(org.apache.polaris.core.entity.TaskEntity task, org.apache.polaris.core.context.CallContext callContext) - Specified by:
handleTaskin interfaceTaskHandler
-
tryDelete
public CompletableFuture<Void> tryDelete(org.apache.iceberg.catalog.TableIdentifier tableId, org.apache.iceberg.io.FileIO fileIO, String baseFile, String file, Throwable e, int attempt)
-