You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by Christopher <ct...@apache.org> on 2014/12/05 23:34:30 UTC

[NOTICE] Known Issue with DateLexicoder (ACCUMULO-3385)

All-

If you've been using the new DateLexicoder in 1.6, please be aware of this
issue: https://issues.apache.org/jira/browse/ACCUMULO-3385

In essence, the DateLexicoder serializes dates incorrectly, which causes
dates before 1970 to sort after all other dates. If you've been using the
DateLexicoder, please be aware of the issue.

You should avoid using this Lexicoder until 1.6.2 and instead use the
LongLexicoder.encode(Date.getTime()) and new
Date(LongLexicoder.decode(bytes)) if you want to get the correct sort
behavior.

If, instead, you'd prefer to keep the same (buggy) behavior, you'll want to
do the same, but with the ULongLexicoder instead. (You may wish for this
option if you've written lots of data which would be cumbersome to re-write
or you have some dependency on the buggy behavior.)

--
Christopher L Tubbs II
http://gravatar.com/ctubbsii

Re: [NOTICE] Known Issue with DateLexicoder (ACCUMULO-3385)

Posted by Russ Weeks <rw...@newbrightidea.com>.
Thanks for the heads-up, Christopher.

-Russ

On Fri, Dec 5, 2014 at 2:34 PM, Christopher <ct...@apache.org> wrote:

> All-
>
> If you've been using the new DateLexicoder in 1.6, please be aware of this
> issue: https://issues.apache.org/jira/browse/ACCUMULO-3385
>
> In essence, the DateLexicoder serializes dates incorrectly, which causes
> dates before 1970 to sort after all other dates. If you've been using the
> DateLexicoder, please be aware of the issue.
>
> You should avoid using this Lexicoder until 1.6.2 and instead use the
> LongLexicoder.encode(Date.getTime()) and new
> Date(LongLexicoder.decode(bytes)) if you want to get the correct sort
> behavior.
>
> If, instead, you'd prefer to keep the same (buggy) behavior, you'll want
> to do the same, but with the ULongLexicoder instead. (You may wish for this
> option if you've written lots of data which would be cumbersome to re-write
> or you have some dependency on the buggy behavior.)
>
> --
> Christopher L Tubbs II
> http://gravatar.com/ctubbsii
>