hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chia-Ping Tsai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18811) Introduce the limited private to filter
Date Mon, 18 Sep 2017 16:01:07 GMT

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

Chia-Ping Tsai commented on HBASE-18811:

bq. shouldn't we atleast have an interface (eg. filter which is currently an abstract class)
that should be IA.Public and then we can keep the implementations LimitedPrivate? 
Good idea. Nevertheless, that still expose many methods to Public Client. The {{Get/Scan}}
should carry only the POJO such as row(byte[]) and flag(boolean), hence the {{Filter}} is
not a acceptable class. We can introduce an POJO class to carry the data used to build a filter.
The POJO class looks like this:
interface FilterProvider {
  byte[] toByteArray();
  static FilterProvider parseFrom(byte[]);
  Filter create(); 

class RowFilterProvider implements FilterProvider {
  RowFilterProvider(CompareOperator, ByteArrayComparable);
  Filter create() {
    return new RowFilter();
Also, we will deprecate {{xxxFilter}} in Scan and suggest user to use {{xxxFilterProvider}}.

> Introduce the limited private to filter
> ---------------------------------------
>                 Key: HBASE-18811
>                 URL: https://issues.apache.org/jira/browse/HBASE-18811
>             Project: HBase
>          Issue Type: Task
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>             Fix For: 2.0.0-alpha-4
>         Attachments: HBASE-18811.v0.patch
> We have many powerful callback functions to help user to build amazing application/services.
The most of functions are declared as IA.LimitedPrivate excluding the filters. As i see it,
the IA.LimitedPrivate will make the improvement of filter more flexible. Also, we can introduce
more server-side components to filters. In conclusion, we should consider adding the limited
private level for filter.

This message was sent by Atlassian JIRA

View raw message