Spark- Saving JavaRDD to Cassandra -


http://www.datastax.com/dev/blog/accessing-cassandra-from-spark-in-java

the link above shows way save javardd cassandra in way:

import static com.datastax.spark.connector.cassandrajavautil.*;  javardd<product> productsrdd = sc.parallelize(products); javafunctions(productsrdd, product.class).savetocassandra("java_api", "products"); 

but com.datastax.spark.connector.cassandrajavautil.* seems deprecated. updated api should be:

import static com.datastax.spark.connector.japi.cassandrajavautil.*; 

can show me codes store javardd cassandra using updated api above?

following documentation, should this:

javafunctions(rdd).writerbuilder("ks", "people", maptorow(person.class)).savetocassandra(); 

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -