Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5188

IndexedKeyValue should populate KeyValue fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0.0, 4.14.1
    • 4.15.0, 5.1.0, 4.14.2, 5.0.1
    • None
    • None

    Description

      IndexedKeyValue subclasses the HBase KeyValue class, which has three primary fields: bytes, offset, and length. These fields aren't populated by IndexedKeyValue because it's concerned with index mutations, and has its own fields that its own methods use.

      However, KeyValue and its Cell interface have quite a few methods that assume these fields are populated, and the HBase-level factory methods generally ensure they're populated. Phoenix code should do the same, to maintain the polymorphic contract. This is important in cases like custom ReplicationEndpoints where HBase-level code may be iterating over WALEdits that contain both KeyValues and IndexKeyValues and may need to interrogate their contents.

      Since the index mutation has a row key, this is straightforward.

      Attachments

        1. PHOENIX-5188.patch
          6 kB
          Geoffrey Jacoby
        2. PHOENIX-5188-4.x-HBase-1.4..addendum.patch
          3 kB
          Xu Cang
        3. PHOENIX-5188-4.x-HBase-1.4.patch
          6 kB
          Geoffrey Jacoby

        Issue Links

          Activity

            People

              gjacoby Geoffrey Jacoby
              gjacoby Geoffrey Jacoby
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: