SSTableLoader (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.io.sstable

## Class SSTableLoader

- java.lang.Object
- - org.apache.cassandra.io.sstable.SSTableLoader

- All Implemented Interfaces:
    com.google.common.util.concurrent.FutureCallback<StreamState>, StreamEventHandler

      public class SSTableLoader
      extends java.lang.Object
      implements StreamEventHandler

  Cassandra SSTable bulk loader. Load an externally created sstable into a cluster.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SSTableLoader.Client`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SSTableLoader(java.io.File directory, SSTableLoader.Client client, OutputHandler outputHandler)`
    `SSTableLoader(java.io.File directory, SSTableLoader.Client client, OutputHandler outputHandler, int connectionsPerHost)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Set<java.net.InetAddress>` | `getFailedHosts()`
    `void` | `handleStreamEvent(StreamEvent event)` Callback for various streaming events.
    `void` | `onFailure(java.lang.Throwable t)`
    `void` | `onSuccess(StreamState finalState)`
    `protected java.util.Collection<SSTableReader>` | `openSSTables(java.util.Map<java.net.InetAddress,java.util.Collection<Range<Token>>> ranges)`
    `StreamResultFuture` | `stream()`
    `StreamResultFuture` | `stream(java.util.Set<java.net.InetAddress> toIgnore, StreamEventHandler... listeners)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SSTableLoader

          public SSTableLoader(java.io.File directory,
                       SSTableLoader.Client client,
                       OutputHandler outputHandler)

    - #### SSTableLoader

          public SSTableLoader(java.io.File directory,
                       SSTableLoader.Client client,
                       OutputHandler outputHandler,
                       int connectionsPerHost)

  - ### Method Detail

    - #### openSSTables

          protected java.util.Collection<SSTableReader> openSSTables(java.util.Map<java.net.InetAddress,java.util.Collection<Range<Token>>> ranges)

    - #### stream

          public StreamResultFuture stream()

    - #### stream

          public StreamResultFuture stream(java.util.Set<java.net.InetAddress> toIgnore,
                                  StreamEventHandler... listeners)

    - #### onSuccess

          public void onSuccess(StreamState finalState)

      Specified by:
        `onSuccess` in interface `com.google.common.util.concurrent.FutureCallback<StreamState>`

    - #### onFailure

          public void onFailure(java.lang.Throwable t)

      Specified by:
        `onFailure` in interface `com.google.common.util.concurrent.FutureCallback<StreamState>`

    - #### handleStreamEvent

          public void handleStreamEvent(StreamEvent event)

      Description copied from interface: `StreamEventHandler`
      Callback for various streaming events.
      Specified by:
        `handleStreamEvent` in interface `StreamEventHandler`
      Parameters:
        `event` - Stream event.
      See Also:
        `StreamEvent.Type`

    - #### getFailedHosts

          public java.util.Set<java.net.InetAddress> getFailedHosts()

Copyright © 2014 The Apache Software Foundation