You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Lele Gaifax <le...@metapensiero.it> on 2012/03/01 19:00:06 UTC
sstable2json timestamp format
Hi all,
I'm rethinking the layout of my data (currently served by cassandra
0.8.x thru pycassa 1.1, but reasonably I'm gonna use cassandra 1.x with
pycassa 1.4).
My current data contains a few columns storing timestamps: given that at
the time there was no native pycassa support I used an ISO 8601 string
representation for such values. Recently pycassa implemented native
datetime support which I'd like to take advantage of.
Given that I need to change this kind of details, I spent some time
trying to understand if sstable2json can be the right tool for the
migration before going to write my own: the idea is to export my current
data in JSON, hacking it as needed and then reimport it into a new 1.x
cluster...
One of the first tweaks will be transforming my existing timestamps
format into their JSON equivalent and so I did a simple test, inserting
a few timestamps in a column family, and then trying to export it with
sstable2json, but what I got confused me; for example, given that with
pycassaShell I see a value like
('changed', datetime.datetime(2012, 3, 1, 11, 17, 5, 581306))
sstable2json (as of cassandra 1.0.8) exports it as
["changed","44134-12-10 13:53:01+0100",1330597025582986]
What am I missing?
Thanks in advance for any hint,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it | -- Fortunato Depero, 1929.
Re: sstable2json timestamp format
Posted by Lele Gaifax <le...@metapensiero.it>.
It turns out to be a pycassa 1.5.0 issue, solved by the just released
1.5.1:
https://github.com/pycassa/pycassa/blob/681905ce1037a130d8fed37ea9bd41e2a4fe8bbd/CHANGES
Sorry for the noise.
Thank you Tyler!
bye, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it | -- Fortunato Depero, 1929.