Skip to content

Commit

Permalink
opensource stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
stlowenthal committed May 11, 2016
1 parent 46982f7 commit a9bb57e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions kernel/src/universal/bin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@ SPARKKERNEL="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"

ASSEMBLYJAR=$(echo $SPARKKERNEL/lib/kernel-assembly-*.jar)

SPARK_HOME=`echo 'import os; print os.environ["SPARK_HOME"]' | dse pyspark`
# TODO - STEVE - fix pyspark for opensource
# SPARK_HOME=`echo 'import os; print os.environ["SPARK_HOME"]' | dse pyspark`

if [ `uname` == "Darwin" ]; then
JUPYTER_CONFIGS=$HOME/Library/Jupyter/kernels
else
JUPYTER_CONFIGS=$HOME/.local/share/jupyter/kernels
fi

PY4J=$(ls $SPARK_HOME/python/lib/py4j*.zip)
# TODO - Steve - fix pyspark for opensource
# PY4J=$(ls $SPARK_HOME/python/lib/py4j*.zip)

SPARKLOCAL="$JUPYTER_CONFIGS/spark-dse-local"
SPARKCLUSTER="$JUPYTER_CONFIGS/spark-dse-cluster"
PYSPARKLOCAL="$JUPYTER_CONFIGS/pyspark-dse-local"
PYSPARKCLUSTER="$JUPYTER_CONFIGS/pyspark-dse-cluster"


## File resource doesn't work correctly here because it writes a byte-order mark on the file
## and python can't then parse it

Expand All @@ -35,10 +36,11 @@ cat >$SPARKLOCAL/kernel.json <<EOF
"display_name": "Spark-DSE Local",
"language": "scala",
"argv": [
"dse",
"spark-submit",
"--master",
"local[*]",
"--packages",
"datastax:spark-cassandra-connector:1.6.0-M2-s_2.10",
"$ASSEMBLYJAR",
"com.ibm.spark.SparkKernel",
"--profile",
Expand All @@ -55,8 +57,9 @@ cat <<EOF >$SPARKCLUSTER/kernel.json
"display_name": "Spark-DSE Cluster",
"language": "scala",
"argv": [
"dse",
"spark-submit",
"--packages",
"datastax:spark-cassandra-connector:1.6.0-M2-s_2.10",
"$ASSEMBLYJAR",
"com.ibm.spark.SparkKernel",
"--profile",
Expand All @@ -66,6 +69,9 @@ cat <<EOF >$SPARKCLUSTER/kernel.json
}
EOF

exit 0


mkdir -p $PYSPARKLOCAL
echo "Creating file $PYSPARKLOCAL/kernel.json"
cat <<EOF >$PYSPARKLOCAL/kernel.json
Expand Down
2 changes: 1 addition & 1 deletion project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object Common {
val repoEndpoint = Properties.envOrElse("REPO_ENDPOINT", if(snapshot) "/nexus/content/repositories/snapshots/" else "/nexus/content/repositories/releases/")
val repoUrl = Properties.envOrElse("REPO_URL", s"http://${repoHost}:${repoPort}${repoEndpoint}")

private val versionNumber = "0.1.6.0-cassandra"
private val versionNumber = "0.1.6.0-opensource"
private val buildOrganization = "com.ibm.spark"
private val buildVersion =
if (snapshot) s"$versionNumber-SNAPSHOT"
Expand Down

0 comments on commit a9bb57e

Please sign in to comment.