[
https://issues.apache.org/jira/browse/HBASE-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matus Zamborsky updated HBASE-1790:
-----------------------------------
Attachment: 1790-3.patch
Jonathan I see what you tried to do, but if we need to make the Prefix filter
stateful(or any other filter) than the HRegion.nextInternal method is basicaly
depending on filter to be able to tell, if there will be no more accepted rows,
before filtering them. This is possible for alfanumeric filters like prefix
filter, but I think, it will break down with ValueFilter and a situation on
last passed row, because ValueFilter cant tell if there would be any acceptable
rows, before aplying filter. So I rewrite the nextInternal and next method.
Also I rewrite the test file TestFilter. There are 4 test methods now: without
filter, prefixfilter(dont need to apply jonathans patch), pagefilter and
valuefilter. And I also add new filter StartPageFilter, which is the same as
PageFilter, but you can specify how many rows should be skipped before the
paging.
I am developing on windows, so I dont have the best conditions for running
tests. Although this nextInternal implementation passed TestFilter tests, I am
not sure, if it will passed all the others tests. If anybody can try this it
would be great.
As I was searching for all usages of InternalScanner.next function, which
basicaly take the result of nextInternal in case of HRegion and thus should
return false if this is the last row, I came accross HMerge:
while(rootScanner.next(results)) {
for(KeyValue kv: results) {
HRegionInfo info = Writables.getHRegionInfoOrNull(kv.getValue());
if (info != null) {
metaRegions.add(info);
}
}
}
It looks like, it expects rootScanner.next(results) to be true for every row
and not for every row except the last. So Stack, should we correct this?
> filters are not working correctly
> ---------------------------------
>
> Key: HBASE-1790
> URL: https://issues.apache.org/jira/browse/HBASE-1790
> Project: Hadoop HBase
> Issue Type: Bug
> Components: filters
> Affects Versions: 0.20.0, 0.21.0
> Reporter: Matus Zamborsky
> Fix For: 0.20.0
>
> Attachments: 1790-3.patch, HBASE-1790-v2.patch, hbase-1790.patch,
> testfilter.patch
>
>
> Filters used in Scanning the table are not working correctly. For example a
> table with three rows:
> 1. rowkey = adminbackslash-nb0, desc:temp = "temp"
> 2. rowkey = adminbackslash-nb1, desc:temp = "temp"
> 3. rowkey = adminkleptoman, desc:temp = "temp"
> If I scan all rows in the table without filter I get all the rows as
> expected. But applying a simple prefixfilter with parameter "adminbackslash"
> will return only first row. I searched it down to HRegion::nextInternal
> method, which will not output one passed row before denied row(by filter).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.