Details
-
Sub-task
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
-
Description
Table.checkAndPut() and its cousins depend on CompareOp from the filter package. Originally, ComparaOp and ByteArrayComparable, and various "comparators" have been used in filters, so these are in the filter package. However, for checkAndPut(), etc we depend on the filter subpackage although these are not filter related operations. We can use some clean up.
boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, Put put) throws IOException;
Some ideas
- Cleanup ByteArrayComparable interface (see the TODO at the class)
- Maybe introduce a Condition or a similar concept and do checkAndPut(Condition condition, Put put) and change filters to use that as well.
- Introducing Condition like thing will allow us to have an interface like: checkAndMutate(List<Condition> conditions, List<Mutation> mutations).
- BinaryComparator, etc are not "Comparators", they are comparables.
Attachments
Attachments
Issue Links
- is related to
-
HBASE-10390 expose checkAndPut/Delete custom comparators in HTable
- Closed
- relates to
-
HBASE-18774 'Compare' API (checkAnd* and Filters) improvement
- Open
- links to