I wanted to change a column mapping to be append. Is there a better way to customize the column mappings with Spark Cassandra Connector in Java than the following?
ColumnName song_id = new ColumnName("song_id", Option.empty()); CollectionColumnName key_codes = new ColumnName("key_codes", Option.empty()).append(); List<ColumnRef> collectionColumnNames = Arrays.asList(song_id, key_codes); scala.collection.Seq<ColumnRef> columnRefSeq = JavaApiHelper.toScalaSeq(collectionColumnNames); javaFunctions(songStream) .writerBuilder("demo", "song", mapToRow(PianoSong.class)) .withColumnSelector(new SomeColumns(columnRefSeq)) .saveToCassandra(); This is taken from this Spark Streaming code sample.