public class SSTableSimpleUnsortedWriter extends AbstractSSTableSimpleWriter
AbstractSSTableSimpleWriter
columnFamily, counterid, currentKey, currentSuperColumn, directory, generation, 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 |
---|---|
protected void |
addColumn(Cell cell) |
void |
close() |
protected void |
countColumn(Cell cell) |
protected ColumnFamily |
createColumnFamily() |
protected ColumnFamily |
getColumnFamily() |
Descriptor |
getCurrentDescriptor() |
protected void |
replaceColumnFamily() |
protected void |
sync() |
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 void addColumn(Cell cell) throws java.io.IOException
addColumn
in class AbstractSSTableSimpleWriter
java.io.IOException
protected void countColumn(Cell cell) throws java.io.IOException
java.io.IOException
protected ColumnFamily getColumnFamily() throws java.io.IOException
getColumnFamily
in class AbstractSSTableSimpleWriter
java.io.IOException
public Descriptor getCurrentDescriptor()
getCurrentDescriptor
in class AbstractSSTableSimpleWriter
protected ColumnFamily createColumnFamily() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
protected void replaceColumnFamily() throws java.io.IOException
java.io.IOException
protected void sync() throws java.io.IOException
java.io.IOException
Copyright © 2020 The Apache Software Foundation