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 boolean
computeShouldStreamEntireSSTables()
boolean
contained(java.util.List<SSTableReader.PartitionPositionBounds> sections, SSTableReader sstable)
boolean
equals(java.lang.Object o)
void
finish()
Release any resources held by the streamstatic CassandraOutgoingFile
fromStream(OutgoingStream stream)
long
getEstimatedSize()
java.lang.String
getName()
int
getNumFiles()
TimeUUID
getPendingRepair()
Ref<SSTableReader>
getRef()
long
getRepairedAt()
TableId
getTableId()
int
hashCode()
java.lang.String
toString()
void
write(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:
getName
in interfaceOutgoingStream
-
getEstimatedSize
public long getEstimatedSize()
- Specified by:
getEstimatedSize
in 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:
getTableId
in interfaceOutgoingStream
-
getNumFiles
public int getNumFiles()
- Specified by:
getNumFiles
in interfaceOutgoingStream
-
getRepairedAt
public long getRepairedAt()
- Specified by:
getRepairedAt
in interfaceOutgoingStream
-
getPendingRepair
public TimeUUID getPendingRepair()
- Specified by:
getPendingRepair
in interfaceOutgoingStream
-
write
public void write(StreamSession session, StreamingDataOutputPlus out, int version) throws java.io.IOException
Description copied from interface:OutgoingStream
Write the streams data into the socket- Specified by:
write
in 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:OutgoingStream
Release any resources held by the stream- Specified by:
finish
in interfaceOutgoingStream
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-