Package org.apache.hadoop.fs.s3a.impl
Class CSEV1CompatibleS3AFileSystemOperations
java.lang.Object
org.apache.hadoop.fs.s3a.impl.CSES3AFileSystemOperations
org.apache.hadoop.fs.s3a.impl.CSEV1CompatibleS3AFileSystemOperations
- All Implemented Interfaces:
S3AFileSystemOperations
An extension of the
CSES3AFileSystemOperations class.
This handles certain file system operations when client-side encryption is enabled with v1 client
compatibility.
Constants.S3_ENCRYPTION_CSE_V1_COMPATIBILITY_ENABLED.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance ofCSEV1CompatibleS3AFileSystemOperations. -
Method Summary
Modifier and TypeMethodDescriptionsoftware.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.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.Methods inherited from class org.apache.hadoop.fs.s3a.impl.CSES3AFileSystemOperations
getClientSideEncryptionMaterials, getS3ClientFactory, setCSEGauge
-
Constructor Details
-
CSEV1CompatibleS3AFileSystemOperations
public CSEV1CompatibleS3AFileSystemOperations()Constructs a new instance ofCSEV1CompatibleS3AFileSystemOperations.
-
-
Method Details
-
getObject
public 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. If the S3 object is encrypted, it uses the encrypted S3 client to retrieve the object else it uses the unencrypted S3 client.- Specified by:
getObjectin interfaceS3AFileSystemOperations- Overrides:
getObjectin classCSES3AFileSystemOperations- 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.
-
getUnencryptedS3ClientFactory
Retrieves the S3 client factory for the specified class and configuration.- Specified by:
getUnencryptedS3ClientFactoryin interfaceS3AFileSystemOperations- Overrides:
getUnencryptedS3ClientFactoryin classCSES3AFileSystemOperations- Parameters:
conf- The Hadoop configuration object.- Returns:
- The S3 client factory instance.
-
getS3ObjectSize
public 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.- Specified by:
getS3ObjectSizein interfaceS3AFileSystemOperations- Overrides:
getS3ObjectSizein classCSES3AFileSystemOperations- 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.
-