[ 
https://issues.apache.org/jira/browse/HBASE-19213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16280397#comment-16280397
 ] 

Peter Somogyi commented on HBASE-19213:
---------------------------------------

I had a discussion with [~appy] about this design because an issue came up 
since the then*() methods in Table and AsyncTable have the same signature but 
the ones in Table throws an exception. The throws clause could be added to 
AsyncTable but then we'd loose the ability to create nice stream operations and 
we already have those in some places.

We agreed to introduce a CheckAndMutateBuilderBase interface with all the 
methods excepts then*(), add the implementations in 
CheckAndMutateBuilderBaseImpl. In Table and AsyncTable add 1-1 internal 
interface with the relevant then*() methods. The implementations in e.g HTable 
would look like this: {{private class CheckAndMutateBuilderImpl extends 
CheckAndMutateBuilderBaseImpl implements CheckAndMutateBuilder}}.

> Align check and mutate operations in Table and AsyncTable
> ---------------------------------------------------------
>
>                 Key: HBASE-19213
>                 URL: https://issues.apache.org/jira/browse/HBASE-19213
>             Project: HBase
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 2.0.0-alpha-4
>            Reporter: Peter Somogyi
>            Assignee: Peter Somogyi
>            Priority: Minor
>             Fix For: 2.0.0-beta-1
>
>         Attachments: HBASE-19213.branch-2.002.patch, 
> HBASE-19213.master.001.patch, HBASE-19213.master.001.patch, 
> HBASE-19213.master.002.patch
>
>
> Check and mutate methods are way different. Table has checkAndx methods (some 
> of them are deprecated), but AsyncTable has an interface called 
> CheckAndMutateBuilder and these kind of operations are handled through that.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to