[
https://issues.apache.org/jira/browse/HBASE-14934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15044573#comment-15044573
]
Heng Chen commented on HBASE-14934:
-----------------------------------
{code}
/**
* <p>Set a filter (using stopRow and startRow) so the result set only
contains rows where the
* rowKey starts with the specified prefix.</p>
* <p>This is a utility method that converts the desired rowPrefix into the
appropriate values
* for the startRow and stopRow to achieve the desired result.</p>
* <p>This can safely be used in combination with setFilter.</p>
* <p><b>NOTE: Doing a {@link #setStartRow(byte[])} and/or {@link
#setStopRow(byte[])}
* after this method will yield undefined results.</b></p>
* @param rowPrefix the prefix all rows must start with. (Set <i>null</i> to
remove the filter.)
* @return this
*/
public Scan setRowPrefixFilter(byte[] rowPrefix) {
if (rowPrefix == null) {
setStartRow(HConstants.EMPTY_START_ROW);
setStopRow(HConstants.EMPTY_END_ROW);
} else {
this.setStartRow(rowPrefix);
this.setStopRow(calculateTheClosestNextRowKeyForPrefix(rowPrefix));
}
return this;
}
{code}
This method seems only set start row and end row, not set filter... We
should keep the PrefixFilter?
> Applying PrefixFilter to a scan should implicitly limit startrow
> ----------------------------------------------------------------
>
> Key: HBASE-14934
> URL: https://issues.apache.org/jira/browse/HBASE-14934
> Project: HBase
> Issue Type: Improvement
> Components: Filters
> Reporter: Nick Dimiduk
> Priority: Minor
> Attachments: HBASE-14934.patch
>
>
> As was mentioned over on HBASE-14928, client setting a {{PrefixFilter}}
> should imply a startrow on the scan.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)