public class CqlBulkOutputFormat extends AbstractBulkOutputFormat<java.lang.Object,java.util.List<java.nio.ByteBuffer>>
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.
AbstractBulkOutputFormat.NullOutputCommitter
Constructor and Description |
---|
CqlBulkOutputFormat() |
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) |
checkOutputSpecs, checkOutputSpecs, getOutputCommitter
@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
java.io.IOException
public CqlBulkRecordWriter getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
RecordWriter
for the given task.getRecordWriter
in class org.apache.hadoop.mapreduce.OutputFormat<java.lang.Object,java.util.List<java.nio.ByteBuffer>>
context
- the information about the current task.RecordWriter
to write the output for the job.java.io.IOException
java.lang.InterruptedException
public static void setColumnFamilySchema(org.apache.hadoop.conf.Configuration conf, java.lang.String columnFamily, java.lang.String schema)
public static void setColumnFamilyInsertStatement(org.apache.hadoop.conf.Configuration conf, java.lang.String columnFamily, java.lang.String insertStatement)
public static java.lang.String getColumnFamilySchema(org.apache.hadoop.conf.Configuration conf, java.lang.String columnFamily)
public static java.lang.String getColumnFamilyInsertStatement(org.apache.hadoop.conf.Configuration conf, java.lang.String columnFamily)
public static void setDeleteSourceOnSuccess(org.apache.hadoop.conf.Configuration conf, boolean deleteSrc)
public static boolean getDeleteSourceOnSuccess(org.apache.hadoop.conf.Configuration conf)
Copyright © 2015 The Apache Software Foundation