forked from datastax/spark-cassandra-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: use proper URIs (subpackages of com.datastax.driver.spark)
- Loading branch information
Showing
3 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ Load data into the table: | |
Now you can read that table as `RDD`: | ||
|
||
val rdd = sc.cassandraTable("test", "words") | ||
// rdd: com.datastax.driver.spark.CassandraRDD[com.datastax.driver.spark.CassandraRow] = CassandraRDD[0] at RDD at CassandraRDD.scala:41 | ||
// rdd: com.datastax.driver.spark.rdd.CassandraRDD[com.datastax.driver.spark.rdd.reader.CassandraRow] = CassandraRDD[0] at RDD at CassandraRDD.scala:41 | ||
|
||
rdd.toArray.foreach(println) | ||
// CassandraRow{word: bar, count: 20} | ||
|
@@ -41,7 +41,7 @@ Continuing with the previous example, follow these steps to access individual co | |
Store the first item of the rdd in the firstRow value. | ||
|
||
val firstRow = rdd.first | ||
// firstRow: com.datastax.driver.spark.CassandraRow = CassandraRow{word: bar, count: 20} | ||
// firstRow: com.datastax.driver.spark.rdd.reader.CassandraRow = CassandraRow{word: bar, count: 20} | ||
|
||
Get the number of columns and column names: | ||
|
||
|
@@ -85,7 +85,7 @@ In the test keyspace, set up a collection set using cqlsh: | |
Then in your application, retrieve the first row: | ||
|
||
val row = sc.cassandraTable("test", "users").first | ||
// row: com.datastax.driver.spark.CassandraRow = CassandraRow{username: someone, emails: [[email protected], [email protected]]} | ||
// row: com.datastax.driver.spark.rdd.reader.CassandraRow = CassandraRow{username: someone, emails: [[email protected], [email protected]]} | ||
|
||
Query the collection set in Cassandra from Spark: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters