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
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SSL_STORAGE_PORT |
static int |
DEFAULT_STORAGE_PORT |
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) |
static java.lang.String |
getInternodeEncryption(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 java.lang.String |
getServerCipherSuites(org.apache.hadoop.conf.Configuration conf) |
static java.lang.String |
getServerKeystore(org.apache.hadoop.conf.Configuration conf) |
static java.lang.String |
getServerKeystorePassword(org.apache.hadoop.conf.Configuration conf) |
static java.lang.String |
getServerTruststore(org.apache.hadoop.conf.Configuration conf) |
static java.lang.String |
getServerTruststorePassword(org.apache.hadoop.conf.Configuration conf) |
static int |
getSSLStoragePort(org.apache.hadoop.conf.Configuration conf) |
static int |
getStoragePort(org.apache.hadoop.conf.Configuration conf) |
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) |
static void |
setInternodeEncryption(org.apache.hadoop.conf.Configuration conf,
java.lang.String encrypt) |
static void |
setServerCipherSuites(org.apache.hadoop.conf.Configuration conf,
java.lang.String cipherSuites) |
static void |
setServerKeystore(org.apache.hadoop.conf.Configuration conf,
java.lang.String keystore) |
static void |
setServerKeystorePassword(org.apache.hadoop.conf.Configuration conf,
java.lang.String keystorePass) |
static void |
setServerTruststore(org.apache.hadoop.conf.Configuration conf,
java.lang.String truststore) |
static void |
setServerTruststorePassword(org.apache.hadoop.conf.Configuration conf,
java.lang.String truststorePass) |
static void |
setSSLStoragePort(org.apache.hadoop.conf.Configuration conf,
int port) |
static void |
setStoragePort(org.apache.hadoop.conf.Configuration conf,
int port) |
checkOutputSpecs, checkOutputSpecs, getIgnoreHosts, getOutputCommitter, setIgnoreHosts, setIgnoreHosts
public static final int DEFAULT_STORAGE_PORT
public static final int DEFAULT_SSL_STORAGE_PORT
@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 void setStoragePort(org.apache.hadoop.conf.Configuration conf, int port)
public static void setSSLStoragePort(org.apache.hadoop.conf.Configuration conf, int port)
public static void setInternodeEncryption(org.apache.hadoop.conf.Configuration conf, java.lang.String encrypt)
public static void setServerKeystore(org.apache.hadoop.conf.Configuration conf, java.lang.String keystore)
public static void setServerKeystorePassword(org.apache.hadoop.conf.Configuration conf, java.lang.String keystorePass)
public static void setServerTruststore(org.apache.hadoop.conf.Configuration conf, java.lang.String truststore)
public static void setServerTruststorePassword(org.apache.hadoop.conf.Configuration conf, java.lang.String truststorePass)
public static void setServerCipherSuites(org.apache.hadoop.conf.Configuration conf, java.lang.String cipherSuites)
public static int getStoragePort(org.apache.hadoop.conf.Configuration conf)
public static int getSSLStoragePort(org.apache.hadoop.conf.Configuration conf)
public static java.lang.String getInternodeEncryption(org.apache.hadoop.conf.Configuration conf)
public static java.lang.String getServerKeystore(org.apache.hadoop.conf.Configuration conf)
public static java.lang.String getServerTruststore(org.apache.hadoop.conf.Configuration conf)
public static java.lang.String getServerKeystorePassword(org.apache.hadoop.conf.Configuration conf)
public static java.lang.String getServerTruststorePassword(org.apache.hadoop.conf.Configuration conf)
public static java.lang.String getServerCipherSuites(org.apache.hadoop.conf.Configuration conf)
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 © 2017 The Apache Software Foundation