hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Rodionov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-9769) Improve performance of a Scanner with explicit column list when rows are small/medium size
Date Wed, 23 Oct 2013 19:17:49 GMT

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

Vladimir Rodionov commented on HBASE-9769:

I just checked trunk AbstractScannerV2. The code of HBase-5987 is there:
    public int reseekTo(byte[] key, int offset, int length) throws IOException {
      int compared;
      if (isSeeked()) {
        ByteBuffer bb = getKey();
        compared = reader.getComparator().compare(key, offset,
            length, bb.array(), bb.arrayOffset(), bb.limit());
        if (compared < 1) {
          // If the required key is less than or equal to current key, then
          // don't do anything.
          return compared;
        } else {
          if (this.nextIndexedKey != null &&
              (this.nextIndexedKey == HConstants.NO_NEXT_INDEXED_KEY ||
               reader.getComparator().compare(key, offset, length,
                   nextIndexedKey, 0, nextIndexedKey.length) < 0)) {
            // The reader shall continue to scan the current data block instead of querying
            // block index as long as it knows the target key is strictly smaller than
            // the next indexed key or the current data block is the last data block.
            return loadBlockAndSeekToKey(this.block, this.nextIndexedKey,
                false, key, offset, length, false);
      // Don't rewind on a reseek operation, because reseek implies that we are
      // always going forward in the file.
      return seekTo(key, offset, length, false);

but it seems that *nextIndexedKey* is never initialized properly. I did not manage to find
the place where the next block first key is assigned to this variable. 

> Improve performance of a Scanner with explicit column list when rows are small/medium
> ------------------------------------------------------------------------------------------
>                 Key: HBASE-9769
>                 URL: https://issues.apache.org/jira/browse/HBASE-9769
>             Project: HBase
>          Issue Type: Improvement
>          Components: Scanners
>    Affects Versions: 0.98.0, 0.94.12, 0.96.0
>            Reporter: Vladimir Rodionov
>            Assignee: Vladimir Rodionov
>         Attachments: 9769-0.94-sample1.txt, 9769-0.94-sample2.txt, 9769-0.94-sample.txt,
9769-94.txt, 9769-94-v2.txt, 9769-trunk-v1.txt, 9769-trunk-v2.txt, 9769-trunk-v3.txt, 9769-trunk-v4.txt

This message was sent by Atlassian JIRA

View raw message