-
Notifications
You must be signed in to change notification settings - Fork 178
WIP: Added ModelRowAdapter for models.Row to Result #2056
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
author Rahul Kesharawni <[email protected]> 1547731427 +0530 committer Rahul Kesharwani <[email protected]> 1548146899 +0530 Adding ModelRowAdapter for models.Row Removed TODOs & extra WS Removed TODOs & extra WS
|
Reason for WIP: Would raise another PR to update existing RowAdapter which will convert |
...table-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/read/ModelRowAdapter.java
Outdated
Show resolved
Hide resolved
|
I have updated @sduskis @igorbernstein2 Please have a look |
igorbernstein2
left a comment
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.
Is this model adapter only used for read rows? or will it be used for mutateRow, checkAndMutateRow, readAndModifyRow, etc?
| // TODO(kevinsi4508): Filter out targeted {@link WhileMatchFilter} labels. | ||
| if (rowCell.getLabels().size() > 0) { | ||
| continue; | ||
| } |
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 looks fishy, shouldn't this be an internal implementation detail of WhileMatchFilter?
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 is unnecessary code. Please remove the comment and the if statement.
yes, Our intent is to use this adapter for all operations involving models.Row (In case of FlatRow we would be using an existing read.FlatRowAdapter). |
|
This PR has surfaced an deficiency in google-cloud-java client. Not having the cells ordered by default creates a lot of confusion. For example, ReadModifyWrite returns a row that doesn't use a RowAdapter so it will not be sorted. To avoid guessing I think we should just move the sorting to google-cloud-java. I put together PR here: |
|
Thanks for adding this sorting feature in GCJ!! This would make cbt flow easy for converting Please let me know your thought on this. |
|
I don't quite understand what you mean. When will this be called with a Row that doesn't have sorted cells? |
I meant by above is, once we move to GCJ's adapter we won't have to sort the cell.
But as of now we would have to keep SortedSet & TreeSet same as exisitng sorting (exsiting cbt RowAdapter) untill we start using GCJ adapters for both data & admin client. |
|
I know we had already discussed ModelRowAdapter in this PR, But I have put together another approach in #2061 to make existing As I mentioned above, we would have to keep TreeSet in RowAdapter till we start using GCJ's adapter(as of now we are just using its model classes, not the actual client). Please have a look and let me know of your thoughts. |
|
Would it be ok to keep a |
|
I think we should be ok to use |
|
Could we close this PR? |
What Change this PR contains
ModelRowAdapter: To convertmodels.Rowtohbase.client.Result.Adapters.java.Note: This Adapter has a similar implementation as existing RowAdapter, Once all references of existing
RowAdapteris migrated then we can removeRowAdapter.