[
https://issues.apache.org/jira/browse/ACCUMULO-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490924#comment-13490924
]
Billie Rinaldi commented on ACCUMULO-776:
-----------------------------------------
I guess the question is whether the following procedure returns the same
timestamp on all systems regardless of timezone. Before the patch, the tablet
server would have executed this code, and after the patch the client executes
this code.
{code:java}
SimpleDateFormat dateParser = new SimpleDateFormat("yyyyMMddHHmmssz");
dateParser.setTimeZone(TimeZone.getTimeZone("GMT"));
long timestamp = dateParser.parse(dateString).getTime();
{code}
This date format requires the timezone to be set explicitly, e.g.
"19990101000000GMT".
The TimestampFilter static set methods have units tests that passed before and
after the patch. I added the test that Marcio suggested, and it works only
after the patch is applied.
> TimestampFilter should serialize start and end as longs in the IteratorSetting
> ------------------------------------------------------------------------------
>
> Key: ACCUMULO-776
> URL: https://issues.apache.org/jira/browse/ACCUMULO-776
> Project: Accumulo
> Issue Type: Bug
> Reporter: Marcio Silva
> Assignee: Billie Rinaldi
> Priority: Minor
> Attachments: ACCUMULO-776.patch
>
>
> Although the TimestampFilter supports using longs to set the start or end
> timestamp, it formats them as strings using SimpleDateFormat when storing or
> retrieving them in the IteratorSetting.
> This results in exceptions when the timestamps being used aren't able to be
> formatted as _yyyyMMddHHmmssz_. For example, try
> {{setEnd(253402300800001,true)}}
> Instead, {{setStart()}} and {{setEnd()}} could just as easily use
> {{String.valueOf(long i)}} to store the values, and {{init()}} could retrieve
> them using {{Long.valueOf(String s)}}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira