org.apache.cassandra.tools

## Class SSTableExport

- java.lang.Object
- - org.apache.cassandra.tools.SSTableExport

    public class SSTableExport
    extends java.lang.Object

Export SSTables to JSON format.

### Constructor Summary

Constructors
Constructor and Description
`SSTableExport()`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `enumeratekeys(Descriptor desc, java.io.PrintStream outs, CFMetaData metadata)` Enumerate row keys from an SSTableReader and write the result to a PrintStream.
`static void` `export(Descriptor desc, java.io.PrintStream outs, java.util.Collection<java.lang.String> toExport, java.lang.String[] excludes, CFMetaData metadata)` Export specific rows from an SSTable and write the resulting JSON to a PrintStream.
`static void` `export(Descriptor desc, java.io.PrintStream outs, java.lang.String[] excludes)` Export an SSTable and write the resulting JSON to a PrintStream.
`static void` `export(Descriptor desc, java.lang.String[] excludes)` Export an SSTable and write the resulting JSON to standard out.
`static void` `main(java.lang.String[] args)` Given arguments specifying an SSTable, and optionally an output file, export the contents of the SSTable to JSON.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SSTableExport

    public SSTableExport()

### Method Detail

#### enumeratekeys

    public static void enumeratekeys(Descriptor desc,
                                     java.io.PrintStream outs,
                                     CFMetaData metadata)
                              throws java.io.IOException

Enumerate row keys from an SSTableReader and write the result to a PrintStream.

Parameters:
  `desc` - the descriptor of the file to export the rows from
  `outs` - PrintStream to write the output to
  `metadata` - Metadata to print keys in a proper format
Throws:
  `java.io.IOException` - on failure to read/write input/output

#### export

    public static void export(Descriptor desc,
                              java.io.PrintStream outs,
                              java.util.Collection<java.lang.String> toExport,
                              java.lang.String[] excludes,
                              CFMetaData metadata)
                       throws java.io.IOException

Export specific rows from an SSTable and write the resulting JSON to a PrintStream.

Parameters:
  `desc` - the descriptor of the sstable to read from
  `outs` - PrintStream to write the output to
  `toExport` - the keys corresponding to the rows to export
  `excludes` - keys to exclude from export
  `metadata` - Metadata to print keys in a proper format
Throws:
  `java.io.IOException` - on failure to read/write input/output

#### export

    public static void export(Descriptor desc,
                              java.io.PrintStream outs,
                              java.lang.String[] excludes)
                       throws java.io.IOException

Export an SSTable and write the resulting JSON to a PrintStream.

Parameters:
  `desc` - the descriptor of the sstable to read from
  `outs` - PrintStream to write the output to
  `excludes` - keys to exclude from export
Throws:
  `java.io.IOException` - on failure to read/write input/output

#### export

    public static void export(Descriptor desc,
                              java.lang.String[] excludes)
                       throws java.io.IOException

Export an SSTable and write the resulting JSON to standard out.

Parameters:
  `desc` - the descriptor of the sstable to read from
  `excludes` - keys to exclude from export
Throws:
  `java.io.IOException` - on failure to read/write SSTable/standard out

#### main

    public static void main(java.lang.String[] args)
                     throws ConfigurationException

Given arguments specifying an SSTable, and optionally an output file, export the contents of the SSTable to JSON.

Parameters:
  `args` - command lines arguments
Throws:
  `ConfigurationException` - on configuration failure (wrong params given)