public class StreamPlan
extends java.lang.Object
StreamPlan
is a helper class that builds StreamOperation of given configuration.
This is the class you want to use for building streaming plan and starting streaming.Constructor and Description |
---|
StreamPlan(java.lang.String description)
Start building stream plan.
|
Modifier and Type | Method and Description |
---|---|
StreamResultFuture |
execute()
Execute this
StreamPlan asynchronously. |
StreamPlan |
flushBeforeTransfer(boolean flushBeforeTransfer)
Set flushBeforeTransfer option.
|
boolean |
isEmpty() |
StreamPlan |
requestRanges(java.net.InetAddress from,
java.lang.String keyspace,
java.util.Collection<Range<Token>> ranges)
Request data in
keyspace and ranges from specific node. |
StreamPlan |
requestRanges(java.net.InetAddress from,
java.lang.String keyspace,
java.util.Collection<Range<Token>> ranges,
java.lang.String... columnFamilies)
Request data in
columnFamilies under keyspace and ranges from specific node. |
StreamPlan |
transferFiles(java.net.InetAddress to,
java.util.Collection<StreamSession.SSTableStreamingSections> sstableDetails)
Add transfer task to send given SSTable files.
|
StreamPlan |
transferRanges(java.net.InetAddress to,
java.lang.String keyspace,
java.util.Collection<Range<Token>> ranges)
Add transfer task to send data of specific keyspace and ranges.
|
StreamPlan |
transferRanges(java.net.InetAddress to,
java.lang.String keyspace,
java.util.Collection<Range<Token>> ranges,
java.lang.String... columnFamilies)
Add transfer task to send data of specific
columnFamilies under keyspace and ranges . |
public StreamPlan(java.lang.String description)
description
- Stream type that describes this StreamPlanpublic StreamPlan requestRanges(java.net.InetAddress from, java.lang.String keyspace, java.util.Collection<Range<Token>> ranges)
keyspace
and ranges
from specific node.from
- endpoint address to fetch data from.keyspace
- name of keyspaceranges
- ranges to fetchpublic StreamPlan requestRanges(java.net.InetAddress from, java.lang.String keyspace, java.util.Collection<Range<Token>> ranges, java.lang.String... columnFamilies)
columnFamilies
under keyspace
and ranges
from specific node.from
- endpoint address to fetch data from.keyspace
- name of keyspaceranges
- ranges to fetchcolumnFamilies
- specific column familiespublic StreamPlan transferRanges(java.net.InetAddress to, java.lang.String keyspace, java.util.Collection<Range<Token>> ranges)
to
- endpoint address of receiverkeyspace
- name of keyspaceranges
- ranges to sendpublic StreamPlan transferRanges(java.net.InetAddress to, java.lang.String keyspace, java.util.Collection<Range<Token>> ranges, java.lang.String... columnFamilies)
columnFamilies
under keyspace
and ranges
.to
- endpoint address of receiverkeyspace
- name of keyspaceranges
- ranges to sendcolumnFamilies
- specific column familiespublic StreamPlan transferFiles(java.net.InetAddress to, java.util.Collection<StreamSession.SSTableStreamingSections> sstableDetails)
to
- endpoint address of receiversstableDetails
- sstables with file positions and estimated key countpublic boolean isEmpty()
public StreamResultFuture execute()
StreamPlan
asynchronously.StreamState
that you can use to listen on progress of streaming.public StreamPlan flushBeforeTransfer(boolean flushBeforeTransfer)
flushBeforeTransfer
- set to true when the node should flush before transferCopyright © 2013 The Apache Software Foundation