Package org.apache.polaris.service.task
Class ManifestFileCleanupTaskHandler
java.lang.Object
org.apache.polaris.service.task.FileCleanupTaskHandler
org.apache.polaris.service.task.ManifestFileCleanupTaskHandler
- All Implemented Interfaces:
TaskHandler
ManifestFileCleanupTaskHandler responsible for deleting all the files in a manifest and
the manifest itself. Since data files may be present in multiple manifests across different
snapshots, we assume a data file that doesn't exist is missing because it was already deleted by
another task.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordSerialized Task data sent from theTableCleanupTaskHandler -
Field Summary
Fields inherited from class org.apache.polaris.service.task.FileCleanupTaskHandler
executorService, FILE_DELETION_RETRY_MILLIS, fileIOSupplier, MAX_ATTEMPTS -
Constructor Summary
ConstructorsConstructorDescriptionManifestFileCleanupTaskHandler(TaskFileIOSupplier fileIOSupplier, ExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandleTask(org.apache.polaris.core.entity.TaskEntity task) voidhandleTask(org.apache.polaris.core.entity.TaskEntity task, org.apache.polaris.core.context.CallContext callContext) Handles the provided task.Methods inherited from class org.apache.polaris.service.task.FileCleanupTaskHandler
tryDelete, tryDelete
-
Constructor Details
-
ManifestFileCleanupTaskHandler
public ManifestFileCleanupTaskHandler(TaskFileIOSupplier fileIOSupplier, ExecutorService executorService)
-
-
Method Details
-
canHandleTask
public boolean canHandleTask(org.apache.polaris.core.entity.TaskEntity task) - Specified by:
canHandleTaskin interfaceTaskHandler- Specified by:
canHandleTaskin classFileCleanupTaskHandler
-
handleTask
public void handleTask(org.apache.polaris.core.entity.TaskEntity task, org.apache.polaris.core.context.CallContext callContext) Description copied from class:FileCleanupTaskHandlerHandles the provided task. A normal return indicates success and the task entity will be dropped; throwing indicates failure and triggers the task retry path.- Specified by:
handleTaskin interfaceTaskHandler- Specified by:
handleTaskin classFileCleanupTaskHandler
-