GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Storage: Fix slow download performance by ajaaym · Pull Request #5791 · googleapis/google-cloud-java

Conversation

@ajaaym

@ajaaym ajaaym commented Jul 19, 2019

Copy link
Copy Markdown
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.

zeeshan-m and frankyn reacted with thumbs up emoji quentar reacted with hooray emoji
All reactions
  • 👍 2 reactions
  • 🎉 1 reaction
ajaaym added 2 commits July 19, 2019 10:43
@ajaaym
download blob using direct download method
c00cb4c
@ajaaym
update test case
615dab7
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 19, 2019
@ajaaym
fix format
ae1ffab
@codecov

codecov Bot commented Jul 19, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@4dbff6e). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5791   +/-   ##
=========================================
  Coverage          ?   46.51%           
  Complexity        ?    25648           
=========================================
  Files             ?     2456           
  Lines             ?   267497           
  Branches          ?    29751           
=========================================
  Hits              ?   124415           
  Misses            ?   133039           
  Partials          ?    10043
Impacted Files Coverage Δ Complexity Δ
...e/src/main/java/com/google/cloud/storage/Blob.java 82.35% <100%> (ø) 30 <1> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4dbff6e...cb65519. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ajaaym
add test case for retries
1bdc864
@ajaaym ajaaym changed the title [WIP]Storage: Fix #3929 Slow download performance for Storage API Storage: Fix #3929 Slow download performance for Storage API Jul 19, 2019
@ajaaym

ajaaym commented Jul 19, 2019

Copy link
Copy Markdown
Contributor Author

@JesseLovelace @frankyn can you please review?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chingor13 chingor13 assigned JesseLovelace Jul 23, 2019
@frankyn
frankyn self-requested a review July 25, 2019 17:08
frankyn
frankyn suggested changes Jul 27, 2019
View reviewed changes

@frankyn frankyn left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java Outdated
* @param outputStream
*/
public void downloadTo(OutputStream outputStream) {
downloadTo(outputStream, new BlobSourceOption[0]);

@frankyn frankyn Jul 25, 2019

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ajaaym ajaaym Jul 30, 2019

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobTest.java
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 =

@frankyn frankyn Jul 25, 2019

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ajaaym ajaaym Jul 30, 2019

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ajaaym added 2 commits July 30, 2019 08:14
@ajaaym
remove method
48777c2
@ajaaym
update test retry setting
0aebf4c
frankyn
frankyn suggested changes Jul 30, 2019
View reviewed changes

@frankyn frankyn left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobTest.java Outdated
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.threeten.bp.Duration;

@frankyn frankyn Jul 30, 2019

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/BlobTest.java
RetrySettings.newBuilder()
.setMaxAttempts(2)
.build();
private static final ApiClock API_CLOCK =

@frankyn frankyn Jul 30, 2019

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@frankyn

frankyn commented Jul 30, 2019

Copy link
Copy Markdown
Contributor

cc: @jadekler, he wants to use the overload Blob.downloadTo(OutputStream, ...).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chingor13 chingor13 changed the title Storage: Fix #3929 Slow download performance for Storage API Storage: Fix slow download performance Jul 30, 2019
ajaaym added 2 commits July 30, 2019 21:50
@ajaaym
fix lint and add comment
58469f5
@ajaaym
fix lint
cb65519
frankyn
frankyn approved these changes Jul 31, 2019
View reviewed changes

@frankyn frankyn left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Pending tests passing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@frankyn

frankyn commented Jul 31, 2019

Copy link
Copy Markdown
Contributor

Thanks for your patience @ajaaym!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ajaaym
ajaaym merged commit 82298d0 into googleapis:master Jul 31, 2019
@ajaaym ajaaym mentioned this pull request Jul 31, 2019
Storage: add service api to read storage object in to output stream using direct download #5525
Merged
@kolea2 kolea2 mentioned this pull request Jul 31, 2019
Release google-cloud-java v0.103.0 #5950
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@frankyn frankyn frankyn approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@JesseLovelace JesseLovelace

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Slow download performance for Storage API

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@ajaaym @frankyn @googlebot @JesseLovelace
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.