org.apache.cassandra.hadoop.cql3

## Class CqlBulkOutputFormat

- java.lang.Object
- - org.apache.hadoop.mapreduce.OutputFormat<K,V>
  - - org.apache.cassandra.hadoop.AbstractBulkOutputFormat<java.lang.Object,java.util.List<java.nio.ByteBuffer>>
    - - org.apache.cassandra.hadoop.cql3.CqlBulkOutputFormat

- All Implemented Interfaces:
    org.apache.hadoop.mapred.OutputFormat<java.lang.Object,java.util.List<java.nio.ByteBuffer>>

      public class CqlBulkOutputFormat
      extends AbstractBulkOutputFormat<java.lang.Object,java.util.List<java.nio.ByteBuffer>>

  The `CqlBulkOutputFormat` acts as a Hadoop-specific OutputFormat that allows reduce tasks to store keys (and corresponding bound variable values) as CQL rows (and respective columns) in a given ColumnFamily.

  As is the case with the `org.apache.cassandra.hadoop.CqlOutputFormat`, you need to set the prepared statement in your Hadoop job Configuration. The `CqlConfigHelper` class, through its `ConfigHelper#setOutputPreparedStatement` method, is provided to make this simple. you need to set the Keyspace. The `ConfigHelper` class, through its `ConfigHelper.setOutputColumnFamily(org.apache.hadoop.conf.Configuration, java.lang.String)` method, is provided to make this simple.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.hadoop.AbstractBulkOutputFormat

      `AbstractBulkOutputFormat.NullOutputCommitter`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CqlBulkOutputFormat()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `getColumnFamilyInsertStatement(org.apache.hadoop.conf.Configuration conf, java.lang.String columnFamily)`
    `static java.lang.String` | `getColumnFamilySchema(org.apache.hadoop.conf.Configuration conf, java.lang.String columnFamily)`
    `static boolean` | `getDeleteSourceOnSuccess(org.apache.hadoop.conf.Configuration conf)`
    `CqlBulkRecordWriter` | `getRecordWriter(org.apache.hadoop.fs.FileSystem filesystem, org.apache.hadoop.mapred.JobConf job, java.lang.String name, org.apache.hadoop.util.Progressable progress)` Deprecated.
    `CqlBulkRecordWriter` | `getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)` Get the `RecordWriter` for the given task.
    `static void` | `setColumnFamilyInsertStatement(org.apache.hadoop.conf.Configuration conf, java.lang.String columnFamily, java.lang.String insertStatement)`
    `static void` | `setColumnFamilySchema(org.apache.hadoop.conf.Configuration conf, java.lang.String columnFamily, java.lang.String schema)`
    `static void` | `setDeleteSourceOnSuccess(org.apache.hadoop.conf.Configuration conf, boolean deleteSrc)`

    - ### Methods inherited from class org.apache.cassandra.hadoop.AbstractBulkOutputFormat

      `checkOutputSpecs, checkOutputSpecs, getOutputCommitter`

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

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

- - ### Constructor Detail

    - #### CqlBulkOutputFormat

          public CqlBulkOutputFormat()

  - ### Method Detail

    - #### getRecordWriter

          @Deprecated
          public CqlBulkRecordWriter getRecordWriter(org.apache.hadoop.fs.FileSystem filesystem,
                                                       org.apache.hadoop.mapred.JobConf job,
                                                       java.lang.String name,
                                                       org.apache.hadoop.util.Progressable progress)
                                              throws java.io.IOException

      Deprecated.
      Fills the deprecated OutputFormat interface for streaming.
      Throws:
        `java.io.IOException`

    - #### getRecordWriter

          public CqlBulkRecordWriter getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                              throws java.io.IOException,
                                                     java.lang.InterruptedException

      Get the `RecordWriter` for the given task.
      Specified by:
        `getRecordWriter` in class `org.apache.hadoop.mapreduce.OutputFormat<java.lang.Object,java.util.List<java.nio.ByteBuffer>>`
      Parameters:
        `context` - the information about the current task.
      Returns:
        a `RecordWriter` to write the output for the job.
      Throws:
        `java.io.IOException`
        `java.lang.InterruptedException`

    - #### setColumnFamilySchema

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

    - #### setColumnFamilyInsertStatement

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

    - #### getColumnFamilySchema

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

    - #### getColumnFamilyInsertStatement

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

    - #### setDeleteSourceOnSuccess

          public static void setDeleteSourceOnSuccess(org.apache.hadoop.conf.Configuration conf,
                                      boolean deleteSrc)

    - #### getDeleteSourceOnSuccess

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

Copyright © 2014 The Apache Software Foundation