Skip to content

Instantly share code, notes, and snippets.

@hisea
Forked from hkhamm/install_connector.sh
Last active December 14, 2016 01:12
Show Gist options
  • Save hisea/ba625c3ea5943f20b98da09a13036b90 to your computer and use it in GitHub Desktop.
Save hisea/ba625c3ea5943f20b98da09a13036b90 to your computer and use it in GitHub Desktop.
Install the Spark Cassandra Connector
#!/bin/bash
# Installs the spark-cassandra-connector and support libs
mkdir /usr/local/opt/connector
cd /usr/local/opt/connector
rm *.jar
curl -o ivy-2.4.0.jar \
'https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar'
curl -o spark-cassandra-connector_2.10-2.0.0-M3.jar \
'https://repo1.maven.org/maven2/com/datastax/spark/spark-cassandra-connector_2.10/2.0.0-M3/spark-cassandra-connector_2.10-2.0.0-M3.jar'
java -jar ivy-2.4.0.jar -dependency org.apache.cassandra cassandra-thrift 3.9 -retrieve "[artifact]-[revision](-[classifier]).[ext]"
java -jar ivy-2.4.0.jar -dependency com.datastax.cassandra cassandra-driver-core 3.1.2 -retrieve "[artifact]-[revision](-[classifier]).[ext]"
java -jar ivy-2.4.0.jar -dependency joda-time joda-time 2.9.6 -retrieve "[artifact]-[revision](-[classifier]).[ext]"
java -jar ivy-2.4.0.jar -dependency org.joda joda-convert 1.8.1 -retrieve "[artifact]-[revision](-[classifier]).[ext]"
rm -f *-{sources,javadoc}.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment