GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Storage: Fix slow download performance by ajaaym · Pull Request #5791 · googleapis/google-cloud-java Conversation
Contributor
Fixes #3929 Updated blob to download using direct download method
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
Codecov Report
@@ Coverage Diff @@ ## master #5791 +/- ## ========================================= Coverage ? 46.51% Complexity ? 25648 ========================================= Files ? 2456 Lines ? 267497 Branches ? 29751 ========================================= Hits ? 124415 Misses ? 133039 Partials ? 10043
Continue to review full report at Codecov.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@JesseLovelace @frankyn can you please review? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay, I didn't click submit.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| * @param outputStream | ||
| */ | ||
| public void downloadTo(OutputStream outputStream) { | ||
| downloadTo(outputStream, new BlobSourceOption[0]); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This overloaded method doesn't look necessary. My varargs are rusty but if no Options are specified in downloadTo(OutputStream os, Options..) it should still work.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
yes its not needed. removed it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| private static final String BASE64_KEY = "JVzfVl8NLD9FjedFuStegjRfES5ll5zc59CIXw572OA="; | ||
| private static final Key KEY = | ||
| new SecretKeySpec(BaseEncoding.base64().decode(BASE64_KEY), "AES256"); | ||
| private static final RetrySettings RETRY_SETTINGS = |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There's heavy retry settings in the tests. Is this by design and how do they help?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
updated retry settings needed for test.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ajaaym, I've have two more nits. Mainly, I'd like to see documentation in comments near the unit tests exercising downloadTo().
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| import org.junit.After; | ||
| import org.junit.Before; | ||
| import org.junit.Test; | ||
| import org.threeten.bp.Duration; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is this a necessary import. It looks unused.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| RetrySettings.newBuilder() | ||
| .setMaxAttempts(2) | ||
| .build(); | ||
| private static final ApiClock API_CLOCK = |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Please document how retries are being exercised in these unit tests. It will help for posterity.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
cc: @jadekler, he wants to use the overload |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Pending tests passing.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for your patience @ajaaym! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Slow download performance for Storage API
There was an error while loading. Please reload this page.