Last active
August 29, 2015 14:14
-
-
Save gabhi/28ba120597cf4233014c to your computer and use it in GitHub Desktop.
cassandra 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
./spark-shell --jars ./spark-cassandra-connector_2.10-1.1.1.jar --driver-class-path $(echo /Users/agaikw1/spark-cassandra-connector/spark-cassandra-connector-java/target/scala-2.10/*.jar |sed 's/ /:/g') | |
import com.datastax.spark.connector._, org.apache.spark.SparkContext, org.apache.spark.SparkContext._, org.apache.spark.SparkConf | |
val conf = new SparkConf(true).set("spark.cassandra.connection.host", "localhost") | |
val sc = new SparkContext("local[4]", "gemc_dev", conf) | |
val test_spark_rdd = sc.cassandraTable("keyspace_name", "table_name") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment