Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCP: Add range reads to GCSInputStream #8301

Merged
merged 4 commits into from
Aug 15, 2023
Merged

Conversation

bryanck
Copy link
Contributor

@bryanck bryanck commented Aug 12, 2023

This PR adds range reads to GCSInputStream and implements the RangeReadable interface. The range read tests were derived from those for S3InputStream. With S3, a range can be specified as the number of bytes from end, but a similar API is not available with GCS, so the implementation for reading the tail calculates the starting position based on the blob size.

@github-actions github-actions bot added the GCP label Aug 12, 2023
@@ -49,7 +49,7 @@ public void testMissingScheme() {
}

@Test
public void tesInvalidScheme() {
public void testInvalidScheme() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unrelated typo fix

@@ -67,6 +67,7 @@ public class GCPProperties implements Serializable {

public GCPProperties() {}

@SuppressWarnings("JavaUtilDate") // GCP API uses java.util.Date
Copy link
Contributor Author

Choose a reason for hiding this comment

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

GCP uses java.util.Date in its API so suppressed this warning

@nastra
Copy link
Contributor

nastra commented Aug 15, 2023

LGTM, thanks @bryanck

@nastra nastra merged commit 462a203 into apache:master Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants