@InterfaceAudience.Public @InterfaceStability.Unstable public interface BulkDelete extends org.apache.hadoop.fs.statistics.IOStatisticsSource, Closeable
close()
to release any resources and
to guarantee store IOStatistics are updated.
Callers MUST have no expectation that parent directories will exist after the operation completes; if an object store needs to explicitly look for and create directory markers, that step will be omitted.
Be aware that on some stores (AWS S3) each object listed in a bulk delete counts against the write IOPS limit; large page sizes are counterproductive here, as are attempts at parallel submissions across multiple threads.
Modifier and Type | Method and Description |
---|---|
Path |
basePath()
Base path of a bulk delete operation.
|
List<Map.Entry<Path,String>> |
bulkDelete(Collection<Path> paths)
Delete a list of files/objects.
|
int |
pageSize()
The maximum number of objects/files to delete in a single request.
|
int pageSize()
Path basePath()
bulkDelete(Collection)
must be under this path.List<Map.Entry<Path,String>> bulkDelete(Collection<Path> paths) throws IOException, IllegalArgumentException
basePath()
.pageSize()
.paths
- list of paths which must be absolute and under the base path.
provided in basePath()
.IOException
- IO problems including networking, authentication and more.IllegalArgumentException
- if a path argument is invalid.Copyright © 2024 Apache Software Foundation. All rights reserved.