[
https://issues.apache.org/jira/browse/BEAM-6266?focusedWorklogId=218038&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-218038
]
ASF GitHub Bot logged work on BEAM-6266:
----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Mar/19 14:17
Start Date: 25/Mar/19 14:17
Worklog Time Spent: 10m
Work Description: iemejia commented on pull request #8126: [BEAM-6266]
Don't require --awsRegion when S3 isn't used on the new AWS SDK
URL: https://github.com/apache/beam/pull/8126
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 218038)
Time Spent: 0.5h (was: 20m)
> Newest AWS SDK causes errors on startup without usage
> -----------------------------------------------------
>
> Key: BEAM-6266
> URL: https://issues.apache.org/jira/browse/BEAM-6266
> Project: Beam
> Issue Type: Bug
> Components: io-java-aws
> Affects Versions: 2.6.0, 2.7.0, 2.8.0, 2.9.0
> Reporter: Mike Kaplinskiy
> Assignee: Mike Kaplinskiy
> Priority: Major
> Labels: triaged
> Fix For: 2.12.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The S3 filesystem implementation in Beam logs a message like this if it is
> linked in:
> {code:java}
> 2018-12-18 22:17:55 INFO S3FileSystem:104 - The AWS S3 Beam extension was
> included in this build, but the awsRegion flag was not specified. If you
> don't plan to use S3, then ignore this message.{code}
> Previous versions of the AWS libraries seemed to allow you to {{ignore this
> message}} , but the newest libraries throw an exception:
> {code:java}
> org.apache.beam.sdk.Pipeline.create Pipeline.java: 145
> org.apache.beam.sdk.PipelineRunner.fromOptions PipelineRunner.java: 47
> org.apache.beam.sdk.io.FileSystems.setDefaultPipelineOptions
> FileSystems.java: 482
> org.apache.beam.sdk.io.FileSystems.verifySchemesAreUnique FileSystems.java:
> 492
> org.apache.beam.sdk.io.aws.s3.S3FileSystemRegistrar.fromOptions
> S3FileSystemRegistrar.java: 39
> org.apache.beam.sdk.io.aws.s3.S3FileSystem.<init> S3FileSystem.java: 108
> org.apache.beam.sdk.io.aws.s3.S3FileSystem.buildAmazonS3Client
> S3FileSystem.java: 122
> com.amazonaws.client.builder.AwsClientBuilder.withRegion
> AwsClientBuilder.java: 245
> com.amazonaws.client.builder.AwsClientBuilder.getRegionObject
> AwsClientBuilder.java: 258
> com.amazonaws.SdkClientException: Could not find region information for
> 'null' in SDK metadata.
> retryable: true{code}
> (this stack trace is from 2.6.0, but master is also affected)
>
> The root cause is this code that gets run unconditionally
> (https://github.com/apache/beam/blob/master/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3ClientBuilderFactory.java#L42):
> {code:java}
> builder = builder.withRegion(s3Options.getAwsRegion());{code}
> Unfortunately the latest AWS library will throw if you pass {{null}} to
> {{withRegion}}. It previously did nothing. This release of the AWS java sdk
> added the error check:
> [https://github.com/aws/aws-sdk-java/commit/8f07cc35eec9047f7cfdbc7de3abc6d4327b08d0]
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)