-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: expose new API with ReadRowsRequest in EnhancedBigtableStub #276
Conversation
…leStub This commit would enable the user to target the table using absolute resource name on each read request. Currently we expose `ServerStreamingCallable<Query, RowT>`, which does not have an option to provide different `app-profile-id` on each request.
Codecov Report
@@ Coverage Diff @@
## master #276 +/- ##
============================================
- Coverage 79.72% 79.52% -0.21%
- Complexity 991 992 +1
============================================
Files 99 99
Lines 6388 6447 +59
Branches 319 318 -1
============================================
+ Hits 5093 5127 +34
- Misses 1098 1119 +21
- Partials 197 201 +4
Continue to review full report at Codecov.
|
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 code is a bit hard to follow can we reorg it a bit?
ServerStreamingCallable<ReadRowsRequest,RowT> createBaseCallable(settings, adapter)
- create the base chain with retries and row stitching
ServerStreamingCallable<ReadRowsRequest, RowT> createReadRowsRawCallable(adapter)
- calls baseCallable
- adds Context
createReadRowsCallable(adapter)
- calls baseCallable
- adds ReadRowsUserCallable
- adds tracing + metrics
- adds context
createReadRowsCallable(adapter)
- calls baseCallable
- adds ReadRowsUserCallable
- first()
- adds tracing + metrics
- adds context
* | ||
* <p>NOTE: the caller is responsible for adding tracing & metrics. | ||
*/ | ||
public <RowT> ServerStreamingCallable<ReadRowsRequest, RowT> createReadRowsRawCallable( |
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 mark this as BetaApi and add a disclaimer that this method might be removed in the future
* | ||
* <p>NOTE: the caller is responsible for adding tracing & metrics. | ||
*/ | ||
public <RowT> ServerStreamingCallable<ReadRowsRequest, RowT> createReadRowsBaseCallable( |
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 should not be public
With this commit, the public createReadRowsCallable() would refer to single createReadRowsBaseCallable.
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.
lgtm
Fixes #275
This commit would enable the user to target the table using an absolute resource name on each read request. Currently, we expose
ServerStreamingCallable<Query, RowT>
, which does not have an option to provide differentapp-profile-id
on each request.Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: