accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Turner (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-776) TimestampFilter should serialize start and end as longs in the IteratorSetting
Date Tue, 06 Nov 2012 02:54:12 GMT


Keith Turner commented on ACCUMULO-776:

bq.  I don't think anything is being changed in how things are being stored in ZK. 

No, I think your initial comments were correct.  The date encoded string will be stored in
zookeeper, not a long.   To be sure I ran a little test.


    IteratorSetting is = new IteratorSetting(21, TimestampFilter.class);
    TimestampFilter.setStart(is, System.currentTimeMillis(), false);
    TimestampFilter.setEnd(is, System.currentTimeMillis() + 10000, false);
    conn.tableOperations().attachIterator("foo", is);

    Iterable<Entry<String,String>> propsIter = conn.tableOperations().getProperties("foo");
    for (Entry<String,String> entry : propsIter) {
      if (entry.getKey().contains("Timestamp"))

This prints out the following :


I think if I had applied the patch, a long would be stored in ZK instead.
> TimestampFilter should serialize start and end as longs in the IteratorSetting
> ------------------------------------------------------------------------------
>                 Key: ACCUMULO-776
>                 URL:
>             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:

View raw message