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

Revert to IOException in TimeRange constructor to maintain API compat in 1.x line

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.0, 1.3.0
    • 1.2.0, 1.3.0
    • Client
    • None
    • Reviewed

    Description

      From the 1.2 rc3 conversation:

      busbey

      • TimeRange's constructor with a min/max came in HBASE-14355. The
        constructor changed from IOException in the case of min > max to
        IllegalArgumentException. That's probably a more accurate exception,
        but it's a substantial source compat and behavior change for
        downstream. I've flagged the issue as incompatible and asked for a
        release note. For some reason the javadocs for TimeRange claim it's
        "for internal use only" so maybe it shouldn't have been IA.Public in
        the first place.

      Jon:

      A user could trigger the TimeRange constructed exception change by with the Get#setTimeRange/Scan#setTimeRange/Increment#setTimeRange apis. The signature in these classes don't change. (master [1], branch-1.2[2], tag 1.1.3[3])

      Doing a little digging, it is worth noting that no public APIs take time range as an argument (HRegion, TimeRangeTracker do but they are private), however a few public metrics return it (Get, Scan, Increment). The comment also basically says don't use the constructor.

      [1]https://github.com/apache/hbase/blob/master/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java#L205
      [2]https://github.com/apache/hbase/blob/branch-1.2/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java#L195
      [3] https://github.com/apache/hbase/blob/rel/1.1.3/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java#L191

      Attachments

        1. hbase-15283.v2.branch-1.patch
          4 kB
          Jonathan Hsieh
        2. hbase-15283.branch-1.patch
          2 kB
          Jonathan Hsieh

        Issue Links

          Activity

            People

              jmhsieh Jonathan Hsieh
              jmhsieh Jonathan Hsieh
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: