public interface OperationCallbacks
RenameOperation
and DeleteOperation
operations need,
derived from the appropriate S3AFileSystem methods.Modifier and Type | Method and Description |
---|---|
default long |
abortMultipartUploadsUnderPrefix(String prefix)
Abort multipart uploads under a path; paged.
|
software.amazon.awssdk.services.s3.model.CopyObjectResponse |
copyFile(String srcKey,
String destKey,
S3ObjectAttributes srcAttributes,
S3AReadOpContext readContext)
Copy a single object in the bucket via a COPY operation.
|
S3ObjectAttributes |
createObjectAttributes(org.apache.hadoop.fs.Path path,
String eTag,
String versionId,
long len)
Create the attributes of an object for subsequent use.
|
S3ObjectAttributes |
createObjectAttributes(S3AFileStatus fileStatus)
Create the attributes of an object for subsequent use.
|
S3AReadOpContext |
createReadContext(org.apache.hadoop.fs.FileStatus fileStatus)
Create the read context for reading from the referenced file,
using FS state as well as the status.
|
void |
deleteObjectAtPath(org.apache.hadoop.fs.Path path,
String key,
boolean isFile)
Delete an object.
|
void |
finishRename(org.apache.hadoop.fs.Path sourceRenamed,
org.apache.hadoop.fs.Path destCreated)
The rename has finished; perform any store cleanup operations
such as creating/deleting directory markers.
|
org.apache.hadoop.fs.RemoteIterator<S3ALocatedFileStatus> |
listFilesAndDirectoryMarkers(org.apache.hadoop.fs.Path path,
S3AFileStatus status,
boolean includeSelf)
Recursive list of files and directory markers.
|
org.apache.hadoop.fs.RemoteIterator<S3AFileStatus> |
listObjects(org.apache.hadoop.fs.Path path,
String key)
Create an iterator over objects in S3.
|
void |
removeKeys(List<software.amazon.awssdk.services.s3.model.ObjectIdentifier> keysToDelete,
boolean deleteFakeDir)
Remove keys from the store.
|
S3ObjectAttributes createObjectAttributes(org.apache.hadoop.fs.Path path, String eTag, String versionId, long len)
path
- path path of the request.eTag
- the eTag of the S3 objectversionId
- S3 object version IDlen
- length of the fileS3ObjectAttributes createObjectAttributes(S3AFileStatus fileStatus)
fileStatus
- file status to build from.S3AReadOpContext createReadContext(org.apache.hadoop.fs.FileStatus fileStatus)
fileStatus
- file status.void finishRename(org.apache.hadoop.fs.Path sourceRenamed, org.apache.hadoop.fs.Path destCreated) throws IOException
sourceRenamed
- renamed sourcedestCreated
- destination file created.IOException
- failure@Retries.RetryTranslated void deleteObjectAtPath(org.apache.hadoop.fs.Path path, String key, boolean isFile) throws IOException
path
- path to deletekey
- key of entryisFile
- is the path a file (used for instrumentation only)IOException
- from invoker signature only -should not be raised.@Retries.RetryTranslated org.apache.hadoop.fs.RemoteIterator<S3ALocatedFileStatus> listFilesAndDirectoryMarkers(org.apache.hadoop.fs.Path path, S3AFileStatus status, boolean includeSelf) throws IOException
path
- path to list fromstatus
- optional status of path to list.includeSelf
- should the listing include this path if present?IOException
- failure@Retries.RetryTranslated software.amazon.awssdk.services.s3.model.CopyObjectResponse copyFile(String srcKey, String destKey, S3ObjectAttributes srcAttributes, S3AReadOpContext readContext) throws IOException
srcKey
- source object pathdestKey
- destination object pathsrcAttributes
- S3 attributes of the source objectreadContext
- the read contextInterruptedIOException
- the operation was interruptedIOException
- Other IO problems@Retries.RetryRaw void removeKeys(List<software.amazon.awssdk.services.s3.model.ObjectIdentifier> keysToDelete, boolean deleteFakeDir) throws MultiObjectDeleteException, software.amazon.awssdk.awscore.exception.AwsServiceException, IOException
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.org.apache.hadoop.fs.InvalidRequestException
- if the request was rejected due to
a mistaken attempt to delete the root directory.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.IOException
- other IO Exception.@Retries.RetryTranslated org.apache.hadoop.fs.RemoteIterator<S3AFileStatus> listObjects(org.apache.hadoop.fs.Path path, String key) throws IOException
path
- path of the listing.key
- object keyIOException
- failure.@Retries.RetryTranslated default long abortMultipartUploadsUnderPrefix(String prefix) throws IOException
prefix
- prefix for uploads to abortIOException
- trouble; FileNotFoundExceptions are swallowed.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.