Skip to content

Add apply methods to s3rangereader - #1994

Merged
echeipesh merged 1 commit into
locationtech:masterfrom
moradology:feature/s3rangeread-helpers
Jan 31, 2017
Merged

echeipesh merged 1 commit into
locationtech:masterfrom
moradology:feature/s3rangeread-helpers

Conversation

@moradology

Copy link
Copy Markdown
Contributor

A very common use case when using S3 is having to account for URIs and strings. We can use the structure of S3 URIs to make the API for grabbing an S3RangeReader a little less imposing.

@moradology

Copy link
Copy Markdown
Contributor Author

@jbouffard

@echeipesh echeipesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible and using the URI for s3 keys is something we should integrate more consistently. Would be good to see an example of cleanup in the client code this enables.

@moradology

moradology commented Jan 31, 2017 •

Copy link
Copy Markdown
Contributor Author

TiffTags read API comparison

(Assuming that uri is a String and a link to an S3 bucket)

Before:

val s3Uri = new AmazonS3URI(uri)
val s3Client = new AmazonS3Client(new AWSAmazonS3Client(new DefaultAWSCredentialsProviderChain))
val s3RangeReader = S3RangeReader(s3Uri.getBucket, s3Uri.getKey, s3Client)
TiffTagsReader.read(s3RangeReader)

After:

val s3RangeReader = S3RangeReader(uri)
TiffTagsReader.read(s3RangeReader)

@echeipesh
echeipesh merged commit e7b6588 into locationtech:master Jan 31, 2017
@lossyrob lossyrob added this to the 1.1 milestone Mar 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants