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 bootstrap, 1. BOOTSTRAP_TOKEN asks the most-loaded node what Token to use to split its Range in two. 2. STREAM_REQUEST tells source nodes to send us the necessary Ranges 3. source nodes send STREAM_INITIATE to us to say "get ready to receive data" [if there is data to send] 4. when we have everything set up to receive the data, we send STREAM_INITIATE_DONE back to the source nodes and they start streaming 5. when streaming is complete, we send STREAM_FINISHED to the source so it can clean up on its end For unbootstrap, the leaving node starts with step 3 (1 and 2 are skipped entirely). This is why STREAM_INITIATE is a separate verb, rather than just a reply to STREAM_REQUEST; the REQUEST is optional.


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 transferSSTables(java.net.InetAddress target, java.util.List<SSTableReader> sstables, java.lang.String table)
          Transfers a group of sstables from a single table to the target endpoint and then marks them as ready for local deletion.
 
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.


transferSSTables

public static void transferSSTables(java.net.InetAddress target,
                                    java.util.List<SSTableReader> sstables,
                                    java.lang.String table)
                             throws java.io.IOException
Transfers a group of sstables from a single table to the target endpoint and then marks them as ready for local deletion.

Throws:
java.io.IOException


Copyright © 2010 The Apache Software Foundation