hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoffrey Jacoby (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-14985) TimeRange constructors should set allTime when appropriate
Date Wed, 16 Dec 2015 00:40:46 GMT

     [ https://issues.apache.org/jira/browse/HBASE-14985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Geoffrey Jacoby updated HBASE-14985:
    Attachment: HBASE-14985.patch

> TimeRange constructors should set allTime when appropriate
> ----------------------------------------------------------
>                 Key: HBASE-14985
>                 URL: https://issues.apache.org/jira/browse/HBASE-14985
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 1.1.2,
>            Reporter: Geoffrey Jacoby
>            Assignee: Geoffrey Jacoby
>            Priority: Minor
>         Attachments: HBASE-14985.patch
> The default TimeRange constructor creates a range from 0 to Long.MAX_VALUE and sets an
allTime flag to true. This flag allows some performance optimizations when comparing or using
> This flag is not set, however, if you call "new TimeRange(0L)" or "new TimeRange(0L,
Long.MAX_VALUE)", even though both of these create a logically equivalent TimeRange to "new
TimeRange()". Since TimeRanges are immutable and detecting this condition is trivial, we should
set the flag automatically in the explicit constructors when appropriate. 

This message was sent by Atlassian JIRA

View raw message