Skip to content

Conversation

@benEng
Copy link
Contributor

@benEng benEng commented Aug 25, 2021

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

ValidatesRunner compliance status (on master branch)

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- Build Status Build Status Build Status Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Python --- Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status ---
XLang Build Status Build Status Build Status Build Status Build Status ---

Examples testing status on various runners

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- --- --- --- --- --- ---
Java --- Build Status
Build Status
Build Status
--- --- --- --- ---
Python --- --- --- --- --- --- ---
XLang --- --- --- --- --- --- ---

Post-Commit SDK/Transform Integration Tests Status (on master branch)

Go Java Python
Build Status Build Status Build Status
Build Status
Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@benEng benEng changed the title [WIP][BEAM-11980] Java GCS - Implement IO Request Count metrics [BEAM-11980] Java GCS - Implement IO Request Count metrics Aug 26, 2021
@benEng benEng marked this pull request as ready for review August 26, 2021 15:56
@benEng
Copy link
Contributor Author

benEng commented Aug 26, 2021

R: @ajamato. Would you help me to review this?

return channel;
} catch (IOException e) {
if (e.getCause() instanceof GoogleJsonResponseException) {
serviceCallMetric.call(((GoogleJsonResponseException) e.getCause()).getDetails().getCode());
Copy link

Choose a reason for hiding this comment

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

Has this been verified to be the proper way to catch this using an integration test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forced an error in the create method with an invalid bucket name, so it throws an error that can be handled like this.

Screen Shot 2021-08-26 at 10 55 35

HashMap<String, String> baseLabels = new HashMap<>();
baseLabels.put(MonitoringInfoConstants.Labels.PTRANSFORM, "");
baseLabels.put(MonitoringInfoConstants.Labels.SERVICE, "Storage");
baseLabels.put(MonitoringInfoConstants.Labels.METHOD, "Objects.get");
Copy link

Choose a reason for hiding this comment

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

Lets call this something more general, incase the underlying API changes.
Then upstream code handling the MonitoringInfo won't need to change, as the Method label will not need to change.

METHOD = "GcsGet"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, done!

@kileys
Copy link
Contributor

kileys commented Sep 7, 2021

Run Portable_Python PreCommit

@kileys
Copy link
Contributor

kileys commented Sep 7, 2021

Run Java PreCommit

1 similar comment
@kileys
Copy link
Contributor

kileys commented Sep 8, 2021

Run Java PreCommit

@benEng
Copy link
Contributor Author

benEng commented Sep 10, 2021

Run Java PreCommit

@kileys
Copy link
Contributor

kileys commented Sep 10, 2021

@aaltay can you merge?

@aaltay aaltay merged commit 92aebe4 into apache:master Sep 14, 2021
@benEng
Copy link
Contributor Author

benEng commented Sep 14, 2021

Thank you all!

dmitriikuzinepam pushed a commit to dmitriikuzinepam/beam that referenced this pull request Nov 2, 2021
* @return a SeekableByteChannel that can read the object data
*/
@VisibleForTesting
SeekableByteChannel open(GcsPath path, GoogleCloudStorageReadOptions readOptions)
Copy link
Member

@udim udim Dec 10, 2021

Choose a reason for hiding this comment

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

@chamikaramj While randomly reading this code, I was wondering if this method is the one called in pipelines or the above version with 1 argument (line 445).
edit: is this method only used in tests?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I stumbled upon this code while working on GCS migration and had the same question...

Looks like the only references are in the tests.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we will need to add the logic to the code path of reading.

Btw, writing looks fine. The count metrics are implemented in the common code path:

public WritableByteChannel create(GcsPath path, CreateOptions options) throws IOException {

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.

6 participants