public class SSTableSimpleUnsortedWriter extends AbstractSSTableSimpleWriter
AbstractSSTableSimpleWriter
columnFamily, counterid, currentKey, currentSuperColumn, directory, metadata
Constructor and Description |
---|
SSTableSimpleUnsortedWriter(java.io.File directory,
CFMetaData metadata,
IPartitioner partitioner,
long bufferSizeInMB) |
SSTableSimpleUnsortedWriter(java.io.File directory,
IPartitioner partitioner,
java.lang.String keyspace,
java.lang.String columnFamily,
AbstractType<?> comparator,
AbstractType<?> subComparator,
int bufferSizeInMB) |
SSTableSimpleUnsortedWriter(java.io.File directory,
IPartitioner partitioner,
java.lang.String keyspace,
java.lang.String columnFamily,
AbstractType<?> comparator,
AbstractType<?> subComparator,
int bufferSizeInMB,
CompressionParameters compressParameters)
Create a new buffering writer.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this writer.
|
protected ColumnFamily |
getColumnFamily() |
protected void |
writeRow(DecoratedKey key,
ColumnFamily columnFamily) |
addColumn, addCounterColumn, addExpiringColumn, getWriter, makeFilename, newRow, newSuperColumn
public SSTableSimpleUnsortedWriter(java.io.File directory, IPartitioner partitioner, java.lang.String keyspace, java.lang.String columnFamily, AbstractType<?> comparator, AbstractType<?> subComparator, int bufferSizeInMB, CompressionParameters compressParameters)
directory
- the directory where to write the sstablespartitioner
- the partitionerkeyspace
- the keyspace namecolumnFamily
- the column family namecomparator
- the column family comparatorsubComparator
- 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.public SSTableSimpleUnsortedWriter(java.io.File directory, IPartitioner partitioner, java.lang.String keyspace, java.lang.String columnFamily, AbstractType<?> comparator, AbstractType<?> subComparator, int bufferSizeInMB)
public SSTableSimpleUnsortedWriter(java.io.File directory, CFMetaData metadata, IPartitioner partitioner, long bufferSizeInMB)
protected void writeRow(DecoratedKey key, ColumnFamily columnFamily) throws java.io.IOException
writeRow
in class AbstractSSTableSimpleWriter
java.io.IOException
protected ColumnFamily getColumnFamily()
getColumnFamily
in class AbstractSSTableSimpleWriter
public void close() throws java.io.IOException
AbstractSSTableSimpleWriter
close
in class AbstractSSTableSimpleWriter
java.io.IOException
Copyright © 2014 The Apache Software Foundation