Uh oh!
There was an error while loading. Please reload this page.
Storage: Fix slow download performance - #5791
Conversation
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.
|
ajaaym
commented
Jul 19, 2019
@JesseLovelace@frankyn can you please review? |
frankyn
left a comment
There was a problem hiding this comment.
Apologies for the delay, I didn't click submit.
| * @param outputStream | ||
| */ | ||
| public void downloadTo(OutputStream outputStream) { | ||
| downloadTo(outputStream, new BlobSourceOption[0]); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
yes its not needed. removed it.
| 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.
There's heavy retry settings in the tests. Is this by design and how do they help?
There was a problem hiding this comment.
updated retry settings needed for test.
| import org.junit.After; | ||
| import org.junit.Before; | ||
| import org.junit.Test; | ||
| import org.threeten.bp.Duration; |
There was a problem hiding this comment.
Is this a necessary import. It looks unused.
| RetrySettings.newBuilder() | ||
| .setMaxAttempts(2) | ||
| .build(); | ||
| private static final ApiClock API_CLOCK = |
There was a problem hiding this comment.
Please document how retries are being exercised in these unit tests. It will help for posterity.
frankyn
commented
Jul 30, 2019
cc: @jadekler, he wants to use the overload |
frankyn
commented
Jul 31, 2019
Thanks for your patience @ajaaym! |
Fixes#3929 Updated blob to download using direct download method