Class StorageClient
- java.lang.Object
-
- org.apache.cassandra.spark.bulkwriter.cloudstorage.StorageClient
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class StorageClient extends java.lang.Object implements java.lang.AutoCloseableClient used for upload SSTable bundle to S3 bucket
-
-
Field Summary
Fields Modifier and Type Field Description static charSEPARATOR
-
Constructor Summary
Constructors Constructor Description StorageClient(StorageTransportConfiguration storageTransportConfiguration, StorageClientConfig storageClientConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()BundleStorageObjectmultiPartUpload(StorageCredentials credentials, Bundle bundle)We useCreateMultipartUploadRequestto break down each SSTable bundle into chunks, according to chunk size set, and upload to S3.
-
-
-
Field Detail
-
SEPARATOR
public static final char SEPARATOR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StorageClient
public StorageClient(StorageTransportConfiguration storageTransportConfiguration, StorageClientConfig storageClientConfig)
-
-
Method Detail
-
multiPartUpload
public BundleStorageObject multiPartUpload(StorageCredentials credentials, Bundle bundle) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
We useCreateMultipartUploadRequestto break down each SSTable bundle into chunks, according to chunk size set, and upload to S3.- Parameters:
credentials- credentials used for uploading to S3bundle- bundle of sstables- Returns:
- BundleStorageObject representing the uploaded bundle
- Throws:
java.io.IOException- when an IO exception occurs during the multipart uploadjava.util.concurrent.ExecutionException- when it fails to retrieve the state of a taskjava.lang.InterruptedException- when the thread is interrupted
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-