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: adding utility to transform protobuf into model object #299
Conversation
With this commit, User shall be able to transform protobuf object to bigtable client's specific model objects.
Codecov Report
@@ Coverage Diff @@
## master #299 +/- ##
============================================
+ Coverage 79.51% 79.98% +0.47%
- Complexity 991 998 +7
============================================
Files 99 99
Lines 6444 6466 +22
Branches 318 340 +22
============================================
+ Hits 5124 5172 +48
+ Misses 1119 1115 -4
+ Partials 201 179 -22
Continue to review full report at Codecov.
|
google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java
Outdated
Show resolved
Hide resolved
...-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java
Show resolved
Hide resolved
...loud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java
Show resolved
Hide resolved
google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java
Outdated
Show resolved
Hide resolved
...-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutationEntry.java
Outdated
Show resolved
Hide resolved
- updated the JavaDoc - marked the utility as `@BetaApi`
* BigtableDataClient. The mutation must always be idempotent because it would be retried. | ||
*/ | ||
@BetaApi | ||
public static ConditionalRowMutation fromProtobuf(@Nonnull CheckAndMutateRowRequest request) { |
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.
Here and everywhere else, please stay consistent with existing fromProto
methods
google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java
Outdated
Show resolved
Hide resolved
google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java
Outdated
Show resolved
Hide resolved
google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java
Outdated
Show resolved
Hide resolved
- Rephrased Javadoc to include more explanation - change `Mutation#fromProto` visibility to package only
google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java
Outdated
Show resolved
Hide resolved
As Mutation#fromProto is being used by RowMutation#fromProto, So removed `@VisibleForTesting` annotation
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, but please extend the tests to make sure that project & instance get overwritten by the request context
Fixes #297
With this commit, the User shall be able to transform protobuf object to bigtable client's specific model objects.
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: