HBase
  1. HBase
  2. HBASE-7320 Remove KeyValue.getBuffer()
  3. HBASE-10680

Check if the block keys, index keys can be used as Cells instead of byte[]

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Later
    • Affects Version/s: 0.99.0
    • Fix Version/s: 0.99.0
    • Component/s: None
    • Labels:
      None

      Description

      While doing HBASE-10531 we can observe that most of the comparison happens between the key part of the KVs. If suppose we need to make use of Cells and get rid of Kv.getBuffer() then the Keys with which the comparison are done like the block keys, index keys etc should also be changed to Cells and internally do the comparison as cell. This issue would help to brain storm this and implement the feasible soln.

        Activity

        Hide
        stack added a comment -

        ramkrishna.s.vasudevan Give me an example so I can follow what you are thinking boss. Which block keys (BlockCacheKey doesn't have a KV)? Thanks.

        Show
        stack added a comment - ramkrishna.s.vasudevan Give me an example so I can follow what you are thinking boss. Which block keys (BlockCacheKey doesn't have a KV)? Thanks.
        Hide
        Anoop Sam John added a comment -

        I believe he refers to keys in the index blocks (root level, interemediate level etc).
        On reads, we have cells (now Cell) to which we have to seek or reseek to. Based on these cell keys (rk + cf + q + ts) we have find the data block and load that block.

        We can make out the keys from the Cell , coming in to the seek/reseek etc and pass that to this BlockIndexReader for loading the data block.

        Show
        Anoop Sam John added a comment - I believe he refers to keys in the index blocks (root level, interemediate level etc). On reads, we have cells (now Cell) to which we have to seek or reseek to. Based on these cell keys (rk + cf + q + ts) we have find the data block and load that block. We can make out the keys from the Cell , coming in to the seek/reseek etc and pass that to this BlockIndexReader for loading the data block.
        Hide
        ramkrishna.s.vasudevan added a comment -

        This was just to see if every where we could store as Cells and this means even in the write path. Currently from KV we extract out the key part and was storing it as a key byte[]. The key byte[] i mean the root level, intermediate keys etc.
        So for direct comparison with a cell and it's key part we had to extract the key portion from the Cell and then do the compare (that is where the KeyOnlyKeyValue) was introduced. I think for doing this we may have to change the write path also which I think is not easily doable without changing the format of the Hfile layouts. Can defer this for now and reopen when needed.

        Show
        ramkrishna.s.vasudevan added a comment - This was just to see if every where we could store as Cells and this means even in the write path. Currently from KV we extract out the key part and was storing it as a key byte[]. The key byte[] i mean the root level, intermediate keys etc. So for direct comparison with a cell and it's key part we had to extract the key portion from the Cell and then do the compare (that is where the KeyOnlyKeyValue) was introduced. I think for doing this we may have to change the write path also which I think is not easily doable without changing the format of the Hfile layouts. Can defer this for now and reopen when needed.
        Hide
        stack added a comment -

        Do we have to change the hfile layout? If key is byte [] and we mark the file with the Comparator to use, it seems like hfile should be KeyValue/Cell agnostic?

        Show
        stack added a comment - Do we have to change the hfile layout? If key is byte [] and we mark the file with the Comparator to use, it seems like hfile should be KeyValue/Cell agnostic?
        Hide
        Enis Soztutar added a comment -

        Closing this issue after 0.99.0 release.

        Show
        Enis Soztutar added a comment - Closing this issue after 0.99.0 release.

          People

          • Assignee:
            ramkrishna.s.vasudevan
            Reporter:
            ramkrishna.s.vasudevan
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development