GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: adding utility to transform protobuf into model object by rahulKQL · Pull Request #299 · googleapis/java-bigtable

This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Conversation

@rahulKQL

@rahulKQL rahulKQL commented May 11, 2020

Copy link
Copy Markdown
Contributor

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rahulKQL
feat: adding utility to transform protobuf into model object
ea099c4
With this commit, User shall be able to transform protobuf object to bigtable client's specific model objects.
@rahulKQL
rahulKQL requested a review from igorbernstein2 May 11, 2020 17:12
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 11, 2020
@codecov

codecov Bot commented May 11, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #299 into master will increase coverage by 0.47%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ Complexity Δ
...le/cloud/bigtable/data/v2/models/BulkMutation.java 100.00% <100.00%> (ø) 11.00 <1.00> (+1.00)
...igtable/data/v2/models/ConditionalRowMutation.java 97.50% <100.00%> (+0.35%) 12.00 <1.00> (+1.00)
...google/cloud/bigtable/data/v2/models/Mutation.java 87.09% <100.00%> (+0.43%) 28.00 <1.00> (+1.00)
...ud/bigtable/data/v2/models/ReadModifyWriteRow.java 98.00% <100.00%> (+2.34%) 11.00 <1.00> (+2.00)
...gle/cloud/bigtable/data/v2/models/RowMutation.java 71.42% <100.00%> (+1.61%) 13.00 <1.00> (+1.00)
...ud/bigtable/data/v2/stub/EnhancedBigtableStub.java 95.26% <0.00%> (+0.08%) 21.00% <0.00%> (+1.00%)
...om/google/cloud/bigtable/emulator/v2/Emulator.java 59.13% <0.00%> (+2.60%) 14.00% <0.00%> (ø%)
...able/admin/v2/BaseBigtableInstanceAdminClient.java 61.46% <0.00%> (+4.39%) 56.00% <0.00%> (ø%)
...igtable/admin/v2/BaseBigtableTableAdminClient.java 62.90% <0.00%> (+4.72%) 67.00% <0.00%> (ø%)

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 4374492...1e680e8. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

igorbernstein2
igorbernstein2 suggested changes May 11, 2020
View reviewed changes
Comment thread google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...loud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutationEntry.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@rahulKQL
chore: addressed feedback comments
154130d
 - updated the JavaDoc
 - marked the utility as `@BetaApi`
igorbernstein2
igorbernstein2 reviewed May 12, 2020
View reviewed changes
Comment thread ...-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java Outdated
* BigtableDataClient. The mutation must always be idempotent because it would be retried.
*/
@BetaApi
public static ConditionalRowMutation fromProtobuf(@Nonnull CheckAndMutateRowRequest request) {

@igorbernstein2 igorbernstein2 May 12, 2020

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
igorbernstein2
igorbernstein2 reviewed May 12, 2020
View reviewed changes
Comment thread google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

igorbernstein2
igorbernstein2 reviewed May 12, 2020
View reviewed changes
Comment thread google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

igorbernstein2
igorbernstein2 reviewed May 12, 2020
View reviewed changes
Comment thread google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@rahulKQL
chore: addressed feedback comments
511f924
 - Rephrased Javadoc to include more explanation
 - change `Mutation#fromProto` visibility to package only
igorbernstein2
igorbernstein2 reviewed May 12, 2020
View reviewed changes
Comment thread google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@rahulKQL
chore: removed VisibleForTesting annotation
e079eff
As Mutation#fromProto is being used by RowMutation#fromProto, So removed `@VisibleForTesting` annotation
@rahulKQL
rahulKQL requested a review from igorbernstein2 May 13, 2020 15:25
igorbernstein2
igorbernstein2 approved these changes May 13, 2020
View reviewed changes

@igorbernstein2 igorbernstein2 left a comment

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rahulKQL
chore: extended unit tests to verify project and instance override
1e680e8
@rahulKQL
rahulKQL merged commit 00f6d2d into googleapis:master May 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@igorbernstein2 igorbernstein2 igorbernstein2 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Create fromProtobuf utility method in existing models

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@rahulKQL @igorbernstein2 @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.