Hi, Long time ago (> 7 years back) I wrote the Scan#setRowPrefixFilter method to make doing a prefix scan a lot easier and a lot more efficient. https://issues.apache.org/jira/browse/HBASE-11990
Today I was talking with a colleague and we found that recently this method has been marked as deprecated for the upcomming HBase 3.0.0 https://issues.apache.org/jira/browse/HBASE-25299 When looking into this ticket I found that the people who did this apparently misunderstood the working of this function and deprecated it because it did not behave as they expected it to behave. It behaves exactly as designed and intended. The key thing is that this method does a complex calculation to set the right startRow and stopRow to get to a very efficient prefix scan. If you add your own calls to set the startRow and stopRow then - these will be wiped (i.e. you do not get what you expected) if you do them before the setRowPrefixFilter - these will yield undefined results if you do them after the setRowPrefixFilter Apparently the documentation I wrote in this part all those years ago was not clear enough that you should not do this. I disagree with the deprecation because of this misunderstanding. So I created an issue and pull request to fix this. - Remove the deprecation - Improve the documentation that you should not use them in combination. https://issues.apache.org/jira/browse/HBASE-26762 https://github.com/apache/hbase/pull/4119 -- Best regards / Met vriendelijke groeten, Niels Basjes
