org.apache.cassandra.io.sstable

## Class SSTableSimpleUnsortedWriter

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

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

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

    @Deprecated
    public class SSTableSimpleUnsortedWriter
    extends AbstractSSTableSimpleWriter

A SSTable writer that doesn't assume rows are in sorted order. This writer buffers rows in memory and then write them all in sorted order. To avoid loading the entire data set in memory, the amount of rows buffered is configurable. Each time the threshold is met, one SSTable will be created (and the buffer be reseted).

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
`SSTableSimpleUnsortedWriter(java.io.File directory, CFMetaData metadata, IPartitioner partitioner, long bufferSizeInMB)` Deprecated.
`SSTableSimpleUnsortedWriter(java.io.File directory, IPartitioner partitioner, java.lang.String keyspace, java.lang.String columnFamily, AbstractType<?> comparator, AbstractType<?> subComparator, int bufferSizeInMB)` Deprecated.
`SSTableSimpleUnsortedWriter(java.io.File directory, IPartitioner partitioner, java.lang.String keyspace, java.lang.String columnFamily, AbstractType<?> comparator, AbstractType<?> subComparator, int bufferSizeInMB, CompressionParameters compressParameters)` Deprecated. Create a new buffering writer.

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`protected void` `addColumn(Cell cell)` Deprecated.
`void` `close()` Deprecated.
`protected void` `countColumn(Cell cell)` Deprecated.
`protected ColumnFamily` `createColumnFamily()` Deprecated.
`protected ColumnFamily` `getColumnFamily()` Deprecated.
`Descriptor` `getCurrentDescriptor()` Deprecated.
`protected void` `replaceColumnFamily()` Deprecated.
`protected void` `sync()` Deprecated.
`protected void` `writeRow(DecoratedKey key, ColumnFamily columnFamily)` Deprecated.

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

`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

#### SSTableSimpleUnsortedWriter

    public SSTableSimpleUnsortedWriter(java.io.File directory,
                                       IPartitioner partitioner,
                                       java.lang.String keyspace,
                                       java.lang.String columnFamily,
                                       AbstractType<?> comparator,
                                       AbstractType<?> subComparator,
                                       int bufferSizeInMB,
                                       CompressionParameters compressParameters)

Deprecated.
Create a new buffering writer.

Parameters:
  `directory` - the directory where to write the sstables
  `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.
  `bufferSizeInMB` - the data size in MB before which a sstable is written and the buffer reseted. This correspond roughly to the written data size (i.e. the size of the create sstable). The actual size used in memory will be higher (by how much depends on the size of the columns you add). For 1GB of heap, a 128 bufferSizeInMB is probably a reasonable choice. If you experience OOM, this value should be lowered.

#### SSTableSimpleUnsortedWriter

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

Deprecated.

#### SSTableSimpleUnsortedWriter

    public SSTableSimpleUnsortedWriter(java.io.File directory,
                                       CFMetaData metadata,
                                       IPartitioner partitioner,
                                       long bufferSizeInMB)

Deprecated.

### Method Detail

#### writeRow

    protected void writeRow(DecoratedKey key,
                            ColumnFamily columnFamily)
                     throws java.io.IOException

Deprecated.

Specified by:
  `writeRow` in class `AbstractSSTableSimpleWriter`
Throws:
  `java.io.IOException`

#### addColumn

    protected void addColumn(Cell cell)
                      throws java.io.IOException

Deprecated.

Overrides:
  `addColumn` in class `AbstractSSTableSimpleWriter`
Throws:
  `java.io.IOException`

#### countColumn

    protected void countColumn(Cell cell)
                        throws java.io.IOException

Deprecated.

Throws:
  `java.io.IOException`

#### getColumnFamily

    protected ColumnFamily getColumnFamily()

Deprecated.

Specified by:
  `getColumnFamily` in class `AbstractSSTableSimpleWriter`

#### getCurrentDescriptor

    public Descriptor getCurrentDescriptor()

Deprecated.

Specified by:
  `getCurrentDescriptor` in class `AbstractSSTableSimpleWriter`

#### createColumnFamily

    protected ColumnFamily createColumnFamily()

Deprecated.

#### close

    public void close()
               throws java.io.IOException

Deprecated.

Throws:
  `java.io.IOException`

#### replaceColumnFamily

    protected void replaceColumnFamily()
                                throws java.io.IOException

Deprecated.

Throws:
  `java.io.IOException`

#### sync

    protected void sync()
                 throws java.io.IOException

Deprecated.

Throws:
  `java.io.IOException`