Search in sources :

Example 6 with Write

use of org.apache.beam.sdk.io.kinesis.KinesisIO.Write in project beam by apache.

the class KinesisIOWriteTest method testReadWithCredentialsProviderAndCustomEndpoint.

@Test
public void testReadWithCredentialsProviderAndCustomEndpoint() {
    String customEndpoint = "localhost:9999";
    Regions region = Regions.US_WEST_1;
    AWSCredentialsProvider credentialsProvider = DefaultAWSCredentialsProviderChain.getInstance();
    Write write = KinesisIO.write().withAWSClientsProvider(credentialsProvider, region, customEndpoint);
    assertEquals(write.getAWSClientsProvider(), new BasicKinesisProvider(credentialsProvider, region, customEndpoint, true));
}
Also used : Write(org.apache.beam.sdk.io.kinesis.KinesisIO.Write) Regions(com.amazonaws.regions.Regions) AWSCredentialsProvider(com.amazonaws.auth.AWSCredentialsProvider) Test(org.junit.Test)

Aggregations

Regions (com.amazonaws.regions.Regions)6 Write (org.apache.beam.sdk.io.kinesis.KinesisIO.Write)6 Test (org.junit.Test)6 AWSCredentialsProvider (com.amazonaws.auth.AWSCredentialsProvider)3 AWSStaticCredentialsProvider (com.amazonaws.auth.AWSStaticCredentialsProvider)3 BasicAWSCredentials (com.amazonaws.auth.BasicAWSCredentials)3