apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amberarrow <...@git.apache.org>
Subject [GitHub] incubator-apex-malhar pull request: APEXMALHAR-1897 added managed ...
Date Sat, 19 Mar 2016 15:25:11 GMT
Github user amberarrow commented on a diff in the pull request:

    --- Diff: library/src/main/java/com/datatorrent/lib/state/BucketedState.java ---
    @@ -29,11 +31,17 @@
     public interface BucketedState
    +   * An expired value. In some implementations where bucketId is time related then the
event can be old and
    +   * the get methods- getSync & getAsync return this special slice instance.
    +   */
    +  Slice EXPIRED = new Slice(Ints.toByteArray(-1));
    --- End diff --
    Couldn't -1 be a valid user value ?
    Might be better to use invalid slices, e.g. Slice(null, -1, -1). Or, if you want to be
more user friendly, extend Slice and add an isExpired() method which checks offset and length
against -1.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message