Skip to content

Conversation

@benEng
Copy link
Contributor

@benEng benEng commented Sep 10, 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
Copy link
Contributor Author

benEng commented Sep 10, 2021

@ajamato Would you help me to review the progress on this? It is still pending to add queryName as label metrics, but I want to ask your opinion about it.
I added queryName to ReadOperation Builder


but at this point the ReadOperation is not accessible, only Transaction
My suggested approach is to add queryName to CreateTransaction Builder so I can extract queryName inside ReadFromPartitionFn process method

@codecov
Copy link

codecov bot commented Sep 10, 2021

Codecov Report

Merging #15493 (6989863) into master (587f58e) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15493      +/-   ##
==========================================
+ Coverage   83.76%   83.77%   +0.01%     
==========================================
  Files         444      444              
  Lines       60319    61075     +756     
==========================================
+ Hits        50528    51168     +640     
- Misses       9791     9907     +116     
Impacted Files Coverage Δ
.../python/apache_beam/testing/test_stream_service.py 88.37% <0.00%> (-4.66%) ⬇️
...che_beam/runners/interactive/interactive_runner.py 90.74% <0.00%> (-1.86%) ⬇️
...pache_beam/runners/interactive/interactive_beam.py 76.11% <0.00%> (-0.66%) ⬇️
...hon/apache_beam/runners/worker/bundle_processor.py 93.64% <0.00%> (-0.13%) ⬇️
.../python/apache_beam/portability/api/metrics_pb2.py 100.00% <0.00%> (ø)
...on/apache_beam/portability/api/metrics_pb2_urns.py 100.00% <0.00%> (ø)
...eam/runners/interactive/interactive_environment.py 91.25% <0.00%> (+0.01%) ⬆️
sdks/python/apache_beam/io/gcp/bigquery.py 75.93% <0.00%> (+0.40%) ⬆️
...runners/interactive/display/pcoll_visualization.py 86.36% <0.00%> (+0.50%) ⬆️
sdks/python/apache_beam/io/gcp/bigquery_tools.py 88.74% <0.00%> (+2.04%) ⬆️
... and 1 more

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 587f58e...6989863. Read the comment docs.

@kileys
Copy link
Contributor

kileys commented Sep 21, 2021

@ajamato Could you provide feedback? Thanks!

import com.google.cloud.spanner.ResultSet;
import com.google.cloud.spanner.Struct;
import com.google.cloud.spanner.TimestampBound;
import com.google.cloud.spanner.*;
Copy link

Choose a reason for hiding this comment

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

Could you run ./gradlew spotlessApply ?

I think the preferred style is to avoid wildcard imports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, done!

import java.util.Comparator;
import java.util.List;
import java.util.OptionalInt;
import java.util.*;
Copy link

Choose a reason for hiding this comment

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

ditto, wildcard imports

import com.google.cloud.spanner.TimestampBound;
import com.google.cloud.spanner.Type;
import com.google.cloud.spanner.Value;
import com.google.cloud.spanner.*;
Copy link

Choose a reason for hiding this comment

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

ditto, wildcard imports

@benEng benEng changed the title [WIP][BEAM-11982] Java Spanner - Implement IO Request Count metrics [BEAM-11982] Java Spanner - Implement IO Request Count metrics Sep 21, 2021
@benEng benEng marked this pull request as ready for review September 21, 2021 22:14
@kileys
Copy link
Contributor

kileys commented Sep 24, 2021

Run Python PreCommit

@kileys
Copy link
Contributor

kileys commented Sep 24, 2021

@aaltay could you merge? Thanks!

@aaltay aaltay merged commit 974d4e3 into apache:master Sep 25, 2021
@benEng
Copy link
Contributor Author

benEng commented Sep 27, 2021

Thank you all!

dmitriikuzinepam pushed a commit to dmitriikuzinepam/beam that referenced this pull request Nov 2, 2021
@nielm
Copy link
Contributor

nielm commented Jan 14, 2022

Note: This PR makes the GCP projectID a required parameter - which it was not before, as it could be inferred from the environment - and thus breaks backward compatibility.

Specifically: BatchSpannerRead.java:175 -- the toString() is not required on the valueProvider, it should just be a get(), and createServiceCallMetric() in line 195 should handle the situation where projectID could be null

@lukecwik
Copy link
Member

Thanks, filed https://issues.apache.org/jira/browse/BEAM-13665.

@nielm is this something you are interested in fixing?

@nielm
Copy link
Contributor

nielm commented Jan 18, 2022

Filed #16547

nielm added a commit to nielm/beam that referenced this pull request Jan 18, 2022
Fixes regression introduced by PR apache#15493 which inadvertently caused
an NPE when the projectID was not specified for a SpannerIO read or
write.

Adds unit test for reading/writing both with and without projectID
lukecwik pushed a commit that referenced this pull request Jan 18, 2022
Fixes regression introduced by PR #15493 which inadvertently caused
an NPE when the projectID was not specified for a SpannerIO read or
write.

Adds unit test for reading/writing both with and without projectID
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