cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Boule (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-5870) CQLSH not showing milliseconds in timestamps
Date Mon, 12 Aug 2013 18:32:48 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-5870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13737181#comment-13737181
] 

Ben Boule commented on CASSANDRA-5870:
--------------------------------------

I've tried using the time_format setting in .cqlshrc to get around this.   It does not appear
to work as using %f (microseconds) does not appear to work until very recent versions of python.

If %f can't be used, COPY FROM is broken anyway, as it means that copying the data changes
the data.  If the data was subsequently imported back into cassandra and the column family
had a timestamp as part of the primary key, it could cause collisions in the reimported data,
erasing rows.

Is there some hidden time_format identifier that will cause CQLSH to format times as milliseconds
since the epoch, etc.. ?? That would be a useful workaround.

                
> CQLSH not showing milliseconds in timestamps
> --------------------------------------------
>
>                 Key: CASSANDRA-5870
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5870
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: Linux
>            Reporter: Ben Boule
>            Priority: Minor
>             Fix For: 1.2.5
>
>
> CQLSH does not include the milliseconds portion of the timestamp when outputting query
results.  For example on my system a time might be displayed like this:
> "2013-08-09 10:55:58-0400" for a time stored in cassandra as: 1376060158267
> We've found this extremely annoying when dealing with time series data as it will make
records which occurred at different times appear to occur at the same time.
> I'm submitting a patch, the existing formatting code already has handling of some versions
of python which do not support formatting time zones, I'm not sure which versions of python
can format seconds+milliseconds so I attempted to supply something which will work with any
time_format string and does not depend on the system library.
> The above time with the patch will format like this:
> "2013-08-09 10:55:58.267-0400"

--
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

Mime
View raw message