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

Anoop Sam John commented on PHOENIX-992:
----------------------------------------

There is one difference though wrt performance (in using reverse scan vs 
HTable.getRowOrBefore())
The HTable.getRowOrBefore() will do one parse of KVs within a HFile block.

The use of reverse scan(as in the patch) will do parse within an HFile block 2 
times.
1st time for the seek to last row when the reverse scanner is opened.
The next() call will return the last KV but will a move to the previous KV. 
This in effect will do a parse of KVs in the HFile block again.

Just telling the difference.

> Replace hTable.getRowOrBefore with ReverseScan to get maxKey in 
> StatsManagerImpl
> --------------------------------------------------------------------------------
>
>                 Key: PHOENIX-992
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-992
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.0.0, 5.0.0
>            Reporter: Jeffrey Zhong
>            Assignee: Jeffrey Zhong
>            Priority: Critical
>         Attachments: phoenix-992-v2.patch, phoenix-992.patch
>
>
> Below is the java doc of the function in HBase and we should remove it ASAP
> {noformat}
>    * @deprecated As of version 0.92 this method is deprecated without
>    * replacement.   
>    * getRowOrBefore is used internally to find entries in hbase:meta and makes
>    * various assumptions about the table (which are true for hbase:meta but 
> not
>    * in general) to be efficient.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to