Class StorageClient

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class StorageClient
    extends java.lang.Object
    implements java.lang.AutoCloseable
    Client used for upload SSTable bundle to S3 bucket
    • Method Detail

      • multiPartUpload

        public BundleStorageObject multiPartUpload​(StorageCredentials credentials,
                                                   Bundle bundle)
                                            throws java.io.IOException,
                                                   java.util.concurrent.ExecutionException,
                                                   java.lang.InterruptedException
        We use CreateMultipartUploadRequest to break down each SSTable bundle into chunks, according to chunk size set, and upload to S3.
        Parameters:
        credentials - credentials used for uploading to S3
        bundle - bundle of sstables
        Returns:
        BundleStorageObject representing the uploaded bundle
        Throws:
        java.io.IOException - when an IO exception occurs during the multipart upload
        java.util.concurrent.ExecutionException - when it fails to retrieve the state of a task
        java.lang.InterruptedException - when the thread is interrupted
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable