Class CSEV1CompatibleS3AFileSystemOperations

java.lang.Object
org.apache.hadoop.fs.s3a.impl.CSES3AFileSystemOperations
org.apache.hadoop.fs.s3a.impl.CSEV1CompatibleS3AFileSystemOperations
All Implemented Interfaces:
S3AFileSystemOperations

public class CSEV1CompatibleS3AFileSystemOperations extends CSES3AFileSystemOperations
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 Details

    • CSEV1CompatibleS3AFileSystemOperations

      public CSEV1CompatibleS3AFileSystemOperations()
      Constructs a new instance of CSEV1CompatibleS3AFileSystemOperations.
  • 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:
      getObject in interface S3AFileSystemOperations
      Overrides:
      getObject in class CSES3AFileSystemOperations
      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

      public S3ClientFactory getUnencryptedS3ClientFactory(org.apache.hadoop.conf.Configuration conf)
      Retrieves the S3 client factory for the specified class and configuration.
      Specified by:
      getUnencryptedS3ClientFactory in interface S3AFileSystemOperations
      Overrides:
      getUnencryptedS3ClientFactory in class CSES3AFileSystemOperations
      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:
      getS3ObjectSize in interface S3AFileSystemOperations
      Overrides:
      getS3ObjectSize in class CSES3AFileSystemOperations
      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.