org.apache.cassandra.hadoop

## Class ConfigHelper

- java.lang.Object
- - org.apache.cassandra.hadoop.ConfigHelper

-     public class ConfigHelper
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Cassandra.Client` | `createConnection(org.apache.hadoop.conf.Configuration conf, java.lang.String host, java.lang.Integer port)`
    `static Cassandra.Client` | `getClientFromInputAddressList(org.apache.hadoop.conf.Configuration conf)`
    `static Cassandra.Client` | `getClientFromOutputAddressList(org.apache.hadoop.conf.Configuration conf)`
    `static ITransportFactory` | `getClientTransportFactory(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getInputColumnFamily(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getInputInitialAddress(org.apache.hadoop.conf.Configuration conf)`
    `static boolean` | `getInputIsWide(org.apache.hadoop.conf.Configuration conf)`
    `static KeyRange` | `getInputKeyRange(org.apache.hadoop.conf.Configuration conf)` may be null if unset
    `static java.lang.String` | `getInputKeyspace(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getInputKeyspacePassword(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getInputKeyspaceUserName(org.apache.hadoop.conf.Configuration conf)`
    `static IPartitioner` | `getInputPartitioner(org.apache.hadoop.conf.Configuration conf)`
    `static int` | `getInputRpcPort(org.apache.hadoop.conf.Configuration conf)`
    `static SlicePredicate` | `getInputSlicePredicate(org.apache.hadoop.conf.Configuration conf)`
    `static int` | `getInputSplitSize(org.apache.hadoop.conf.Configuration conf)`
    `static int` | `getInputSplitSizeInMb(org.apache.hadoop.conf.Configuration conf)` cassandra.input.split.size will be used if the value is undefined or negative.
    `static java.lang.String` | `getOutputColumnFamily(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getOutputCompressionChunkLength(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getOutputCompressionClass(org.apache.hadoop.conf.Configuration conf)`
    `static CompressionParameters` | `getOutputCompressionParamaters(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getOutputInitialAddress(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getOutputKeyspace(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getOutputKeyspacePassword(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getOutputKeyspaceUserName(org.apache.hadoop.conf.Configuration conf)`
    `static boolean` | `getOutputLocalDCOnly(org.apache.hadoop.conf.Configuration conf)`
    `static IPartitioner` | `getOutputPartitioner(org.apache.hadoop.conf.Configuration conf)`
    `static int` | `getOutputRpcPort(org.apache.hadoop.conf.Configuration conf)`
    `static int` | `getRangeBatchSize(org.apache.hadoop.conf.Configuration conf)` The number of rows to request with each get range slices request.
    `static java.lang.String` | `getReadConsistencyLevel(org.apache.hadoop.conf.Configuration conf)`
    `static int` | `getThriftFramedTransportSize(org.apache.hadoop.conf.Configuration conf)`
    `static java.lang.String` | `getWriteConsistencyLevel(org.apache.hadoop.conf.Configuration conf)`
    `static void` | `setInputColumnFamily(org.apache.hadoop.conf.Configuration conf, java.lang.String keyspace, java.lang.String columnFamily)` Set the keyspace and column family for the input of this job.
    `static void` | `setInputColumnFamily(org.apache.hadoop.conf.Configuration conf, java.lang.String keyspace, java.lang.String columnFamily, boolean widerows)` Set the keyspace and column family for the input of this job.
    `static void` | `setInputInitialAddress(org.apache.hadoop.conf.Configuration conf, java.lang.String address)`
    `static void` | `setInputKeyspacePassword(org.apache.hadoop.conf.Configuration conf, java.lang.String password)`
    `static void` | `setInputKeyspaceUserName(org.apache.hadoop.conf.Configuration conf, java.lang.String username)`
    `static void` | `setInputKeyspaceUserNameAndPassword(org.apache.hadoop.conf.Configuration conf, java.lang.String username, java.lang.String password)`
    `static void` | `setInputPartitioner(org.apache.hadoop.conf.Configuration conf, java.lang.String classname)`
    `static void` | `setInputRange(org.apache.hadoop.conf.Configuration conf, java.util.List<IndexExpression> filter)` Set the KeyRange to limit the rows.
    `static void` | `setInputRange(org.apache.hadoop.conf.Configuration conf, java.lang.String startToken, java.lang.String endToken)` Set the KeyRange to limit the rows.
    `static void` | `setInputRange(org.apache.hadoop.conf.Configuration conf, java.lang.String startToken, java.lang.String endToken, java.util.List<IndexExpression> filter)` Set the KeyRange to limit the rows.
    `static void` | `setInputRpcPort(org.apache.hadoop.conf.Configuration conf, java.lang.String port)`
    `static void` | `setInputSlicePredicate(org.apache.hadoop.conf.Configuration conf, SlicePredicate predicate)` Set the predicate that determines what columns will be selected from each row.
    `static void` | `setInputSplitSize(org.apache.hadoop.conf.Configuration conf, int splitsize)` Set the size of the input split.
    `static void` | `setInputSplitSizeInMb(org.apache.hadoop.conf.Configuration conf, int splitSizeMb)` Set the size of the input split.
    `static void` | `setOutputColumnFamily(org.apache.hadoop.conf.Configuration conf, java.lang.String columnFamily)` Set the column family for the output of this job.
    `static void` | `setOutputColumnFamily(org.apache.hadoop.conf.Configuration conf, java.lang.String keyspace, java.lang.String columnFamily)` Set the column family for the output of this job.
    `static void` | `setOutputCompressionChunkLength(org.apache.hadoop.conf.Configuration conf, java.lang.String length)`
    `static void` | `setOutputCompressionClass(org.apache.hadoop.conf.Configuration conf, java.lang.String classname)`
    `static void` | `setOutputInitialAddress(org.apache.hadoop.conf.Configuration conf, java.lang.String address)`
    `static void` | `setOutputKeyspace(org.apache.hadoop.conf.Configuration conf, java.lang.String keyspace)` Set the keyspace for the output of this job.
    `static void` | `setOutputKeyspacePassword(org.apache.hadoop.conf.Configuration conf, java.lang.String password)`
    `static void` | `setOutputKeyspaceUserName(org.apache.hadoop.conf.Configuration conf, java.lang.String username)`
    `static void` | `setOutputKeyspaceUserNameAndPassword(org.apache.hadoop.conf.Configuration conf, java.lang.String username, java.lang.String password)`
    `static void` | `setOutputLocalDCOnly(org.apache.hadoop.conf.Configuration conf, boolean localDCOnly)`
    `static void` | `setOutputPartitioner(org.apache.hadoop.conf.Configuration conf, java.lang.String classname)`
    `static void` | `setOutputRpcPort(org.apache.hadoop.conf.Configuration conf, java.lang.String port)`
    `static void` | `setRangeBatchSize(org.apache.hadoop.conf.Configuration conf, int batchsize)` The number of rows to request with each get range slices request.
    `static void` | `setReadConsistencyLevel(org.apache.hadoop.conf.Configuration conf, java.lang.String consistencyLevel)`
    `static void` | `setThriftFramedTransportSizeInMb(org.apache.hadoop.conf.Configuration conf, int frameSizeInMB)`
    `static void` | `setWriteConsistencyLevel(org.apache.hadoop.conf.Configuration conf, java.lang.String consistencyLevel)`

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

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

- - ### Constructor Detail

    - #### ConfigHelper

          public ConfigHelper()

  - ### Method Detail

    - #### setInputColumnFamily

          public static void setInputColumnFamily(org.apache.hadoop.conf.Configuration conf,
                                                  java.lang.String keyspace,
                                                  java.lang.String columnFamily,
                                                  boolean widerows)

      Set the keyspace and column family for the input of this job.
      Parameters:
        `conf` - Job configuration you are about to run
        `keyspace` -
        `columnFamily` -
        `widerows` -

    - #### setInputColumnFamily

          public static void setInputColumnFamily(org.apache.hadoop.conf.Configuration conf,
                                                  java.lang.String keyspace,
                                                  java.lang.String columnFamily)

      Set the keyspace and column family for the input of this job.
      Parameters:
        `conf` - Job configuration you are about to run
        `keyspace` -
        `columnFamily` -

    - #### setOutputKeyspace

          public static void setOutputKeyspace(org.apache.hadoop.conf.Configuration conf,
                                               java.lang.String keyspace)

      Set the keyspace for the output of this job.
      Parameters:
        `conf` - Job configuration you are about to run
        `keyspace` -

    - #### setOutputColumnFamily

          public static void setOutputColumnFamily(org.apache.hadoop.conf.Configuration conf,
                                                   java.lang.String columnFamily)

      Set the column family for the output of this job.
      Parameters:
        `conf` - Job configuration you are about to run
        `columnFamily` -

    - #### setOutputColumnFamily

          public static void setOutputColumnFamily(org.apache.hadoop.conf.Configuration conf,
                                                   java.lang.String keyspace,
                                                   java.lang.String columnFamily)

      Set the column family for the output of this job.
      Parameters:
        `conf` - Job configuration you are about to run
        `keyspace` -
        `columnFamily` -

    - #### setRangeBatchSize

          public static void setRangeBatchSize(org.apache.hadoop.conf.Configuration conf,
                                               int batchsize)

      The number of rows to request with each get range slices request. Too big and you can either get timeouts when it takes Cassandra too long to fetch all the data. Too small and the performance will be eaten up by the overhead of each request.
      Parameters:
        `conf` - Job configuration you are about to run
        `batchsize` - Number of rows to request each time

    - #### getRangeBatchSize

          public static int getRangeBatchSize(org.apache.hadoop.conf.Configuration conf)

      The number of rows to request with each get range slices request. Too big and you can either get timeouts when it takes Cassandra too long to fetch all the data. Too small and the performance will be eaten up by the overhead of each request.
      Parameters:
        `conf` - Job configuration you are about to run
      Returns:
        Number of rows to request each time

    - #### setInputSplitSize

          public static void setInputSplitSize(org.apache.hadoop.conf.Configuration conf,
                                               int splitsize)

      Set the size of the input split. This affects the number of maps created, if the number is too small the overhead of each map will take up the bulk of the job time.
      Parameters:
        `conf` - Job configuration you are about to run
        `splitsize` - Number of partitions in the input split

    - #### getInputSplitSize

          public static int getInputSplitSize(org.apache.hadoop.conf.Configuration conf)

    - #### setInputSplitSizeInMb

          public static void setInputSplitSizeInMb(org.apache.hadoop.conf.Configuration conf,
                                                   int splitSizeMb)

      Set the size of the input split. getInputSplitSize value is used if this is not set. This affects the number of maps created, if the number is too small the overhead of each map will take up the bulk of the job time.
      Parameters:
        `conf` - Job configuration you are about to run
        `splitSizeMb` - Input split size in MB

    - #### getInputSplitSizeInMb

          public static int getInputSplitSizeInMb(org.apache.hadoop.conf.Configuration conf)

      cassandra.input.split.size will be used if the value is undefined or negative.
      Parameters:
        `conf` - Job configuration you are about to run
      Returns:
        split size in MB or -1 if it is undefined.

    - #### setInputSlicePredicate

          public static void setInputSlicePredicate(org.apache.hadoop.conf.Configuration conf,
                                                    SlicePredicate predicate)

      Set the predicate that determines what columns will be selected from each row.
      Parameters:
        `conf` - Job configuration you are about to run
        `predicate` -

    - #### getInputSlicePredicate

          public static SlicePredicate getInputSlicePredicate(org.apache.hadoop.conf.Configuration conf)

    - #### setInputRange

          public static void setInputRange(org.apache.hadoop.conf.Configuration conf,
                                           java.lang.String startToken,
                                           java.lang.String endToken)

      Set the KeyRange to limit the rows.
      Parameters:
        `conf` - Job configuration you are about to run

    - #### setInputRange

          public static void setInputRange(org.apache.hadoop.conf.Configuration conf,
                                           java.lang.String startToken,
                                           java.lang.String endToken,
                                           java.util.List<IndexExpression> filter)

      Set the KeyRange to limit the rows.
      Parameters:
        `conf` - Job configuration you are about to run

    - #### setInputRange

          public static void setInputRange(org.apache.hadoop.conf.Configuration conf,
                                           java.util.List<IndexExpression> filter)

      Set the KeyRange to limit the rows.
      Parameters:
        `conf` - Job configuration you are about to run

    - #### getInputKeyRange

          public static KeyRange getInputKeyRange(org.apache.hadoop.conf.Configuration conf)

      may be null if unset

    - #### getInputKeyspace

          public static java.lang.String getInputKeyspace(org.apache.hadoop.conf.Configuration conf)

    - #### getOutputKeyspace

          public static java.lang.String getOutputKeyspace(org.apache.hadoop.conf.Configuration conf)

    - #### setInputKeyspaceUserNameAndPassword

          public static void setInputKeyspaceUserNameAndPassword(org.apache.hadoop.conf.Configuration conf,
                                                                 java.lang.String username,
                                                                 java.lang.String password)

    - #### setInputKeyspaceUserName

          public static void setInputKeyspaceUserName(org.apache.hadoop.conf.Configuration conf,
                                                      java.lang.String username)

    - #### getInputKeyspaceUserName

          public static java.lang.String getInputKeyspaceUserName(org.apache.hadoop.conf.Configuration conf)

    - #### setInputKeyspacePassword

          public static void setInputKeyspacePassword(org.apache.hadoop.conf.Configuration conf,
                                                      java.lang.String password)

    - #### getInputKeyspacePassword

          public static java.lang.String getInputKeyspacePassword(org.apache.hadoop.conf.Configuration conf)

    - #### setOutputKeyspaceUserNameAndPassword

          public static void setOutputKeyspaceUserNameAndPassword(org.apache.hadoop.conf.Configuration conf,
                                                                  java.lang.String username,
                                                                  java.lang.String password)

    - #### setOutputKeyspaceUserName

          public static void setOutputKeyspaceUserName(org.apache.hadoop.conf.Configuration conf,
                                                       java.lang.String username)

    - #### getOutputKeyspaceUserName

          public static java.lang.String getOutputKeyspaceUserName(org.apache.hadoop.conf.Configuration conf)

    - #### setOutputKeyspacePassword

          public static void setOutputKeyspacePassword(org.apache.hadoop.conf.Configuration conf,
                                                       java.lang.String password)

    - #### getOutputKeyspacePassword

          public static java.lang.String getOutputKeyspacePassword(org.apache.hadoop.conf.Configuration conf)

    - #### getInputColumnFamily

          public static java.lang.String getInputColumnFamily(org.apache.hadoop.conf.Configuration conf)

    - #### getOutputColumnFamily

          public static java.lang.String getOutputColumnFamily(org.apache.hadoop.conf.Configuration conf)

    - #### getInputIsWide

          public static boolean getInputIsWide(org.apache.hadoop.conf.Configuration conf)

    - #### getReadConsistencyLevel

          public static java.lang.String getReadConsistencyLevel(org.apache.hadoop.conf.Configuration conf)

    - #### setReadConsistencyLevel

          public static void setReadConsistencyLevel(org.apache.hadoop.conf.Configuration conf,
                                                     java.lang.String consistencyLevel)

    - #### getWriteConsistencyLevel

          public static java.lang.String getWriteConsistencyLevel(org.apache.hadoop.conf.Configuration conf)

    - #### setWriteConsistencyLevel

          public static void setWriteConsistencyLevel(org.apache.hadoop.conf.Configuration conf,
                                                      java.lang.String consistencyLevel)

    - #### getInputRpcPort

          public static int getInputRpcPort(org.apache.hadoop.conf.Configuration conf)

    - #### setInputRpcPort

          public static void setInputRpcPort(org.apache.hadoop.conf.Configuration conf,
                                             java.lang.String port)

    - #### getInputInitialAddress

          public static java.lang.String getInputInitialAddress(org.apache.hadoop.conf.Configuration conf)

    - #### setInputInitialAddress

          public static void setInputInitialAddress(org.apache.hadoop.conf.Configuration conf,
                                                    java.lang.String address)

    - #### setInputPartitioner

          public static void setInputPartitioner(org.apache.hadoop.conf.Configuration conf,
                                                 java.lang.String classname)

    - #### getInputPartitioner

          public static IPartitioner getInputPartitioner(org.apache.hadoop.conf.Configuration conf)

    - #### getOutputRpcPort

          public static int getOutputRpcPort(org.apache.hadoop.conf.Configuration conf)

    - #### setOutputRpcPort

          public static void setOutputRpcPort(org.apache.hadoop.conf.Configuration conf,
                                              java.lang.String port)

    - #### getOutputInitialAddress

          public static java.lang.String getOutputInitialAddress(org.apache.hadoop.conf.Configuration conf)

    - #### setOutputInitialAddress

          public static void setOutputInitialAddress(org.apache.hadoop.conf.Configuration conf,
                                                     java.lang.String address)

    - #### setOutputPartitioner

          public static void setOutputPartitioner(org.apache.hadoop.conf.Configuration conf,
                                                  java.lang.String classname)

    - #### getOutputPartitioner

          public static IPartitioner getOutputPartitioner(org.apache.hadoop.conf.Configuration conf)

    - #### getOutputCompressionClass

          public static java.lang.String getOutputCompressionClass(org.apache.hadoop.conf.Configuration conf)

    - #### getOutputCompressionChunkLength

          public static java.lang.String getOutputCompressionChunkLength(org.apache.hadoop.conf.Configuration conf)

    - #### setOutputCompressionClass

          public static void setOutputCompressionClass(org.apache.hadoop.conf.Configuration conf,
                                                       java.lang.String classname)

    - #### setOutputCompressionChunkLength

          public static void setOutputCompressionChunkLength(org.apache.hadoop.conf.Configuration conf,
                                                             java.lang.String length)

    - #### setThriftFramedTransportSizeInMb

          public static void setThriftFramedTransportSizeInMb(org.apache.hadoop.conf.Configuration conf,
                                                              int frameSizeInMB)

    - #### getThriftFramedTransportSize

          public static int getThriftFramedTransportSize(org.apache.hadoop.conf.Configuration conf)

      Parameters:
        `conf` - The configuration to use.
      Returns:
        Value (converts MBs to Bytes) set by `setThriftFramedTransportSizeInMb(Configuration, int)` or default of 15MB

    - #### getOutputCompressionParamaters

          public static CompressionParameters getOutputCompressionParamaters(org.apache.hadoop.conf.Configuration conf)

    - #### getOutputLocalDCOnly

          public static boolean getOutputLocalDCOnly(org.apache.hadoop.conf.Configuration conf)

    - #### setOutputLocalDCOnly

          public static void setOutputLocalDCOnly(org.apache.hadoop.conf.Configuration conf,
                                                  boolean localDCOnly)

    - #### getClientFromInputAddressList

          public static Cassandra.Client getClientFromInputAddressList(org.apache.hadoop.conf.Configuration conf)
                                                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getClientFromOutputAddressList

          public static Cassandra.Client getClientFromOutputAddressList(org.apache.hadoop.conf.Configuration conf)
                                                                 throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### createConnection

          public static Cassandra.Client createConnection(org.apache.hadoop.conf.Configuration conf,
                                                          java.lang.String host,
                                                          java.lang.Integer port)
                                                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getClientTransportFactory

          public static ITransportFactory getClientTransportFactory(org.apache.hadoop.conf.Configuration conf)

Copyright © 2018 The Apache Software Foundation