Run interactive notebooks with Spark and Scala

Databricks

ref:
https://databricks.com
https://docs.databricks.com/user-guide/notebooks/index.html

Zeppelin

$ brew install apache-zeppelin
$ zeppelin-daemon.sh start
$ zeppelin-daemon.sh stop

$ cd /usr/local/Cellar/apache-zeppelin/0.7.2/libexec/
$ cp conf/zeppelin-env.sh.template conf/zeppelin-env.sh
# export SPARK_HOME="/usr/local/share/apache-spark/spark-2.1.0"
# export ZEPPELIN_NOTEBOOK_DIR="/Users/vinta/Projects/albedo/notebooks"

$ cd /usr/local/Cellar/apache-zeppelin/0.7.2/libexec/
$ tail -fn 500 zeppelin-interpreter-spark-vinta-Asurada.local.log
$ tail -fn 500 zeppelin-vinta-Asurada.local.log

# Zeppelin UI
$ open http://localhost:8080/

# Spark UI
$ open http://localhost:4040/jobs/

ref:
http://zeppelin.apache.org/docs/0.7.1/manual/interpreterinstallation.html
http://zeppelin.apache.org/docs/0.7.1/install/configuration.html
http://zeppelin.apache.org/docs/0.7.1/interpreter/spark.html

Jupyter

$ git clone https://github.com/apache/incubator-toree
$ cd incubator-toree/

# this might take a very long time
$ APACHE_SPARK_VERSION=2.1.0 make pip-release
$ pip install dist/toree-pip/toree-0.2.0.dev1.tar.gz

$ jupyter toree install --replace --spark_home=$SPARK_HOME --kernel_name="Spark"
$ jupyter notebook

ref:
http://blog.thedataincubator.com/2017/04/spark-2-0-on-jupyter-with-toree/