use of org.apache.beam.sdk.io.aws2.options.S3Options in project beam by apache.
the class S3TestUtils method s3OptionsWithMultipleSSEOptions.
static S3Options s3OptionsWithMultipleSSEOptions() {
S3Options options = s3OptionsWithSSEKMSKeyId();
options.setSSECustomerKey(SSECustomerKey.builder().key("86glyTlCNZgccSxW8JxMa6ZdjdK3N141glAysPUZ3AA=").algorithm("AES256").build());
return options;
}
use of org.apache.beam.sdk.io.aws2.options.S3Options in project beam by apache.
the class S3TestUtils method s3OptionsWithSSEKMSKeyId.
static S3Options s3OptionsWithSSEKMSKeyId() {
S3Options options = s3Options();
String ssekmsKeyId = "arn:aws:kms:eu-west-1:123456789012:key/dc123456-7890-ABCD-EF01-234567890ABC";
options.setSSEKMSKeyId(ssekmsKeyId);
options.setSSEAlgorithm("aws:kms");
options.setBucketKeyEnabled(true);
return options;
}
use of org.apache.beam.sdk.io.aws2.options.S3Options in project beam by apache.
the class S3TestUtils method s3Options.
static S3Options s3Options() {
S3Options options = PipelineOptionsFactory.as(S3Options.class);
options.setAwsRegion(Region.US_WEST_1);
options.setS3UploadBufferSizeBytes(MINIMUM_UPLOAD_BUFFER_SIZE_BYTES);
return options;
}
use of org.apache.beam.sdk.io.aws2.options.S3Options in project beam by apache.
the class S3OptionsTest method testSetSSECustomerKey.
@Test
public void testSetSSECustomerKey() {
S3Options options = create("--SSECustomerKey={\"key\": \"key\", \"algorithm\": \"algo\"}");
SSECustomerKey expected = SSECustomerKey.builder().key("key").algorithm("algo").build();
assertThat(options.getSSECustomerKey()).isEqualToComparingFieldByField(expected);
assertThat(serializeDeserialize(options).getSSECustomerKey()).isEqualToComparingFieldByField(expected);
}
use of org.apache.beam.sdk.io.aws2.options.S3Options in project beam by apache.
the class S3FileSystemTest method testGetSchemeWithS3Options.
@Test
public void testGetSchemeWithS3Options() {
S3FileSystem s3FileSystem = new S3FileSystem(s3Options());
assertEquals("s3", s3FileSystem.getScheme());
}
Aggregations