Class CassandraOutgoingFile
java.lang.Object
org.apache.cassandra.db.streaming.CassandraOutgoingFile
- All Implemented Interfaces:
OutgoingStream
used to transfer the part(or whole) of a SSTable data file
-
Constructor Summary
ConstructorsConstructorDescriptionCassandraOutgoingFile(StreamOperation operation, Ref<SSTableReader> ref, List<SSTableReader.PartitionPositionBounds> sections, List<Range<Token>> normalizedRanges, long estimatedKeys) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancontained(List<SSTableReader.PartitionPositionBounds> sections, SSTableReader sstable) booleanvoidfinish()Release any resources held by the streamstatic CassandraOutgoingFilefromStream(OutgoingStream stream) longgetName()intgetRef()longinthashCode()toString()voidwrite(StreamSession session, StreamingDataOutputPlus out, int version) Write the streams data into the socket
-
Constructor Details
-
CassandraOutgoingFile
public CassandraOutgoingFile(StreamOperation operation, Ref<SSTableReader> ref, List<SSTableReader.PartitionPositionBounds> sections, List<Range<Token>> normalizedRanges, long estimatedKeys)
-
-
Method Details
-
fromStream
-
getRef
-
getName
- Specified by:
getNamein interfaceOutgoingStream
-
getEstimatedSize
public long getEstimatedSize()- Specified by:
getEstimatedSizein interfaceOutgoingStream- Returns:
- estimated file size to be streamed. This should only be used for metrics, because concurrent stats metadata update and index redistribution will change file sizes.
-
getTableId
- Specified by:
getTableIdin interfaceOutgoingStream
-
getNumFiles
public int getNumFiles()- Specified by:
getNumFilesin interfaceOutgoingStream
-
getRepairedAt
public long getRepairedAt()- Specified by:
getRepairedAtin interfaceOutgoingStream
-
getPendingRepair
- Specified by:
getPendingRepairin interfaceOutgoingStream
-
write
public void write(StreamSession session, StreamingDataOutputPlus out, int version) throws IOException Description copied from interface:OutgoingStreamWrite the streams data into the socket- Specified by:
writein interfaceOutgoingStream- Throws:
IOException
-
computeShouldStreamEntireSSTables
public boolean computeShouldStreamEntireSSTables() -
contained
public boolean contained(List<SSTableReader.PartitionPositionBounds> sections, SSTableReader sstable) -
finish
public void finish()Description copied from interface:OutgoingStreamRelease any resources held by the stream- Specified by:
finishin interfaceOutgoingStream
-
equals
-
hashCode
public int hashCode() -
toString
-