You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Abhishek Singh Chouhan (JIRA)" <ji...@apache.org> on 2015/04/14 09:28:13 UTC

[jira] [Commented] (HBASE-13347) RowCounter using special filter is broken

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

Abhishek Singh Chouhan commented on HBASE-13347:
------------------------------------------------

I was trying to figure out a case where this would give a wrong result.
As per the API doc  "Only Filter.filterKeyValue(Cell) is called AFTER all tests for ttl, column match, deletes and max versions have been run."
Since we match the column before applying filter we would get correct row count irrespective of the filter we use(FirstKeyOnlyFilter or FirstKeyValueMatchingQualifiersFilter) although we might get the KV which does not have the column we specified as that might not be the first column in the KVs for that row.But for row count that would not matter?
Also there is a test for row counter "testRowCounterHiddenColumn" that is passing with the current code(giving the correct count).
I'm new to HBase codebase so might be interpreting things wrongly :)

> RowCounter using special filter is broken
> -----------------------------------------
>
>                 Key: HBASE-13347
>                 URL: https://issues.apache.org/jira/browse/HBASE-13347
>             Project: HBase
>          Issue Type: Bug
>          Components: mapreduce
>    Affects Versions: 1.0.0
>            Reporter: Lars George
>             Fix For: 2.0.0, 1.1.0, 1.0.2
>
>
> The {{RowCounter}} in the {{mapreduce}} package is supposed to check if the row count scan has a column selection added to it, and if so, use a different filter that finds the row and counts it. But the {{qualifier.add()}} call is missing in the {{for}} loop. See https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java#L165
> Needs fixing or row count might be wrong when using {{--range}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)