Apache Cassandra™ 2.0

The json2sstable utility

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

Note: Starting with version 0.7, json2sstable and sstable2json must be run so that the schema can be loaded from system tables. This means that the cassandra.yaml file must be in the classpath and refer to valid storage directories. For more information, see the Import/Export section of http://wiki.apache.org/cassandra/Operations.

Procedure

Usage:
bin/json2sstable -K KEYSPACE -c COLUMN_FAMILY 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.

Show/hide