Class CassandraOutgoingFile
- java.lang.Object
-
- org.apache.cassandra.db.streaming.CassandraOutgoingFile
-
- All Implemented Interfaces:
OutgoingStream
public class CassandraOutgoingFile extends java.lang.Object implements OutgoingStream
used to transfer the part(or whole) of a SSTable data file
-
-
Constructor Summary
Constructors Constructor Description CassandraOutgoingFile(StreamOperation operation, Ref<SSTableReader> ref, java.util.List<SSTableReader.PartitionPositionBounds> sections, java.util.List<Range<Token>> normalizedRanges, long estimatedKeys)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancomputeShouldStreamEntireSSTables()booleancontained(java.util.List<SSTableReader.PartitionPositionBounds> sections, SSTableReader sstable)booleanequals(java.lang.Object o)voidfinish()Release any resources held by the streamstatic CassandraOutgoingFilefromStream(OutgoingStream stream)longgetEstimatedSize()java.lang.StringgetName()intgetNumFiles()TimeUUIDgetPendingRepair()Ref<SSTableReader>getRef()longgetRepairedAt()TableIdgetTableId()inthashCode()java.lang.StringtoString()voidwrite(StreamSession session, StreamingDataOutputPlus out, int version)Write the streams data into the socket
-
-
-
Constructor Detail
-
CassandraOutgoingFile
public CassandraOutgoingFile(StreamOperation operation, Ref<SSTableReader> ref, java.util.List<SSTableReader.PartitionPositionBounds> sections, java.util.List<Range<Token>> normalizedRanges, long estimatedKeys)
-
-
Method Detail
-
fromStream
public static CassandraOutgoingFile fromStream(OutgoingStream stream)
-
getRef
public Ref<SSTableReader> getRef()
-
getName
public java.lang.String 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
public TableId getTableId()
- Specified by:
getTableIdin interfaceOutgoingStream
-
getNumFiles
public int getNumFiles()
- Specified by:
getNumFilesin interfaceOutgoingStream
-
getRepairedAt
public long getRepairedAt()
- Specified by:
getRepairedAtin interfaceOutgoingStream
-
getPendingRepair
public TimeUUID getPendingRepair()
- Specified by:
getPendingRepairin interfaceOutgoingStream
-
write
public void write(StreamSession session, StreamingDataOutputPlus out, int version) throws java.io.IOException
Description copied from interface:OutgoingStreamWrite the streams data into the socket- Specified by:
writein interfaceOutgoingStream- Throws:
java.io.IOException
-
computeShouldStreamEntireSSTables
public boolean computeShouldStreamEntireSSTables()
-
contained
public boolean contained(java.util.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
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-