Package org.apache.hadoop.fs.s3a.impl
Interface S3AFileSystemOperations
- All Known Implementing Classes:
BaseS3AFileSystemOperations,CSES3AFileSystemOperations,CSEV1CompatibleS3AFileSystemOperations
public interface S3AFileSystemOperations
An interface that helps map from object store semantics to that of the fileystem.
This specially supports encrypted stores.
-
Method Summary
Modifier and TypeMethodDescriptiongetClientSideEncryptionMaterials(org.apache.hadoop.conf.Configuration conf, String bucket, S3AEncryptionMethods algorithm) Retrieves the client-side encryption materials for the given bucket and encryption algorithm.software.amazon.awssdk.core.ResponseInputStream<software.amazon.awssdk.services.s3.model.GetObjectResponse>getObject(S3AStore store, software.amazon.awssdk.services.s3.model.GetObjectRequest request, RequestFactory factory) Retrieves an object from the S3.getS3ClientFactory(org.apache.hadoop.conf.Configuration conf) Retrieves the S3 client factory for the specified class and configuration.longgetS3ObjectSize(String key, long length, S3AStore store, software.amazon.awssdk.services.s3.model.HeadObjectResponse response) Retrieves the unencrypted length of an object in the S3 bucket.getUnencryptedS3ClientFactory(org.apache.hadoop.conf.Configuration conf) Retrieves the S3 client factory for the specified class and configuration.voidsetCSEGauge(org.apache.hadoop.fs.statistics.impl.IOStatisticsStore ioStatisticsStore) Set the client side encryption gauge to 0 or 1, indicating if CSE is enabled.
-
Method Details
-
getObject
software.amazon.awssdk.core.ResponseInputStream<software.amazon.awssdk.services.s3.model.GetObjectResponse> getObject(S3AStore store, software.amazon.awssdk.services.s3.model.GetObjectRequest request, RequestFactory factory) throws IOException Retrieves an object from the S3.- Parameters:
store- The S3AStore object representing the S3 bucket.request- The GetObjectRequest containing the details of the object to retrieve.factory- The RequestFactory used to create the GetObjectRequest.- Returns:
- A ResponseInputStream containing the GetObjectResponse.
- Throws:
IOException- If an error occurs while retrieving the object.
-
setCSEGauge
void setCSEGauge(org.apache.hadoop.fs.statistics.impl.IOStatisticsStore ioStatisticsStore) Set the client side encryption gauge to 0 or 1, indicating if CSE is enabled.- Parameters:
ioStatisticsStore- The IOStatisticsStore of the filesystem.
-
getClientSideEncryptionMaterials
CSEMaterials getClientSideEncryptionMaterials(org.apache.hadoop.conf.Configuration conf, String bucket, S3AEncryptionMethods algorithm) throws IOException Retrieves the client-side encryption materials for the given bucket and encryption algorithm.- Parameters:
conf- The Hadoop configuration object.bucket- The name of the S3 bucket.algorithm- The client-side encryption algorithm to use.- Returns:
- The client-side encryption materials.
- Throws:
IOException- If an error occurs while retrieving the encryption materials.
-
getS3ClientFactory
Retrieves the S3 client factory for the specified class and configuration.- Parameters:
conf- The Hadoop configuration object.- Returns:
- The S3 client factory instance.
-
getUnencryptedS3ClientFactory
Retrieves the S3 client factory for the specified class and configuration.- Parameters:
conf- The Hadoop configuration object.- Returns:
- The S3 client factory instance.
-
getS3ObjectSize
long getS3ObjectSize(String key, long length, S3AStore store, software.amazon.awssdk.services.s3.model.HeadObjectResponse response) throws IOException Retrieves the unencrypted length of an object in the S3 bucket.- Parameters:
key- The key (path) of the object in the S3 bucket.length- The length of the object.store- The S3AStore object representing the S3 bucket.response- The HeadObjectResponse containing the metadata of the object.- Returns:
- The unencrypted size of the object in bytes.
- Throws:
IOException- If an error occurs while retrieving the object size.
-