Package org.cdlib.mrt.s3v2.test
Class TestServices
java.lang.Object
org.cdlib.mrt.s3v2.test.TestServices
Before running this Java V2 code example, set up your development
environment, including your credentials.
For more information, see the following documentation topic:
https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringstatic GetSSMprotected static final Stringprotected static final Stringprotected software.amazon.awssdk.services.s3.S3AsyncClientprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddProp(Properties prop, String key, String value) static voidprotected static Propertiesprotected static Propertiesprotected static voidprotected static voidprotected static voidstatic software.amazon.awssdk.services.s3.model.HeadObjectResponsegetHeadResponse(software.amazon.awssdk.services.s3.S3Client s3, String bucketName, String keyName) Lists the tags associated with an Amazon S3 object.static PropertiesgetMeta(String header, software.amazon.awssdk.services.s3.S3Client s3Client, String bucketName, String key) static PropertiesgetObjectMeta(software.amazon.awssdk.services.s3.S3Client s3, String bucketName, String key) static voidstatic voidtest_AWS_multiPartUpload(String filePath, String key, String sha256) static voidtest_minio(String[] args) static voidtest_minio_delete(String key) static voidtest_minio_putS3Object(String filePath, String key, String sha256) static voidtest_sdsc_multiPartUpload(String filePath, String key, String sha256) static voidtest_sdsc_putS3Object(String filePath, String key, String sha256) static voidtest_sdsc_uploadFileAsync(String filePath, String key, String sha256) static voidtest_temp_delete(String key) static voidtest_temp_download(String filePath, String key, String sha256) static voidtest_temp_downloadS3Object(String filePath, String key, String sha256) static voidtest_temp_multiparUpload(String filePath, String key, String sha256) static voidtest_temp_uploadFileAsync(String filePath, String key, String sha256) static voidtest_wasabi_delete(String key) static voidtest_wasabi_download(String filePath, String key, String sha256) static voidtest_wasabi_multiPartUpload(String filePath, String key, String sha256) static voidtest_wasabi_uploadFileAsync(String filePath, String key, String sha256)
-
Field Details
-
s3Client
protected software.amazon.awssdk.services.s3.S3AsyncClient s3Client -
getSSM
-
uploadFileBig
- See Also:
-
downloadBig
- See Also:
-
downloadBigWasabi
- See Also:
-
sha256Big
- See Also:
-
keyBig
- See Also:
-
fileSmall
- See Also:
-
sha256Small
- See Also:
-
keySmall
- See Also:
-
-
Constructor Details
-
TestServices
public TestServices()
-
-
Method Details
-
main
- Throws:
org.cdlib.mrt.utility.TException
-
test_minio
- Throws:
org.cdlib.mrt.utility.TException
-
test_AWS_multiPartUpload
public static void test_AWS_multiPartUpload(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
test_wasabi_uploadFileAsync
public static void test_wasabi_uploadFileAsync(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
test_wasabi_multiPartUpload
public static void test_wasabi_multiPartUpload(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
test_sdsc_uploadFileAsync
public static void test_sdsc_uploadFileAsync(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
test_sdsc_multiPartUpload
public static void test_sdsc_multiPartUpload(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
test_sdsc_putS3Object
public static void test_sdsc_putS3Object(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
test_minio_delete
- Throws:
org.cdlib.mrt.utility.TException
-
test_temp_delete
- Throws:
org.cdlib.mrt.utility.TException
-
test_wasabi_delete
- Throws:
org.cdlib.mrt.utility.TException
-
test_minio_putS3Object
public static void test_minio_putS3Object(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
getMeta
public static Properties getMeta(String header, software.amazon.awssdk.services.s3.S3Client s3Client, String bucketName, String key) -
test_temp_uploadFileAsync
public static void test_temp_uploadFileAsync(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
test_temp_multiparUpload
public static void test_temp_multiparUpload(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
test_temp_download
public static void test_temp_download(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
test_wasabi_download
public static void test_wasabi_download(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
test_temp_downloadS3Object
public static void test_temp_downloadS3Object(String filePath, String key, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
getHeadResponse
public static software.amazon.awssdk.services.s3.model.HeadObjectResponse getHeadResponse(software.amazon.awssdk.services.s3.S3Client s3, String bucketName, String keyName) throws org.cdlib.mrt.utility.TException Lists the tags associated with an Amazon S3 object.- Parameters:
s3- the S3Client object used to interact with the Amazon S3 servicebucketName- the name of the S3 bucket that contains the objectkeyName- the key (name) of the S3 object- Throws:
org.cdlib.mrt.utility.TException
-
getObjectMeta
public static Properties getObjectMeta(software.amazon.awssdk.services.s3.S3Client s3, String bucketName, String key) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
addProp
-
doUpload
-
doUploadMultipart
protected static void doUploadMultipart(V2Client v2client, String bucketName, String key, String filePath, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
doPutObject
protected static void doPutObject(V2Client v2client, String bucketName, String key, String filePath, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
doGetObjectSync
protected static Properties doGetObjectSync(V2Client v2client, String bucketName, String key, String filePath, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
doGetObjectAsync
protected static Properties doGetObjectAsync(V2Client v2client, String bucketName, String key, String filePath, String sha256) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-
doDelete
public static void doDelete(V2Client v2client, String bucketName, String key) throws org.cdlib.mrt.utility.TException - Throws:
org.cdlib.mrt.utility.TException
-