@Value.Enclosing public interface DeleteReachableFiles extends Action<DeleteReachableFiles,DeleteReachableFiles.Result>
This action will irreversibly delete all reachable files such as data files, manifests, manifest lists and should be used to clean up the underlying storage once a table is dropped and no longer needed.
Implementations may use a query engine to distribute parts of work.
Modifier and Type | Interface and Description |
---|---|
static interface |
DeleteReachableFiles.Result
The action result that contains a summary of the execution.
|
Modifier and Type | Method and Description |
---|---|
DeleteReachableFiles |
deleteWith(java.util.function.Consumer<java.lang.String> deleteFunc)
Passes an alternative delete implementation that will be used for files.
|
DeleteReachableFiles |
executeDeleteWith(java.util.concurrent.ExecutorService executorService)
Passes an alternative executor service that will be used for files removal.
|
DeleteReachableFiles |
io(FileIO io)
Set the
FileIO to be used for files removal |
DeleteReachableFiles deleteWith(java.util.function.Consumer<java.lang.String> deleteFunc)
deleteFunc
- a function that will be called to delete files. The function accepts path to
file as an argument.DeleteReachableFiles executeDeleteWith(java.util.concurrent.ExecutorService executorService)
deleteWith(Consumer)
or if the
FileIO does not support bulk deletes
. Otherwise, parallelism
should be controlled by the IO specific deleteFiles
method.executorService
- the service to useDeleteReachableFiles io(FileIO io)
FileIO
to be used for files removalio
- FileIO to use for files removal