org.apache.cassandra.streaming
Class StreamOut

java.lang.Object
  extended by org.apache.cassandra.streaming.StreamOut

public class StreamOut
extends java.lang.Object

This class handles streaming data from one node to another. For StreamingRepair and Unbootstrap 1. The ranges are transferred on a single file basis. 2. Each transfer has the header information for the sstable being transferred. 3. List of the pending files are maintained, as this is the source node. For StreamRequests 1. The ranges are compiled and the first file transferred. 2. The header contains the first file info + all the remaining pending files info. 3. List of the pending files are not maintained, that will be maintained by the destination node


Constructor Summary
StreamOut()
           
 
Method Summary
static void transferRanges(java.net.InetAddress target, java.lang.String tableName, java.util.Collection<Range> ranges, java.lang.Runnable callback)
          Split out files for all tables on disk locally for each range and then stream them to the target endpoint.
static void transferRangesForRequest(StreamContext context, java.lang.String tableName, java.util.Collection<Range> ranges, java.lang.Runnable callback)
          Split out files for all tables on disk locally for each range and then stream them to the target endpoint.
static void transferSSTables(StreamContext context, java.lang.String table, java.util.Collection<SSTableReader> sstables, java.util.Collection<Range> ranges)
          Transfers matching portions of a group of sstables from a single table to the target endpoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamOut

public StreamOut()
Method Detail

transferRanges

public static void transferRanges(java.net.InetAddress target,
                                  java.lang.String tableName,
                                  java.util.Collection<Range> ranges,
                                  java.lang.Runnable callback)
Split out files for all tables on disk locally for each range and then stream them to the target endpoint.


transferRangesForRequest

public static void transferRangesForRequest(StreamContext context,
                                            java.lang.String tableName,
                                            java.util.Collection<Range> ranges,
                                            java.lang.Runnable callback)
Split out files for all tables on disk locally for each range and then stream them to the target endpoint.


transferSSTables

public static void transferSSTables(StreamContext context,
                                    java.lang.String table,
                                    java.util.Collection<SSTableReader> sstables,
                                    java.util.Collection<Range> ranges)
                             throws java.io.IOException
Transfers matching portions of a group of sstables from a single table to the target endpoint.

Throws:
java.io.IOException


Copyright © 2010 The Apache Software Foundation