[
https://issues.apache.org/jira/browse/HBASE-14997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stack updated HBASE-14997:
--------------------------
Resolution: Fixed
Hadoop Flags: Reviewed
Release Note:
Deprecate checkAnd* APIs that take the filter CompareOp. Added new overrides
that take a generic CompareOperation instead. CompareOperation will be used by
checkAnd* in Table API and by filters going forward.
Other nice improvements suggested by this issue have been moved out to
HBASE-18774.
Status: Resolved (was: Patch Available)
Resolving. Made HBASE-18774 so we don't lose the other nice suggestions made in
this issue. [~enis] if you want me to move the CompareOperation, just say. It
is in hbase-common at top-level currently. It will be used by Table,
CompareFilter and over in Rest and Thrift modules too doing convert to
CompareOperation.
> Move compareOp and Comparators out of filter to client package
> --------------------------------------------------------------
>
> Key: HBASE-14997
> URL: https://issues.apache.org/jira/browse/HBASE-14997
> Project: HBase
> Issue Type: Sub-task
> Reporter: Enis Soztutar
> Assignee: stack
> Priority: Critical
> Fix For: 2.0.0-alpha-3
>
> Attachments: HBASE-14997.master.001.patch,
> HBASE-14997.master.002.patch, HBASE-14997.master.003.patch,
> HBASE-14997.master.004.patch
>
>
> {{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.
> {code}
> boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
> CompareFilter.CompareOp compareOp, byte[] value, Put put) throws
> IOException;
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)