cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Barala (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-13694) sstabledump does not show full precision of timestamp columns
Date Thu, 20 Jul 2017 08:48:00 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-13694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Varun Barala updated CASSANDRA-13694:
-------------------------------------
    Attachment: CASSANDRA-13694-after-review.patch

> sstabledump does not show full precision of timestamp columns
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-13694
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13694
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: Ubuntu 16.04 LTS
>            Reporter: Tim Reeves
>              Labels: patch-available
>             Fix For: 3.7
>
>         Attachments: CASSANDRA-13694-after-review.patch, CASSANDRA-13694.patch
>
>
> Create a table:
> CREATE TABLE test_table (
>     unit_no bigint,
>     event_code text,
>     active_time timestamp,
>     ack_time timestamp,
>     PRIMARY KEY ((unit_no, event_code), active_time)
> ) WITH CLUSTERING ORDER BY (active_time DESC)
> Insert a row:
> INSERT INTO test_table (unit_no, event_code, active_time, ack_time)
>                   VALUES (1234, 'TEST EVENT', toTimestamp(now()), toTimestamp(now()));
> Verify that it is in the database with a full timestamp:
> cqlsh:pentaho> select * from test_table;
>  unit_no | event_code | active_time                     | ack_time
> ---------+------------+---------------------------------+---------------------------------
>     1234 | TEST EVENT | 2017-07-14 14:52:39.919000+0000 | 2017-07-14 14:52:39.919000+0000
> (1 rows)
> Write file:
> nodetool flush
> nodetool compact pentaho
> Use sstabledump:
> treeves@ubuntu:~$ sstabledump /var/lib/cassandra/data/pentaho/test_table-99ba228068a311e7ac30953b79ac2c3e/mb-2-big-Data.db
> [
>   {
>     "partition" : {
>       "key" : [ "1234", "TEST EVENT" ],
>       "position" : 0
>     },
>     "rows" : [
>       {
>         "type" : "row",
>         "position" : 38,
>         "clustering" : [ "2017-07-14 15:52+0100" ],
>         "liveness_info" : { "tstamp" : "2017-07-14T14:52:39.888701Z" },
>         "cells" : [
>           { "name" : "ack_time", "value" : "2017-07-14 15:52+0100" }
>         ]
>       }
>     ]
>   }
> ]
> treeves@ubuntu:~$ 
> The timestamp in the cluster key, and the regular column, are both truncated to the minute.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message