json2sstable

Converts a JSON representation of a table (aka column family) to a Cassandra usable SSTable format.

Warning: Please note that json2sstable is now deprecated and will be removed in Cassandra 3.0. You should use CQLSSTableWriter if you want to write sstables directly. Please see https://issues.apache.org/jira/browse/CASSANDRA-9618 for details.

Converts a JSON representation of a table (aka column family) to a Cassandra usable SSTable format.

DANGER: This tool is not recommended as a production tool and is not suitable for production operations!

Procedure

Usage:
bin/json2sstable [-s] -K KEYSPACE <keyspace> -c <table> [-n num_keys] <json> <sstable>  
<json> should be a path to the JSON file. <sstable> should be a full path to a {table-name}-Data.db file in Cassandra’s data directory. For example, /var/lib/cassandra/data/Keyspace1/Standard1-e-1-Data.db.
  • -s assumes the JSON file is already sorted and was created by the sstable2json tool.
  • -n specifies the number of keys to import.