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

### Constructor Summary

Constructors
Constructor and Description
`SSTableImport()`
`SSTableImport(boolean isSorted)`
`SSTableImport(java.lang.Integer keyCountToImport, boolean isSorted)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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 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:
  `org.apache.commons.cli.ParseException` - on failure to parse JSON input
  `ConfigurationException` - on configuration error.