Skip to content

pompomgood/SparkCassandraSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Preparing example Cassandra schema

Create a simple keyspace and table in Cassandra. Run the following statements in cqlsh:

CREATE KEYSPACE spark_cassandra_test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 };
CREATE TABLE spark_cassandra_test.kv(key text PRIMARY KEY, value int);

Then insert some example data:

INSERT INTO spark_cassandra_test.kv(key, value) VALUES ('key1', 1);
INSERT INTO spark_cassandra_test.kv(key, value) VALUES ('key2', 2);

Build

clean compile assembly:single

Run

$SPARK_HOME/bin/spark-submit --verbose --class com.fuhu.server.test.spark.spark.cassandra.App /where/your/jar/spark-cassandra-0.0.1-SNAPSHOT-jar-with-dependencies.jar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages