org.apache.cassandra.tools
Class SSTableImport

java.lang.Object
  extended by org.apache.cassandra.tools.SSTableImport

public class SSTableImport
extends java.lang.Object

Create SSTables from JSON input


Constructor Summary
SSTableImport()
           
SSTableImport(boolean isSorted)
           
SSTableImport(java.lang.Integer keyCountToImport, boolean isSorted)
           
 
Method Summary
 int 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
 

Constructor Detail

SSTableImport

public SSTableImport()

SSTableImport

public SSTableImport(boolean isSorted)

SSTableImport

public SSTableImport(java.lang.Integer keyCountToImport,
                     boolean isSorted)
Method Detail

importJson

public int importJson(java.lang.String jsonFile,
                      java.lang.String keyspace,
                      java.lang.String cf,
                      java.lang.String ssTablePath)
               throws java.io.IOException
Convert a JSON formatted file to an SSTable.

Parameters:
jsonFile - the file containing JSON formatted data
keyspace - keyspace the data belongs to
cf - column family the data belongs to
ssTablePath - file to write the SSTable to
Throws:
java.io.IOException - for errors reading/writing input/output

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        org.apache.commons.cli.ParseException,
                        ConfigurationException
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.apache.commons.cli.ParseException - on failure to parse JSON input
ConfigurationException - on configuration error.


Copyright © 2013 The Apache Software Foundation