XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • Performance, Scanners
    • None
    • Reviewed

    Description

      for (int idx = 0; idx < remaining; idx++) {
        byte b = blockBuffer.getByteAfterPosition(offsetFromPos + idx);
        i = i << 8;
        i = i | (b & 0xFF);
      }
      

      Doing the read as in case of BIG_ENDIAN.
      After HBASE-12600, we tend to keep the mvcc and so byte by byte read looks eating up lot of CPU time. (In my test HFileReaderImpl#_readMvccVersion comes on top in terms of hot methods). We can optimize here by reading 4 or 2 bytes in one shot when the length of the vlong is more than 4 bytes. We will in turn use UnsafeAccess methods which handles ENDIAN.

      Attachments

        1. HBASE-14186.patch
          1 kB
          Anoop Sam John

        Activity

          People

            anoop.hbase Anoop Sam John
            anoop.hbase Anoop Sam John
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: