Skip to content

Instantly share code, notes, and snippets.

View jacek-lewandowski's full-sized avatar
🤪

Jacek Lewandowski jacek-lewandowski

🤪
  • DataStax
  • Warsaw
  • 03:51 (UTC +01:00)
  • X @JacekLew
View GitHub Profile
ursus-major:spark-cassandra-connector jlewandowski$ git fetch
ursus-major:spark-cassandra-connector jlewandowski$ git checkout SPARKC-247
Switched to branch 'SPARKC-247'
Your branch is up-to-date with 'origin/SPARKC-247'.
ursus-major:spark-cassandra-connector jlewandowski$ git pull origin SPARKC-247
From https://github.com/datastax/spark-cassandra-connector
* branch SPARKC-247 -> FETCH_HEAD
Already up-to-date.
ursus-major:spark-cassandra-connector jlewandowski$ dev/run-real-tests.sh 1.4.0 2.10
Compiling everything and packaging against Scala 2.10
@jacek-lewandowski
jacek-lewandowski / JavaDemo.java
Last active January 3, 2024 08:14
Java API for Spark Cassandra Connector - tutorial for blog post
package com.datastax.spark.demo;
import com.datastax.driver.core.Session;
import com.datastax.spark.connector.cql.CassandraConnector;
import com.google.common.base.Optional;
import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaPairRDD;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.api.java.function.FlatMapFunction;
14/08/01 19:23:01 INFO core.Cluster: New Cassandra host /198.18.102.132:9042 added
14/08/01 19:23:01 INFO core.Cluster: New Cassandra host /198.18.102.160:9042 added
14/08/01 19:23:01 INFO core.Cluster: New Cassandra host /198.18.102.143:9042 added
14/08/01 19:23:01 INFO core.Cluster: New Cassandra host /198.18.102.149:9042 added
14/08/01 19:23:01 INFO core.Cluster: New Cassandra host /198.18.102.146:9042 added
14/08/01 19:23:01 INFO core.Cluster: New Cassandra host /198.18.102.135:9042 added
14/08/01 19:23:01 INFO core.Cluster: New Cassandra host /198.18.102.152:9042 added
14/08/01 19:23:01 INFO core.Cluster: New Cassandra host /198.18.102.142:9042 added
14/08/01 19:23:01 INFO core.Cluster: New Cassandra host /198.18.102.138:9042 added
14/08/01 19:23:01 INFO core.Cluster: New Cassandra host /198.18.102.144:9042 added