/** * Creates a writer builder object with specified parameters. * * <p>Writer builder is used to configure parameters write operation and eventually save the data to Cassandra. By * default the builder is configured to save all the columns with default connector and Spark Cassandra Connector * default parameters.</p> * * <p>To obtain an instance of {@link com.datastax.spark.connector.writer.RowWriterFactory} use one of utility * methods in {@link com.datastax.spark.connector.japi.CassandraJavaUtil}.</p> * * @param keyspaceName the target keyspace name * @param tableName the target table name * @param rowWriterFactory a row writer factory to be used to save objects from RDD or DStream * * @return an instance of {@link com.datastax.spark.connector.japi.RDDAndDStreamCommonJavaFunctions.WriterBuilder} * * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(com.datastax.spark.connector.mapper.ColumnMapper) * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(Class, java.util.Map) * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(Class, org.apache.commons.lang3.tuple.Pair[]) */ public WriterBuilder writerBuilder(String keyspaceName, String tableName, RowWriterFactory<T> rowWriterFactory) { return new WriterBuilder(keyspaceName, tableName, rowWriterFactory, allColumns, defaultConnector(), defaultWriteConf()); }
/** * Returns the default write configuration instance for the wrapped RDD or DStream. * * @return an instance of {@link com.datastax.spark.connector.writer.WriteConf} */ public WriteConf defaultWriteConf() { return WriteConf.fromSparkConf(getConf()); }
/** * Creates a writer builder object with specified parameters. * * <p>Writer builder is used to configure parameters write operation and eventually save the data to Cassandra. By * default the builder is configured to save all the columns with default connector and Spark Cassandra Connector * default parameters.</p> * * <p>To obtain an instance of {@link com.datastax.spark.connector.writer.RowWriterFactory} use one of utility * methods in {@link com.datastax.spark.connector.japi.CassandraJavaUtil}.</p> * * @param keyspaceName the target keyspace name * @param tableName the target table name * @param rowWriterFactory a row writer factory to be used to save objects from RDD or DStream * * @return an instance of {@link com.datastax.spark.connector.japi.RDDAndDStreamCommonJavaFunctions.WriterBuilder} * * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(com.datastax.spark.connector.mapper.ColumnMapper) * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(Class, java.util.Map) * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(Class, org.apache.commons.lang3.tuple.Pair[]) */ public WriterBuilder writerBuilder(String keyspaceName, String tableName, RowWriterFactory<T> rowWriterFactory) { return new WriterBuilder(keyspaceName, tableName, rowWriterFactory, allColumns, defaultConnector(), defaultWriteConf()); }
/** * Returns the default write configuration instance for the wrapped RDD or DStream. * * @return an instance of {@link com.datastax.spark.connector.writer.WriteConf} */ public WriteConf defaultWriteConf() { return WriteConf.fromSparkConf(getConf()); }
/** * @deprecated this method will be removed in future release, please use {@link #writerBuilder(String, String, * com.datastax.spark.connector.writer.RowWriterFactory)} */ @Deprecated public void saveToCassandra(String keyspace, String table, RowWriterFactory<T> rowWriterFactory, ColumnSelector columnNames) { new WriterBuilder(keyspace, table, rowWriterFactory, columnNames, defaultConnector(), defaultWriteConf()).saveToCassandra(); }
/** * Returns the default write configuration instance for the wrapped RDD or DStream. * * @return an instance of {@link com.datastax.spark.connector.writer.WriteConf} */ public WriteConf defaultWriteConf() { return WriteConf.fromSparkConf(getConf()); }
/** * Creates a writer builder object with specified parameters. * * <p>Writer builder is used to configure parameters write operation and eventually save the data to Cassandra. By * default the builder is configured to save all the columns with default connector and Spark Cassandra Connector * default parameters.</p> * * <p>To obtain an instance of {@link com.datastax.spark.connector.writer.RowWriterFactory} use one of utility * methods in {@link com.datastax.spark.connector.japi.CassandraJavaUtil}.</p> * * @param keyspaceName the target keyspace name * @param tableName the target table name * @param rowWriterFactory a row writer factory to be used to save objects from RDD or DStream * * @return an instance of {@link com.datastax.spark.connector.japi.RDDAndDStreamCommonJavaFunctions.WriterBuilder} * * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(com.datastax.spark.connector.mapper.ColumnMapper) * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(Class, java.util.Map) * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(Class, org.apache.commons.lang3.tuple.Pair[]) */ public WriterBuilder writerBuilder(String keyspaceName, String tableName, RowWriterFactory<T> rowWriterFactory) { return new WriterBuilder(keyspaceName, tableName, rowWriterFactory, allColumns, defaultConnector(), defaultWriteConf()); }
/** * Returns the default write configuration instance for the wrapped RDD or DStream. * * @return an instance of {@link com.datastax.spark.connector.writer.WriteConf} */ public WriteConf defaultWriteConf() { return WriteConf.fromSparkConf(getConf()); }
/** * @deprecated this method will be removed in future release, please use {@link #writerBuilder(String, String, * com.datastax.spark.connector.writer.RowWriterFactory)} */ @Deprecated public void saveToCassandra(String keyspace, String table, RowWriterFactory<T> rowWriterFactory, ColumnSelector columnNames) { new WriterBuilder(keyspace, table, rowWriterFactory, columnNames, defaultConnector(), defaultWriteConf()).saveToCassandra(); }
/** * Returns the default write configuration instance for the wrapped RDD or DStream. * * @return an instance of {@link com.datastax.spark.connector.writer.WriteConf} */ public WriteConf defaultWriteConf() { return WriteConf.fromSparkConf(getConf()); }
/** * @deprecated this method will be removed in future release, please use {@link #writerBuilder(String, String, * com.datastax.spark.connector.writer.RowWriterFactory)} */ @Deprecated public void saveToCassandra(String keyspace, String table, RowWriterFactory<T> rowWriterFactory, ColumnSelector columnNames) { new WriterBuilder(keyspace, table, rowWriterFactory, columnNames, defaultConnector(), defaultWriteConf()).saveToCassandra(); }
/** * Creates a writer builder object with specified parameters. * * <p>Writer builder is used to configure parameters write operation and eventually save the data to Cassandra. By * default the builder is configured to save all the columns with default connector and Spark Cassandra Connector * default parameters.</p> * * <p>To obtain an instance of {@link com.datastax.spark.connector.writer.RowWriterFactory} use one of utility * methods in {@link com.datastax.spark.connector.japi.CassandraJavaUtil}.</p> * * @param keyspaceName the target keyspace name * @param tableName the target table name * @param rowWriterFactory a row writer factory to be used to save objects from RDD or DStream * * @return an instance of {@link com.datastax.spark.connector.japi.RDDAndDStreamCommonJavaFunctions.WriterBuilder} * * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(com.datastax.spark.connector.mapper.ColumnMapper) * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(Class, java.util.Map) * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(Class, org.apache.commons.lang3.tuple.Pair[]) */ public WriterBuilder writerBuilder(String keyspaceName, String tableName, RowWriterFactory<T> rowWriterFactory) { return new WriterBuilder(keyspaceName, tableName, rowWriterFactory, allColumns, defaultConnector(), defaultWriteConf()); }
/** * Creates a writer builder object with specified parameters. * * <p>Writer builder is used to configure parameters write operation and eventually save the data to Cassandra. By * default the builder is configured to save all the columns with default connector and Spark Cassandra Connector * default parameters.</p> * * <p>To obtain an instance of {@link com.datastax.spark.connector.writer.RowWriterFactory} use one of utility * methods in {@link com.datastax.spark.connector.japi.CassandraJavaUtil}.</p> * * @param keyspaceName the target keyspace name * @param tableName the target table name * @param rowWriterFactory a row writer factory to be used to save objects from RDD or DStream * * @return an instance of {@link com.datastax.spark.connector.japi.RDDAndDStreamCommonJavaFunctions.WriterBuilder} * * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(com.datastax.spark.connector.mapper.ColumnMapper) * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(Class, java.util.Map) * @see com.datastax.spark.connector.japi.CassandraJavaUtil#mapToRow(Class, org.apache.commons.lang3.tuple.Pair[]) */ public WriterBuilder writerBuilder(String keyspaceName, String tableName, RowWriterFactory<T> rowWriterFactory) { return new WriterBuilder(keyspaceName, tableName, rowWriterFactory, allColumns, defaultConnector(), defaultWriteConf()); }
/** * @deprecated this method will be removed in future release, please use {@link #writerBuilder(String, String, * com.datastax.spark.connector.writer.RowWriterFactory)} */ @Deprecated public void saveToCassandra(String keyspace, String table, RowWriterFactory<T> rowWriterFactory, ColumnSelector columnNames) { new WriterBuilder(keyspace, table, rowWriterFactory, columnNames, defaultConnector(), defaultWriteConf()).saveToCassandra(); }
/** * @deprecated this method will be removed in future release, please use {@link #writerBuilder(String, String, * com.datastax.spark.connector.writer.RowWriterFactory)} */ @Deprecated public void saveToCassandra(String keyspace, String table, RowWriterFactory<T> rowWriterFactory, ColumnSelector columnNames) { new WriterBuilder(keyspace, table, rowWriterFactory, columnNames, defaultConnector(), defaultWriteConf()).saveToCassandra(); }