org.apache.cassandra.io.sstable

## Class SSTableSimpleWriter

- java.lang.Object
- - org.apache.cassandra.io.sstable.AbstractSSTableSimpleWriter
  - - org.apache.cassandra.io.sstable.SSTableSimpleWriter

All Implemented Interfaces:
  java.io.Closeable, java.lang.AutoCloseable

Deprecated.
this class is depracted in favor of `CQLSSTableWriter`.

    @Deprecated
    public class SSTableSimpleWriter
    extends AbstractSSTableSimpleWriter

A SSTable writer that assumes rows are in (partitioner) sorted order. Contrarily to SSTableSimpleUnsortedWriter, this writer does not buffer anything into memory, however it assumes that row are added in sorted order (an exception will be thrown otherwise), which for the RandomPartitioner means that rows should be added by increasing md5 of the row key. This is rarely possible and SSTableSimpleUnsortedWriter should most of the time be prefered.

See Also:
  `AbstractSSTableSimpleWriter`

### Field Summary

### Fields inherited from class org.apache.cassandra.io.sstable.AbstractSSTableSimpleWriter

`columnFamily, counterid, currentKey, currentSuperColumn, directory, generation, metadata`

### Constructor Summary

Constructors
Constructor and Description
`SSTableSimpleWriter(java.io.File directory, CFMetaData metadata, IPartitioner partitioner)` Deprecated.
`SSTableSimpleWriter(java.io.File directory, IPartitioner partitioner, java.lang.String keyspace, java.lang.String columnFamily, AbstractType<?> comparator, AbstractType<?> subComparator)` Deprecated. Create a new writer.

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`void` `close()` Deprecated.
`protected ColumnFamily` `getColumnFamily()` Deprecated.
`Descriptor` `getCurrentDescriptor()` Deprecated.
`protected void` `writeRow(DecoratedKey key, ColumnFamily columnFamily)` Deprecated.

### Methods inherited from class org.apache.cassandra.io.sstable.AbstractSSTableSimpleWriter

`addColumn, addColumn, addCounterColumn, addExpiringColumn, createDescriptor, getWriter, newRow, newSuperColumn, setSSTableFormatType`

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

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

### Constructor Detail

#### SSTableSimpleWriter

    public SSTableSimpleWriter(java.io.File directory,
                               IPartitioner partitioner,
                               java.lang.String keyspace,
                               java.lang.String columnFamily,
                               AbstractType<?> comparator,
                               AbstractType<?> subComparator)

Deprecated.
Create a new writer.

Parameters:
  `directory` - the directory where to write the sstable
  `partitioner` - the partitioner
  `keyspace` - the keyspace name
  `columnFamily` - the column family name
  `comparator` - the column family comparator
  `subComparator` - the column family subComparator or null if not a Super column family.

#### SSTableSimpleWriter

    public SSTableSimpleWriter(java.io.File directory,
                               CFMetaData metadata,
                               IPartitioner partitioner)

Deprecated.

### Method Detail

#### close

    public void close()

Deprecated.

#### writeRow

    protected void writeRow(DecoratedKey key,
                            ColumnFamily columnFamily)

Deprecated.

Specified by:
  `writeRow` in class `AbstractSSTableSimpleWriter`

#### getColumnFamily

    protected ColumnFamily getColumnFamily()

Deprecated.

Specified by:
  `getColumnFamily` in class `AbstractSSTableSimpleWriter`

#### getCurrentDescriptor

    public Descriptor getCurrentDescriptor()

Deprecated.

Specified by:
  `getCurrentDescriptor` in class `AbstractSSTableSimpleWriter`