[
https://issues.apache.org/jira/browse/CASSANDRA-7464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Lohfink updated CASSANDRA-7464:
-------------------------------------
Attachment: sstable-only.patch
Attached a patch with sstable2json in it, wanted to have the format Ok'd before
writing the json2sstable. A couple examples:
With collections
{code}
[
{
"partition" : {
"key" : [ "testp" ]
},
"rows" : [
{
"type" : "row",
"cells" : [
{ "name" : "value", "path" : [ "edaaa91f-3f39-11d8-a6f2-610b3d095683"
], "value" : "v3", "tstamp" : 1451330095948598 },
{ "name" : "value", "path" : [ "47b48cf0-ad97-11e5-a6f2-610b3d095683"
], "value" : "v1", "tstamp" : 1451330095928401 },
{ "name" : "value", "path" : [ "47b48cf1-ad97-11e5-a6f2-610b3d095683"
], "value" : "v2", "tstamp" : 1451330095928401 }
]
}
]
}
]
{code}
with composite partition key/clustering key.
{code}
[
{
"partition" : {
"key" : [ "e", "f" ]
},
"rows" : [
{
"type" : "row",
"clustering" : [ "g", "h" ],
"liveness_info" : { "tstamp" : 1451330118497426 },
"cells" : [
{ "name" : "value", "value" : "2" }
]
}
]
},
{
"partition" : {
"key" : [ "a", "b" ]
},
"rows" : [
{
"type" : "row",
"clustering" : [ "c", "d" ],
"liveness_info" : { "tstamp" : 1451330118479576 },
"cells" : [
{ "name" : "value", "value" : "1" }
]
}
]
}
]
{code}
> Replace sstable2json and json2sstable
> -------------------------------------
>
> Key: CASSANDRA-7464
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7464
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Sylvain Lebresne
> Assignee: Chris Lohfink
> Priority: Minor
> Fix For: 3.x
>
> Attachments: sstable-only.patch
>
>
> Both tools are pretty awful. They are primarily meant for debugging (there is
> much more efficient and convenient ways to do import/export data), but their
> output manage to be hard to handle both for humans and for tools (especially
> as soon as you have modern stuff like composites).
> There is value to having tools to export sstable contents into a format that
> is easy to manipulate by human and tools for debugging, small hacks and
> general tinkering, but sstable2json and json2sstable are not that.
> So I propose that we deprecate those tools and consider writing better
> replacements. It shouldn't be too hard to come up with an output format that
> is more aware of modern concepts like composites, UDTs, ....
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)