public class RDDJavaFunctions<T> extends RDDAndDStreamCommonJavaFunctions<T>
Modifier and Type | Method and Description |
---|---|
void |
saveToCassandra(java.lang.String keyspace,
java.lang.String table,
com.datastax.spark.connector.writer.RowWriterFactory<T> rowWriterFactory)
Saves the data from the underlying
RDD or DStream to a Cassandra table. |
void |
saveToCassandra(java.lang.String keyspace,
java.lang.String table,
java.lang.String[] columnNames,
int batchSize,
com.datastax.spark.connector.writer.RowWriterFactory<T> rowWriterFactory)
Saves the data from the underlying
RDD or DStream to a Cassandra table in batches of given size. |
void |
saveToCassandra(java.lang.String keyspace,
java.lang.String table,
java.lang.String[] columnNames,
com.datastax.spark.connector.writer.RowWriterFactory<T> rowWriterFactory)
Saves the data from the underlying
RDD or DStream to a Cassandra table. |
saveToCassandra, saveToCassandra, saveToCassandra, saveToCassandra, saveToCassandra, saveToCassandra, saveToCassandra, saveToCassandra, saveToCassandra
public final org.apache.spark.rdd.RDD<T> rdd
public void saveToCassandra(java.lang.String keyspace, java.lang.String table, com.datastax.spark.connector.writer.RowWriterFactory<T> rowWriterFactory)
RDDAndDStreamCommonJavaFunctions
RDD
or DStream
to a Cassandra table.
This method works just like RDDAndDStreamCommonJavaFunctions.saveToCassandra(String, String)
.
It additionally allows the specification of a factory of custom RowWriter
.
By default, a factory of DefaultRowWriter
is used together with
an underlying JavaBeanColumnMapper
.
If the underlying data source is a DStream
, all generated RDDs will be saved
to Cassandra as if this method was called on each of them.saveToCassandra
in class RDDAndDStreamCommonJavaFunctions<T>
RDDAndDStreamCommonJavaFunctions.saveToCassandra(String, String)
public void saveToCassandra(java.lang.String keyspace, java.lang.String table, java.lang.String[] columnNames, com.datastax.spark.connector.writer.RowWriterFactory<T> rowWriterFactory)
RDDAndDStreamCommonJavaFunctions
RDD
or DStream
to a Cassandra table.
This method works just like RDDAndDStreamCommonJavaFunctions.saveToCassandra(String, String, String[])
.
It additionally allows the specification of a factory of custom RowWriter
.
By default, a factory of DefaultRowWriter
is used together with
an underlying JavaBeanColumnMapper
.
If the underlying data source is a DStream
, all generated RDDs will be saved
to Cassandra as if this method was called on each of them.saveToCassandra
in class RDDAndDStreamCommonJavaFunctions<T>
RDDAndDStreamCommonJavaFunctions.saveToCassandra(String, String, String[])
public void saveToCassandra(java.lang.String keyspace, java.lang.String table, java.lang.String[] columnNames, int batchSize, com.datastax.spark.connector.writer.RowWriterFactory<T> rowWriterFactory)
RDDAndDStreamCommonJavaFunctions
RDD
or DStream
to a Cassandra table in batches of given size.
This method works just like RDDAndDStreamCommonJavaFunctions.saveToCassandra(String, String, String[], int)
.
It additionally allows the specification of a factory of custom RowWriter
.
By default, a factory of DefaultRowWriter
is used together with
an underlying JavaBeanColumnMapper
.
If the underlying data source is a DStream
, all generated RDDs will be saved
to Cassandra as if this method was called on each of them.saveToCassandra
in class RDDAndDStreamCommonJavaFunctions<T>
RDDAndDStreamCommonJavaFunctions.saveToCassandra(String, String, String[], int)