Search in sources :

Example 16 with S3DatasetProperties

use of org.talend.components.simplefileio.s3.S3DatasetProperties in project components by Talend.

the class S3SparkRuntimeTestIT method testCsv_noEncryption.

/**
 * Basic Csv test.
 */
@Test
@Ignore("columns name different, can't editable")
public void testCsv_noEncryption() throws IOException {
    S3DatasetProperties datasetProps = s3.createS3DatasetProperties();
    datasetProps.format.setValue(SimpleFileIOFormat.CSV);
    datasetProps.recordDelimiter.setValue(SimpleFileIODatasetProperties.RecordDelimiterType.LF);
    datasetProps.fieldDelimiter.setValue(SimpleFileIODatasetProperties.FieldDelimiterType.SEMICOLON);
    test_noEncryption(datasetProps);
}
Also used : S3DatasetProperties(org.talend.components.simplefileio.s3.S3DatasetProperties) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 17 with S3DatasetProperties

use of org.talend.components.simplefileio.s3.S3DatasetProperties in project components by Talend.

the class S3SparkRuntimeTestIT method testAvro_cseKmsEncryption.

/**
 * Basic Avro test with cseKmsEncryption.
 */
@Ignore("cse not yet supported.")
@Test
public void testAvro_cseKmsEncryption() throws IOException {
    S3DatasetProperties datasetProps = s3.createS3DatasetProperties(false, true);
    datasetProps.format.setValue(SimpleFileIOFormat.AVRO);
    test_noEncryption(datasetProps);
}
Also used : S3DatasetProperties(org.talend.components.simplefileio.s3.S3DatasetProperties) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 18 with S3DatasetProperties

use of org.talend.components.simplefileio.s3.S3DatasetProperties in project components by Talend.

the class S3OutputPropertiesTest method setup.

@Before
public void setup() {
    properties = new S3OutputProperties("test");
    S3DatastoreProperties datastoreProperties = new S3DatastoreProperties("test");
    datastoreProperties.init();
    S3DatasetProperties datasetProperties = new S3DatasetProperties("test");
    datasetProperties.init();
    datasetProperties.setDatastoreProperties(datastoreProperties);
    properties.setDatasetProperties(datasetProperties);
    properties.init();
}
Also used : S3DatasetProperties(org.talend.components.simplefileio.s3.S3DatasetProperties) S3DatastoreProperties(org.talend.components.simplefileio.s3.S3DatastoreProperties) Before(org.junit.Before)

Example 19 with S3DatasetProperties

use of org.talend.components.simplefileio.s3.S3DatasetProperties in project components by Talend.

the class S3RoundTripRuntimeTestIT method testAvro_cseKmsEncryption.

/**
 * Basic Avro test with cseKmsEncryption.
 */
@Ignore("cse not yet supported.")
@Test
public void testAvro_cseKmsEncryption() throws IOException {
    S3DatasetProperties datasetProps = s3.createS3DatasetProperties(false, true);
    datasetProps.format.setValue(SimpleFileIOFormat.AVRO);
    test_noEncryption(datasetProps);
}
Also used : S3DatasetProperties(org.talend.components.simplefileio.s3.S3DatasetProperties) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 20 with S3DatasetProperties

use of org.talend.components.simplefileio.s3.S3DatasetProperties in project components by Talend.

the class S3RoundTripRuntimeTestIT method testParquet_noEncryption.

/**
 * Basic Parquet test.
 */
@Test
public void testParquet_noEncryption() throws IOException {
    S3DatasetProperties datasetProps = s3.createS3DatasetProperties();
    datasetProps.format.setValue(SimpleFileIOFormat.PARQUET);
    test_noEncryption(datasetProps);
}
Also used : S3DatasetProperties(org.talend.components.simplefileio.s3.S3DatasetProperties) Test(org.junit.Test)

Aggregations

S3DatasetProperties (org.talend.components.simplefileio.s3.S3DatasetProperties)22 Test (org.junit.Test)16 Ignore (org.junit.Ignore)7 S3OutputProperties (org.talend.components.simplefileio.s3.output.S3OutputProperties)6 IndexedRecord (org.apache.avro.generic.IndexedRecord)5 ObjectMetadata (com.talend.shaded.com.amazonaws.services.s3.model.ObjectMetadata)4 Pipeline (org.apache.beam.sdk.Pipeline)3 FileSystem (org.apache.hadoop.fs.FileSystem)3 ConvertToIndexedRecord (org.talend.components.adapter.beam.transform.ConvertToIndexedRecord)3 S3DatastoreProperties (org.talend.components.simplefileio.s3.S3DatastoreProperties)3 Schema (org.apache.avro.Schema)2 S3InputProperties (org.talend.components.simplefileio.s3.input.S3InputProperties)2 RecordSet (org.talend.components.test.RecordSet)2 AWSCredentialsProvider (com.amazonaws.auth.AWSCredentialsProvider)1 StaticCredentialsProvider (com.amazonaws.internal.StaticCredentialsProvider)1 Region (com.amazonaws.regions.Region)1 AmazonS3 (com.amazonaws.services.s3.AmazonS3)1 AmazonS3Client (com.amazonaws.services.s3.AmazonS3Client)1 AmazonS3EncryptionClient (com.amazonaws.services.s3.AmazonS3EncryptionClient)1 CryptoConfiguration (com.amazonaws.services.s3.model.CryptoConfiguration)1