Class CassandraStreamReader
java.lang.Object
org.apache.cassandra.db.streaming.CassandraStreamReader
- All Implemented Interfaces:
IStreamReader
- Direct Known Subclasses:
CassandraCompressedStreamReader
CassandraStreamReader reads from stream and writes to SSTable.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longprotected final intprotected final SerializationHeader.Componentprotected final Versionprotected final TimeUUIDprotected final longprotected final Collection<SSTableReader.PartitionPositionBounds>protected final StreamSessionprotected final intprotected final TableId -
Constructor Summary
ConstructorsConstructorDescriptionCassandraStreamReader(StreamMessageHeader header, CassandraStreamHeader streamHeader, StreamSession session) -
Method Summary
Modifier and TypeMethodDescriptionprotected SSTableMultiWritercreateWriter(ColumnFamilyStore cfs, long totalSize, long repairedAt, TimeUUID pendingRepair, SSTableFormat<?, ?> format) protected CassandraStreamReader.StreamDeserializergetDeserializer(TableMetadata metadata, TrackedDataInputPlus in, Version inputVersion, StreamSession session, SSTableMultiWriter writer) protected SerializationHeadergetHeader(TableMetadata metadata) read(DataInputPlus inputPlus) protected longprotected voidwritePartition(CassandraStreamReader.StreamDeserializer deserializer, SSTableMultiWriter writer)
-
Field Details
-
tableId
-
estimatedKeys
protected final long estimatedKeys -
sections
-
session
-
inputVersion
-
repairedAt
protected final long repairedAt -
pendingRepair
-
sstableLevel
protected final int sstableLevel -
header
-
fileSeqNum
protected final int fileSeqNum
-
-
Constructor Details
-
CassandraStreamReader
public CassandraStreamReader(StreamMessageHeader header, CassandraStreamHeader streamHeader, StreamSession session)
-
-
Method Details
-
read
- Specified by:
readin interfaceIStreamReader- Parameters:
inputPlus- where this reads data from- Returns:
- SSTable transferred
- Throws:
IOException- if reading the remote sstable fails. Will throw an RTE if local write fails.Throwable
-
getDeserializer
protected CassandraStreamReader.StreamDeserializer getDeserializer(TableMetadata metadata, TrackedDataInputPlus in, Version inputVersion, StreamSession session, SSTableMultiWriter writer) throws IOException - Throws:
IOException
-
getHeader
- Throws:
UnknownColumnException
-
createWriter
protected SSTableMultiWriter createWriter(ColumnFamilyStore cfs, long totalSize, long repairedAt, TimeUUID pendingRepair, SSTableFormat<?, ?> format) throws IOException- Throws:
IOException
-
totalSize
protected long totalSize() -
writePartition
protected void writePartition(CassandraStreamReader.StreamDeserializer deserializer, SSTableMultiWriter writer) throws IOException - Throws:
IOException
-