You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Samuel Waggoner (JIRA)" <ji...@apache.org> on 2018/04/13 22:10:00 UTC

[jira] [Commented] (BEAM-4072) using instance of S3Options causes crash when no AWS region specified

    [ https://issues.apache.org/jira/browse/BEAM-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16438002#comment-16438002 ] 

Samuel Waggoner commented on BEAM-4072:
---------------------------------------

Maybe a solution is checking whether any AWS-specific options are actually given in *S3FileSystemRegistrar.java* and, if not, return an empty list. 
https://github.com/apache/beam/blob/master/sdks/java/io/amazon-webservices/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemRegistrar.java#L41

> using instance of S3Options causes crash when no AWS region specified
> ---------------------------------------------------------------------
>
>                 Key: BEAM-4072
>                 URL: https://issues.apache.org/jira/browse/BEAM-4072
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-aws
>            Reporter: Samuel Waggoner
>            Assignee: Ismaël Mejía
>            Priority: Major
>
> I want my pipeline to support writing to S3, but I also want it to work locally when a user doesn't specify any S3-specific options. Instead, I get the following exception:
> {code:java}
> com.amazonaws.SdkClientException: Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region. E at com.amazonaws.client.builder.AwsClientBuilder.setRegion(AwsClientBuilder.java:371){code}
> I had thought that I should use a single PipelineOptions interface that supports all available options for my pipeline. Is this wrong? Should using an instance of S3Options for my pipeline options force the user to write to s3 (or otherwise provide s3 options). 
> Should I choose a PipelineOptions subinterface based on the options the user tries to use at runtime?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)