Uh oh!
There was an error while loading. Please reload this page.
HBASE-8458 Support for batch version of checkAndPut() and checkAndDel… - #1320
HBASE-8458 Support for batch version of checkAndPut() and checkAndDel…#1320brfrn169 wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| */ | ||
| public Builder qualifier(byte[] qualifier) { | ||
| this.qualifier = Preconditions.checkNotNull(qualifier, "qualifier is null. Consider using" + | ||
| " an empty byte array, or just do not call this method if you want a null qualifier"); |
There was a problem hiding this comment.
Helpful precondition fail message.
On fail, it comes out ok? Back to the client?
There was a problem hiding this comment.
Back to the client. On fail, it will throw NullPointerException.
| * @param value the expected value | ||
| * @return the builder object | ||
| */ | ||
| public Builder ifMatches(CompareOperator compareOp, byte[] value) { |
There was a problem hiding this comment.
We already have the same name as this method in Table$CheckAndMutateBuilder and AsyncTable$CheckAndMutateBuilder, so I named this method as the same name.
Table$CheckAndMutateBuilder#ifMatches:
https://github.com/brfrn169/hbase/blob/f66cbe1a40cd9d4cd4abd27c7ac9d1a5168b885f/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java#L346
AsyncTable$CheckAndMutateBuilder#ifMatches:
https://github.com/brfrn169/hbase/blob/f66cbe1a40cd9d4cd4abd27c7ac9d1a5168b885f/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTable.java#L269
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| regionActionBuilder.addAction(actionBuilder.setMutation(mp).build()); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Argh. The old code was hard to decipher.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
brfrn169
left a comment
There was a problem hiding this comment.
Thank you for reviewing this! @saintstack@HorizonNet
I will modify this patch and push a new patch.
| */ | ||
| public Builder qualifier(byte[] qualifier) { | ||
| this.qualifier = Preconditions.checkNotNull(qualifier, "qualifier is null. Consider using" + | ||
| " an empty byte array, or just do not call this method if you want a null qualifier"); |
There was a problem hiding this comment.
Back to the client. On fail, it will throw NullPointerException.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| * @param value the expected value | ||
| * @return the builder object | ||
| */ | ||
| public Builder ifMatches(CompareOperator compareOp, byte[] value) { |
There was a problem hiding this comment.
We already have the same name as this method in Table$CheckAndMutateBuilder and AsyncTable$CheckAndMutateBuilder, so I named this method as the same name.
Table$CheckAndMutateBuilder#ifMatches:
https://github.com/brfrn169/hbase/blob/f66cbe1a40cd9d4cd4abd27c7ac9d1a5168b885f/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java#L346
AsyncTable$CheckAndMutateBuilder#ifMatches:
https://github.com/brfrn169/hbase/blob/f66cbe1a40cd9d4cd4abd27c7ac9d1a5168b885f/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTable.java#L269
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| * @param checkAndMutates The list of rows to apply. | ||
| * @return A {@link CompletableFuture} that wrapper the result boolean list. | ||
| */ | ||
| default CompletableFuture<List<Boolean>> checkAndMutateAll( |
There was a problem hiding this comment.
In AsyncTable, for methods returning List object, we provide 2 pattern methods returning List<CompletableFuture> and CompletableFuture<List>, and the latter's name is the former's name + "All".
For example, we already provide AsyncTable#get and AsyncTable#getAll:
https://github.com/brfrn169/hbase/blob/f66cbe1a40cd9d4cd4abd27c7ac9d1a5168b885f/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTable.java#L452-L471
I did the same for checkAndMutate and checkAndMutateAll.
Uh oh!
There was an error while loading. Please reload this page.
brfrn169
commented
Mar 29, 2020
I added a new commit. In this commit, I did the following:
@saintstack@Apache9@HorizonNet Could you please take look at this when you get a chance? |
Uh oh!
There was an error while loading. Please reload this page.
I fixed some conflicts and added the Javadoc for the deprecation. Also, I re-ran QA. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Apache-HBase
commented
Apr 10, 2020
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Apr 10, 2020
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Apr 10, 2020
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Apr 10, 2020
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Apr 10, 2020
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Apr 10, 2020
🎊 +1 overall
This message was automatically generated. |
brfrn169
commented
May 2, 2020
Closing this. Will create another PR. |
…ete()