public class CqlBulkRecordWriter extends AbstractBulkRecordWriter<java.lang.Object,java.util.List<java.nio.ByteBuffer>>
CqlBulkRecordWriter maps the output <key, value>
pairs to a Cassandra column family. In particular, it applies the binded variables
in the value to the prepared statement, which it associates with the key, and in
turn the responsible endpoint.
Furthermore, this writer groups the cql queries by the endpoint responsible for the rows being affected. This allows the cql queries to be executed in parallel, directly to a responsible endpoint.
CqlBulkOutputFormat| Modifier and Type | Class and Description |
|---|---|
static class |
CqlBulkRecordWriter.ExternalClient |
AbstractBulkRecordWriter.NullOutputHandlerBUFFER_SIZE_IN_MB, bufferSize, conf, context, loader, MAX_FAILED_HOSTS, maxFailures, OUTPUT_LOCATION, progress, STREAM_THROTTLE_MBITS, writer| Modifier and Type | Method and Description |
|---|---|
void |
write(java.lang.Object key,
java.util.List<java.nio.ByteBuffer> values)
The column values must correspond to the order in which
they appear in the insert stored procedure.
|
close, close, getOutputLocationpublic void write(java.lang.Object key,
java.util.List<java.nio.ByteBuffer> values)
throws java.io.IOException
write in interface org.apache.hadoop.mapred.RecordWriter<java.lang.Object,java.util.List<java.nio.ByteBuffer>>write in class org.apache.hadoop.mapreduce.RecordWriter<java.lang.Object,java.util.List<java.nio.ByteBuffer>>key - any object or null.values - the values to write.java.io.IOExceptionCopyright © 2015 The Apache Software Foundation