[
https://issues.apache.org/jira/browse/HBASE-1938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078377#comment-13078377
]
nkeywal commented on HBASE-1938:
--------------------------------
For any future modification on this part: on jdk 1.6.24, it seems that this
code:
{noformat}
protected KeyValue getLower(KeyValue first, KeyValue second) {
if (first == null && second == null) {
return null;
}
if (first != null && second != null) {
int compare = comparator.compare(first, second);
return (compare <= 0 ? first : second);
}
return (first != null ? first : second);
}{noformat}
performs better than this one:
{noformat}
protected KeyValue getLower(KeyValue first, KeyValue second) {
if (first == null) {
return second ;
}
if (second == null) {
return first ;
}
int compare = comparator.compare(first, second);
return (compare <= 0 ? first : second);
}{noformat}
There is a lot of variances in the result, but the average goes for the first
one.
The first one is the current implementation; so I kept it (this is a difference
with the previous patch). The second one is actually used in the same file for
a similar problem, in MemStore#getLowest, nevertheless, I kept it as well.
> Make in-memory table scanning faster
> ------------------------------------
>
> Key: HBASE-1938
> URL: https://issues.apache.org/jira/browse/HBASE-1938
> Project: HBase
> Issue Type: Improvement
> Components: performance
> Reporter: stack
> Assignee: nkeywal
> Priority: Blocker
> Fix For: 0.90.4, 0.92.0
>
> Attachments: 20110726_1938_KeyValueSkipListSet.patch,
> 20110726_1938_MemStore.patch, 20110726_1938_MemStoreScanPerformance.java,
> 20110802_MemStore.patch, MemStoreScanPerformance.java,
> MemStoreScanPerformance.java, MemStoreScanPerformance.java,
> caching-keylength-in-kv.patch, test.patch
>
>
> This issue is about profiling hbase to see if I can make hbase scans run
> faster when all is up in memory. Talking to some users, they are seeing
> about 1/4 million rows a second. It should be able to go faster than this
> (Scanning an array of objects, they can do about 4-5x this).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira