org.apache.cassandra.tools
Class SSTableImport
java.lang.Object
org.apache.cassandra.tools.SSTableImport
public class SSTableImport
- extends java.lang.Object
Create SSTables from JSON input
|
Method Summary |
static void |
importJson(java.lang.String jsonFile,
java.lang.String keyspace,
java.lang.String cf,
java.lang.String ssTablePath)
Convert a JSON formatted file to an SSTable. |
static void |
main(java.lang.String[] args)
Converts JSON to an SSTable file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SSTableImport
public SSTableImport()
importJson
public static void importJson(java.lang.String jsonFile,
java.lang.String keyspace,
java.lang.String cf,
java.lang.String ssTablePath)
throws java.io.IOException,
org.json.simple.parser.ParseException
- Convert a JSON formatted file to an SSTable.
- Parameters:
jsonFile - the file containing JSON formatted datakeyspace - keyspace the data belongs tocf - column family the data belongs tossTablePath - file to write the SSTable to
- Throws:
java.io.IOException - for errors reading/writing input/output
org.json.simple.parser.ParseException - for errors encountered parsing JSON input
main
public static void main(java.lang.String[] args)
throws java.io.IOException,
org.json.simple.parser.ParseException
- Converts JSON to an SSTable file. JSON input can either be a file specified
using an optional command line argument, or supplied on standard in.
- Parameters:
args - command line arguments
- Throws:
java.io.IOException - on failure to open/read/write files or output streams
org.json.simple.parser.ParseException - on failure to parse JSON input
Copyright © 2010 The Apache Software Foundation