Package org.apache.hadoop.fs.s3a.tools
Class MarkerToolOperationsImpl
java.lang.Object
org.apache.hadoop.fs.s3a.tools.MarkerToolOperationsImpl
- All Implemented Interfaces:
MarkerToolOperations
Implement the marker tool operations by forwarding to the
OperationCallbacks instance provided in the constructor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.fs.RemoteIterator<S3AFileStatus>listObjects(org.apache.hadoop.fs.Path path, String key) Create an iterator over objects in S3.voidremoveKeys(List<software.amazon.awssdk.services.s3.model.ObjectIdentifier> keysToDelete, boolean deleteFakeDir) Remove keys from the store.
-
Constructor Details
-
MarkerToolOperationsImpl
Constructor.- Parameters:
operations- implementation of the operations
-
-
Method Details
-
listObjects
public org.apache.hadoop.fs.RemoteIterator<S3AFileStatus> listObjects(org.apache.hadoop.fs.Path path, String key) throws IOException Description copied from interface:MarkerToolOperationsCreate an iterator over objects in S3. The listing includes the key itself, if found.- Specified by:
listObjectsin interfaceMarkerToolOperations- Parameters:
path- path of the listing.key- object key- Returns:
- iterator with the first listing completed.
- Throws:
IOException- failure.
-
removeKeys
public void removeKeys(List<software.amazon.awssdk.services.s3.model.ObjectIdentifier> keysToDelete, boolean deleteFakeDir) throws MultiObjectDeleteException, software.amazon.awssdk.awscore.exception.AwsServiceException, IOException Description copied from interface:MarkerToolOperationsRemove keys from the store.- Specified by:
removeKeysin interfaceMarkerToolOperations- Parameters:
keysToDelete- collection of keys to delete on the s3-backend. if empty, no request is made of the object store.deleteFakeDir- indicates whether this is for deleting fake dirs. all deleted keys- Throws:
MultiObjectDeleteException- one or more of the keys could not be deleted in a multiple object delete operation.software.amazon.awssdk.awscore.exception.AwsServiceException- amazon-layer failure.org.apache.hadoop.fs.InvalidRequestException- if the request was rejected due to a mistaken attempt to delete the root directory.IOException- other IO Exception.
-