public class PerSSTableIndexWriter extends java.lang.Object implements SSTableFlushObserver
Modifier and Type | Class and Description |
---|---|
protected class |
PerSSTableIndexWriter.Index |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<ColumnMetadata,PerSSTableIndexWriter.Index> |
indexes |
Constructor and Description |
---|
PerSSTableIndexWriter(AbstractType<?> keyValidator,
Descriptor descriptor,
OperationType source,
java.util.Map<ColumnMetadata,ColumnIndex> supportedIndexes) |
Modifier and Type | Method and Description |
---|---|
void |
begin()
Called before writing any data to the sstable.
|
void |
complete()
Called when all data is written to the file and it's ready to be finished up.
|
boolean |
equals(java.lang.Object o) |
Descriptor |
getDescriptor() |
PerSSTableIndexWriter.Index |
getIndex(ColumnMetadata columnDef) |
int |
hashCode() |
protected long |
maxMemorySize(ColumnIndex columnIndex) |
protected PerSSTableIndexWriter.Index |
newIndex(ColumnIndex columnIndex) |
void |
nextUnfilteredCluster(Unfiltered unfiltered)
Called after the unfiltered cluster is written to the sstable.
|
void |
startPartition(DecoratedKey key,
long curPosition)
Called when a new partition in being written to the sstable,
but before any cells are processed (see
SSTableFlushObserver.nextUnfilteredCluster(Unfiltered) ). |
protected final java.util.Map<ColumnMetadata,PerSSTableIndexWriter.Index> indexes
public PerSSTableIndexWriter(AbstractType<?> keyValidator, Descriptor descriptor, OperationType source, java.util.Map<ColumnMetadata,ColumnIndex> supportedIndexes)
public void begin()
SSTableFlushObserver
begin
in interface SSTableFlushObserver
public void startPartition(DecoratedKey key, long curPosition)
SSTableFlushObserver
SSTableFlushObserver.nextUnfilteredCluster(Unfiltered)
).startPartition
in interface SSTableFlushObserver
key
- The key being appended to SSTable.curPosition
- The position of the key in the SSTable PRIMARY_INDEX file.public void nextUnfilteredCluster(Unfiltered unfiltered)
SSTableFlushObserver
startPartition(DecoratedKey, long)
,
and the cluster should be assumed to belong to that partition.nextUnfilteredCluster
in interface SSTableFlushObserver
unfiltered
- The unfiltered cluster being added to SSTable.public void complete()
SSTableFlushObserver
complete
in interface SSTableFlushObserver
public PerSSTableIndexWriter.Index getIndex(ColumnMetadata columnDef)
public Descriptor getDescriptor()
protected PerSSTableIndexWriter.Index newIndex(ColumnIndex columnIndex)
protected long maxMemorySize(ColumnIndex columnIndex)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Copyright © 2009-2022 The Apache Software Foundation