cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7464) Replace sstable2json and json2sstable
Date Mon, 11 Jan 2016 14:58:40 GMT

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

Sylvain Lebresne commented on CASSANDRA-7464:
---------------------------------------------

bq. I don't see a point in creating an ad-hoc format along with json

If I'm just "debugging" a sstable (because, say, a user as a bug that I'm investigating),
i.e. I'm interested in checking the output manually, not processing it, then I personally
very much prefer something like:
{noformat}
["e", "f", "g", "h"](ts=1451330118497426) : [value=1](ts=1451330118497426), [other_col='foo']
["a", "b", "c", "d"](ts=1451330118479576) : [value=3], [other_col='bar'](ttl=3)
{noformat}
to
{noformat}
[
  {
    "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" }
        ]
      }
    ]
  }
]
{noformat}
And sure, that's probably only useful to devs and a few advanced and interested users, but
I think having easy to use tools for that population is also important (keeping in mind that
I don't pretend either that it's priority number one).


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

Mime
View raw message