[jira] [Updated] (HBASE-9807) scanning with block encoding unnecessarily copies the key for each reseek
[ https://issues.apache.org/jira/browse/HBASE-9807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Hofhansl updated HBASE-9807: - Description: In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this: {code} ByteBuffer bb = getKey(); compared = reader.getComparator().compare(key, offset, length, bb.array(), bb.arrayOffset(), bb.limit()); {code} {{getKey()}} creates two ByteBuffers in ScannerV2 and makes a deep copy of the key in EncodedScannerV2. was: In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this: {code} ByteBuffer bb = getKey(); compared = reader.getComparator().compare(key, offset, length, bb.array(), bb.arrayOffset(), bb.limit()); {code} {{getKey()}} creates to ByteBuffers in ScannerV2 and makes a deep copy of the key in EncodedScannerV2. > scanning with block encoding unnecessarily copies the key for each reseek > - > > Key: HBASE-9807 > URL: https://issues.apache.org/jira/browse/HBASE-9807 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl >Assignee: Lars Hofhansl > Fix For: 0.98.0, 0.94.13, 0.96.1 > > Attachments: 9807-0.94.txt, 9807-0.94-v2.txt, 9807-0.94-v3.txt, > 9807-trunk-v1.txt > > > In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this: > {code} > ByteBuffer bb = getKey(); > compared = reader.getComparator().compare(key, offset, > length, bb.array(), bb.arrayOffset(), bb.limit()); > {code} > {{getKey()}} creates two ByteBuffers in ScannerV2 and makes a deep copy of > the key in EncodedScannerV2. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (HBASE-9807) scanning with block encoding unnecessarily copies the key for each reseek
[ https://issues.apache.org/jira/browse/HBASE-9807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Hofhansl updated HBASE-9807: - Attachment: 9807-0.94-v3.txt Somehow {{throws IOException}} sneaked in there. Not needed. > scanning with block encoding unnecessarily copies the key for each reseek > - > > Key: HBASE-9807 > URL: https://issues.apache.org/jira/browse/HBASE-9807 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl > Fix For: 0.98.0, 0.94.13, 0.96.1 > > Attachments: 9807-0.94.txt, 9807-0.94-v2.txt, 9807-0.94-v3.txt, > 9807-trunk-v1.txt > > > In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this: > {code} > ByteBuffer bb = getKey(); > compared = reader.getComparator().compare(key, offset, > length, bb.array(), bb.arrayOffset(), bb.limit()); > {code} > {{getKey()}} creates to ByteBuffers in ScannerV2 and makes a deep copy of the > key in EncodedScannerV2. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (HBASE-9807) scanning with block encoding unnecessarily copies the key for each reseek
[ https://issues.apache.org/jira/browse/HBASE-9807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Hofhansl updated HBASE-9807: - Status: Patch Available (was: Open) > scanning with block encoding unnecessarily copies the key for each reseek > - > > Key: HBASE-9807 > URL: https://issues.apache.org/jira/browse/HBASE-9807 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl > Fix For: 0.98.0, 0.94.13, 0.96.1 > > Attachments: 9807-0.94.txt, 9807-0.94-v2.txt, 9807-0.94-v3.txt, > 9807-trunk-v1.txt > > > In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this: > {code} > ByteBuffer bb = getKey(); > compared = reader.getComparator().compare(key, offset, > length, bb.array(), bb.arrayOffset(), bb.limit()); > {code} > {{getKey()}} creates to ByteBuffers in ScannerV2 and makes a deep copy of the > key in EncodedScannerV2. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (HBASE-9807) scanning with block encoding unnecessarily copies the key for each reseek
[ https://issues.apache.org/jira/browse/HBASE-9807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Hofhansl updated HBASE-9807: - Attachment: 9807-trunk-v1.txt And a patch for trunk. Note that prefix tree encoding cannot be optimized this way. So this patch won't help there. > scanning with block encoding unnecessarily copies the key for each reseek > - > > Key: HBASE-9807 > URL: https://issues.apache.org/jira/browse/HBASE-9807 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl > Fix For: 0.98.0, 0.94.13, 0.96.1 > > Attachments: 9807-0.94.txt, 9807-0.94-v2.txt, 9807-0.94-v3.txt, > 9807-trunk-v1.txt > > > In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this: > {code} > ByteBuffer bb = getKey(); > compared = reader.getComparator().compare(key, offset, > length, bb.array(), bb.arrayOffset(), bb.limit()); > {code} > {{getKey()}} creates to ByteBuffers in ScannerV2 and makes a deep copy of the > key in EncodedScannerV2. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (HBASE-9807) scanning with block encoding unnecessarily copies the key for each reseek
[ https://issues.apache.org/jira/browse/HBASE-9807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Hofhansl updated HBASE-9807: - Fix Version/s: 0.96.1 0.94.13 0.98.0 > scanning with block encoding unnecessarily copies the key for each reseek > - > > Key: HBASE-9807 > URL: https://issues.apache.org/jira/browse/HBASE-9807 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl > Fix For: 0.98.0, 0.94.13, 0.96.1 > > Attachments: 9807-0.94.txt, 9807-0.94-v2.txt > > > In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this: > {code} > ByteBuffer bb = getKey(); > compared = reader.getComparator().compare(key, offset, > length, bb.array(), bb.arrayOffset(), bb.limit()); > {code} > {{getKey()}} creates to ByteBuffers in ScannerV2 and makes a deep copy of the > key in EncodedScannerV2. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (HBASE-9807) scanning with block encoding unnecessarily copies the key for each reseek
[ https://issues.apache.org/jira/browse/HBASE-9807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Hofhansl updated HBASE-9807: - Attachment: 9807-0.94-v2.txt Simplified patch. This is only needed in AbstractScannerV2 hierarchy. > scanning with block encoding unnecessarily copies the key for each reseek > - > > Key: HBASE-9807 > URL: https://issues.apache.org/jira/browse/HBASE-9807 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl > Attachments: 9807-0.94.txt, 9807-0.94-v2.txt > > > In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this: > {code} > ByteBuffer bb = getKey(); > compared = reader.getComparator().compare(key, offset, > length, bb.array(), bb.arrayOffset(), bb.limit()); > {code} > {{getKey()}} creates to ByteBuffers in ScannerV2 and makes a deep copy of the > key in EncodedScannerV2. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (HBASE-9807) scanning with block encoding unnecessarily copies the key for each reseek
[ https://issues.apache.org/jira/browse/HBASE-9807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Hofhansl updated HBASE-9807: - Description: In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this: {code} ByteBuffer bb = getKey(); compared = reader.getComparator().compare(key, offset, length, bb.array(), bb.arrayOffset(), bb.limit()); {code} {{getKey()}} creates to ByteBuffers in ScannerV2 and makes a deep copy of the key in EncodedScannerV2. > scanning with block encoding unnecessarily copies the key for each reseek > - > > Key: HBASE-9807 > URL: https://issues.apache.org/jira/browse/HBASE-9807 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl > Attachments: 9807-0.94.txt > > > In HFileReaderV2.AbstractScannerV2.reseekTo(...) we have this: > {code} > ByteBuffer bb = getKey(); > compared = reader.getComparator().compare(key, offset, > length, bb.array(), bb.arrayOffset(), bb.limit()); > {code} > {{getKey()}} creates to ByteBuffers in ScannerV2 and makes a deep copy of the > key in EncodedScannerV2. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (HBASE-9807) scanning with block encoding unnecessarily copies the key for each reseek
[ https://issues.apache.org/jira/browse/HBASE-9807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Hofhansl updated HBASE-9807: - Attachment: 9807-0.94.txt Proposed patch. Pushes the compare into the scanner/seeker. * in ScannerV2 that removes creation of the two ByteBuffer objects per reseek. No real performance gain from that. * in EncodedScannerV2 this avoid copying the entire key, just to compare it. For 8 byte row keys and 10 bytes values this lead to a 10% performance gain in scanning. > scanning with block encoding unnecessarily copies the key for each reseek > - > > Key: HBASE-9807 > URL: https://issues.apache.org/jira/browse/HBASE-9807 > Project: HBase > Issue Type: Bug >Reporter: Lars Hofhansl > Attachments: 9807-0.94.txt > > -- This message was sent by Atlassian JIRA (v6.1#6144)