@InterfaceStability.Unstable
@InterfaceAudience.LimitedPrivate(value="testing/diagnostics")
public interface S3AInternals
Modifier and Type | Method and Description |
---|---|
long |
abortMultipartUploads(org.apache.hadoop.fs.Path path)
Abort multipart uploads under a path.
|
software.amazon.awssdk.services.s3.S3Client |
getAmazonS3Client(String reason)
Returns the S3 client used by this filesystem.
|
String |
getBucketLocation()
Get the region of a bucket.
|
String |
getBucketLocation(String bucketName)
Get the region of a bucket; fixing up the region so it can be used
in the builders of other AWS clients.
|
software.amazon.awssdk.services.s3.model.HeadBucketResponse |
getBucketMetadata()
Request bucket metadata.
|
software.amazon.awssdk.services.s3.model.HeadObjectResponse |
getObjectMetadata(org.apache.hadoop.fs.Path path)
Low-level call to get at the object metadata.
|
boolean |
isMultipartCopyEnabled()
Is multipart copy enabled?
|
AWSCredentialProviderList |
shareCredentials(String purpose)
Get a shared copy of the AWS credentials, with its reference
counter updated.
|
software.amazon.awssdk.services.s3.S3Client getAmazonS3Client(String reason)
Warning This bypasses core S3A operations, including auditing. It is intended for use in testing, diagnostics and for accessing operations not available through the S3A connector itself.
Unless audit spans are created through the S3AFileSystem, make
sure that fs.s3a.audit.reject.out.of.span.operations
is
set to false.
Mocking note: this is the same S3Client as is used by the owning filesystem; changes to this client will be reflected by changes in the behavior of that filesystem.
reason
- a justification for requesting access.@Retries.RetryTranslated @AuditEntryPoint String getBucketLocation() throws IOException
AccessDeniedException
- if the caller lacks permission.IOException
- on any failure.@AuditEntryPoint @Retries.RetryTranslated String getBucketLocation(String bucketName) throws IOException
s3:GetBucketLocation
.
Retry policy: retrying, translated.bucketName
- the name of the bucketAccessDeniedException
- if the caller lacks permission.IOException
- on any failure.@AuditEntryPoint @Retries.RetryTranslated software.amazon.awssdk.services.s3.model.HeadObjectResponse getObjectMetadata(org.apache.hadoop.fs.Path path) throws IOException
path
- path to the object. This will be qualified.IOException
- IO and object access problems.AWSCredentialProviderList shareCredentials(String purpose)
close()
on this after
they have finished using it.purpose
- what is this for? This is for logging@AuditEntryPoint @Retries.RetryTranslated software.amazon.awssdk.services.s3.model.HeadBucketResponse getBucketMetadata() throws IOException
UnknownStoreException
- the bucket is absentIOException
- any other problem talking to S3boolean isMultipartCopyEnabled()
@AuditEntryPoint @Retries.RetryTranslated long abortMultipartUploads(org.apache.hadoop.fs.Path path) throws IOException
path
- path to abort uploads under.IOException
- trouble; FileNotFoundExceptions are swallowed.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.