-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-11982] Java Spanner - Implement IO Request Count metrics #15493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@ajamato Would you help me to review the progress on this? It is still pending to add Line 99 in 63c0723
but at this point the ReadOperation is not accessible, only Transaction Line 161 in 63c0723
My suggested approach is to add queryName to CreateTransaction Builder so I can extract queryName inside ReadFromPartitionFn process method Line 753 in 63c0723
|
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
|
@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.*; |
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.
Could you run ./gradlew spotlessApply ?
I think the preferred style is to avoid wildcard imports
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, done!
| import java.util.Comparator; | ||
| import java.util.List; | ||
| import java.util.OptionalInt; | ||
| import java.util.*; |
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.
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.*; |
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.
ditto, wildcard imports
|
Run Python PreCommit |
|
@aaltay could you merge? Thanks! |
|
Thank you all! |
|
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 |
|
Thanks, filed https://issues.apache.org/jira/browse/BEAM-13665. @nielm is this something you are interested in fixing? |
|
Filed #16547 |
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
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
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:
R: @username).[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
ValidatesRunnercompliance status (on master branch)Examples testing status on various runners
Post-Commit SDK/Transform Integration Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.