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

TimeRange's factory functions do not support ranges, only `allTime` and `at`

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      Add serveral API in TimeRange class for avoiding using the deprecated TimeRange constructor:
      * TimeRange#from: Represents the time interval [minStamp, Long.MAX_VALUE)
      * TimeRange#until: Represents the time interval [0, maxStamp)
      * TimeRange#between: Represents the time interval [minStamp, maxStamp)
      Show
      Add serveral API in TimeRange class for avoiding using the deprecated TimeRange constructor: * TimeRange#from: Represents the time interval [minStamp, Long.MAX_VALUE) * TimeRange#until: Represents the time interval [0, maxStamp) * TimeRange#between: Represents the time interval [minStamp, maxStamp)

      Description

      The org.apache.hadoop.hbase.io.TimeRange is used in functions like org.apache.hadoop.hbase.client.Table.CheckAndMutateBuilder#timeRange.

      The current ways to create a TimeRange are:

      • factory functions: at (a single instant), allTime (all valid timestamps)
      • deprecated and @InterfaceAudience.Private constructors, which support more ranges, like [minStamp, maxStamp), and [minStamp, MAX)

      This is insufficient for all but the simplest use of the CheckAndMutateBuilder#timeRange function.

      On user@hbase.apache.org, it was suggested that more factory functions could be added: https://lists.apache.org/thread.html/0ffc5e57c396873d56e49d7b02e823432b053fb98037ee6778d7c2ce@%3Cuser.hbase.apache.org%3E

      However, TimeRange's documentation currently says:

       * Can be returned and read by clients.  Should not be directly created by clients.
       * Thus, all constructors are purposely @InterfaceAudience.Private.
      

      so another approach to making CheckAndMutateBuilder#timeRange useful may be required.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              huonw Huon Wilson
              Reporter:
              huonw Huon Wilson

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment