[
https://issues.apache.org/jira/browse/HBASE-3453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984493#action_12984493
]
ryan rawson commented on HBASE-3453:
------------------------------------
at this point we do not have distributed filter state, that is as a
scanner skips between regions, each region gets a new instantiation of
the filter.
while it's really attractive to have the DB handle this for you, most
of the scalable designs i've heard do not use the offset/limit of the
database. Even the mysql implementation is not very efficient because
it must do the entire query every time and use internal counters to
skip (while still incurring the io overhead). HBase is similar, but
the twist of our regions prevents this from effectively working in all
cases.
> How about RowPaginationFilter
> -----------------------------
>
> Key: HBASE-3453
> URL: https://issues.apache.org/jira/browse/HBASE-3453
> Project: HBase
> Issue Type: Wish
> Components: client
> Affects Versions: 0.90.1
> Environment: windows 7
> Reporter: ncanis
> Attachments: RowPaginationFilter.java
>
>
> I know hbase has already PageFilter.
> But, sometime we need to get row data from specified position.
> * only for newbie:
> If you want to write custom Filter, you also add filter class to an hbase
> server classpath.
> {code:title=RowPaginationFilter|borderStyle=solid}
> /**
> * Constructor that takes a maximum page size.
> *
> * get row from offset to offset+limit ( offset<= row<=offset+limit )
> * @param offset start position
> * @param limit count from offset position
> */
> public RowPaginationFilter(final int offset, final int limit) {
> this.offset = offset;
> this.limit = limit;
> }
> //true to exclude row, false to include row.
> @Override
> public boolean filterRow() {
>
> boolean isExclude = this.rowsAccepted < this.offset ||
> this.rowsAccepted>=this.limit+this.offset;
> rowsAccepted++;
> return isExclude;
> }
> {code}
> -----------------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.