public class CassandraStreamWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected StreamManager.StreamRateLimiter |
limiter |
protected java.util.Collection<SSTableReader.PartitionPositionBounds> |
sections |
protected StreamSession |
session |
protected SSTableReader |
sstable |
Constructor and Description |
---|
CassandraStreamWriter(SSTableReader sstable,
CassandraStreamHeader header,
StreamSession session) |
Modifier and Type | Method and Description |
---|---|
protected long |
totalSize() |
protected long |
write(ChannelProxy proxy,
DataIntegrityMetadata.ChecksumValidator validator,
StreamingDataOutputPlus output,
long start,
int transferOffset,
int toTransfer,
int bufferSize)
Sequentially read bytes from the file and write them to the output stream
|
void |
write(StreamingDataOutputPlus out)
Stream file of specified sections to given channel.
|
protected final SSTableReader sstable
protected final java.util.Collection<SSTableReader.PartitionPositionBounds> sections
protected final StreamManager.StreamRateLimiter limiter
protected final StreamSession session
public CassandraStreamWriter(SSTableReader sstable, CassandraStreamHeader header, StreamSession session)
public void write(StreamingDataOutputPlus out) throws java.io.IOException
out
- where this writes data tojava.io.IOException
- on any I/O errorprotected long totalSize()
protected long write(ChannelProxy proxy, DataIntegrityMetadata.ChecksumValidator validator, StreamingDataOutputPlus output, long start, int transferOffset, int toTransfer, int bufferSize) throws java.io.IOException
proxy
- The file reader to read fromvalidator
- validator to verify data integritystart
- The readd offset from the beginning of the proxy
file.transferOffset
- number of bytes to skip transfer, but include for validation.toTransfer
- The number of bytes to be transferred.java.io.IOException
- on any I/O errorCopyright © 2009- The Apache Software Foundation