Skip to content

Commit

Permalink
Merge pull request #2093 from lossyrob/backport/1.1/2083
Browse files Browse the repository at this point in the history
[BACKPORT]: Ensure keyspace exists in CassandraRDDWriter
  • Loading branch information
lossyrob committed Mar 25, 2017
2 parents 2a2c628 + 161d881 commit 3a9493e
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -49,10 +49,10 @@ object CassandraRDDWriter {
implicit val sc = raster.sparkContext

val codec = KeyValueRecordCodec[K, V]
val schema = codec.schema

instance.withSessionDo {
_.execute(
instance.withSessionDo { session =>
instance.ensureKeyspaceExists(keyspace, session)
session.execute(
SchemaBuilder.createTable(keyspace, table).ifNotExists()
.addPartitionKey("key", bigint)
.addClusteringColumn("name", text)
Expand Down

0 comments on commit 3a9493e

Please sign in to comment.