## org.apache.cassandra.io.sstable
Class SSTableWriter

    java.lang.Object
      org.apache.cassandra.io.sstable.SSTable
          org.apache.cassandra.io.sstable.SSTableWriter

    public class SSTableWriter

extends SSTable

Field Summary

Fields inherited from class org.apache.cassandra.io.sstable.SSTable
`COMPONENT_DATA, COMPONENT_DIGEST, COMPONENT_FILTER, COMPONENT_INDEX, COMPONENT_STATS, components, compression, descriptor, first, last, maxTimestampComparator, metadata, partitioner, sstableComparator, sstableOrdering, TEMPFILE_MARKER`

Constructor Summary
`SSTableWriter(java.lang.String filename, long keyCount)`
`SSTableWriter(java.lang.String filename, long keyCount, CFMetaData metadata, IPartitioner<?> partitioner, SSTableMetadata.Collector sstableMetadataCollector)`

Method Summary
`void` `abort()` After failure, attempt to close the index writer and data file before deleting all temp components for the sstable
`long` `append(AbstractCompactedRow row)`
`void` `append(DecoratedKey<?> decoratedKey, java.nio.ByteBuffer value)`
`void` `append(DecoratedKey<?> decoratedKey, ColumnFamily cf)`
`long` `appendFromStream(DecoratedKey<?> key, CFMetaData metadata, long dataSize, java.io.DataInput in)`
`SSTableReader` `closeAndOpenReader()`
`SSTableReader` `closeAndOpenReader(long maxDataAge)`
`long` `getFilePointer()`
`long` `getOnDiskFilePointer()`
`void` `mark()`
`void` `resetAndTruncate()`
`void` `updateMaxTimestamp(long timestamp)`

Methods inherited from class org.apache.cassandra.io.sstable.SSTable
`bytesOnDisk, delete, getColumnFamilyName, getFilename, getMinimalKey, getTableName, getTotalBytes, toString, tryComponentFromFilename`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SSTableWriter

    public SSTableWriter(java.lang.String filename,
                         long keyCount)
                  throws java.io.IOException

Throws:
  `java.io.IOException`

### SSTableWriter

    public SSTableWriter(java.lang.String filename,
                         long keyCount,
                         CFMetaData metadata,
                         IPartitioner<?> partitioner,
                         SSTableMetadata.Collector sstableMetadataCollector)
                  throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### mark

    public void mark()

### resetAndTruncate

    public void resetAndTruncate()

### append

    public long append(AbstractCompactedRow row)
                throws java.io.IOException

  Throws:
    `java.io.IOException`

### append

    public void append(DecoratedKey<?> decoratedKey,
                       ColumnFamily cf)
                throws java.io.IOException

  Throws:
    `java.io.IOException`

### append

    public void append(DecoratedKey<?> decoratedKey,
                       java.nio.ByteBuffer value)
                throws java.io.IOException

  Throws:
    `java.io.IOException`

### appendFromStream

    public long appendFromStream(DecoratedKey<?> key,
                                 CFMetaData metadata,
                                 long dataSize,
                                 java.io.DataInput in)
                          throws java.io.IOException

  Throws:
    `java.io.IOException`

### updateMaxTimestamp

    public void updateMaxTimestamp(long timestamp)

### abort

    public void abort()

  After failure, attempt to close the index writer and data file before deleting all temp components for the sstable

### closeAndOpenReader

    public SSTableReader closeAndOpenReader()
                                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### closeAndOpenReader

    public SSTableReader closeAndOpenReader(long maxDataAge)
                                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### getFilePointer

    public long getFilePointer()

### getOnDiskFilePointer

    public long getOnDiskFilePointer()
                              throws java.io.IOException

  Throws:
    `java.io.IOException`

Copyright © 2012 The Apache Software Foundation