Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-5455

Add test to avoid unintentional reordering of items in HbaseObjectWritable

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.94.0
    • None
    • None
    • Reviewed

    Description

      HbaseObjectWritable has a static initialization block that assigns ints to various classes. The int is assigned by using a local variable that is incremented after each use. If someone adds a line in the middle of the block, this throws off everything after the change, and can break client compatibility. There is already a comment to not add/remove lines at the beginning of this block. It might make sense to have a test against a static set of ids. If something gets changed unintentionally, it would at least fail the tests. If the change was intentional, at the very least the test would need to get updated, and it would be a conscious decision.

      https://issues.apache.org/jira/browse/HBASE-5204 contains the the fix for one issue of this type.

      Attachments

        1. HBASE-5455.diff
          13 kB
          Michael Drzal

        Activity

          People

            mdrzal Michael Drzal
            mdrzal Michael Drzal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: