There really is a way to get Toree to connect to a remote Spark cluster.
The easiest way I've discovered is to clone an existing Toree Scala / Python core and create a new Toree Scala / Python Remote core. That way you can be able to run locally or remotely.
Steps:
. Toree : /usr/local/share/jupyter/kernels/, :
cp -pr /usr/local/share/jupyter/kernels/apache_toree_scala/ /usr/local/share/jupyter/kernels/apache_toree_scala_remote/
kernel.json /usr/local/share/jupyter/kernels/apache_toree_scala_remote/ Spark __TOREE_SPARK_OPTS__. --master <path>, -num-executors, -executor-memory ..
Jupyter.
kernel.json :
{
"display_name": "Toree - Scala Remote",
"argv": [
"/usr/local/share/jupyter/kernels/apache_toree_scala_remote/bin/run.sh",
"--profile",
"{connection_file}"
],
"language": "scala",
"env": {
"PYTHONPATH": "/opt/spark/python:/opt/spark/python/lib/py4j-0.9-src.zip",
"SPARK_HOME": "/opt/spark",
"DEFAULT_INTERPRETER": "Scala",
"PYTHON_EXEC": "python",
"__TOREE_OPTS__": "",
"__TOREE_SPARK_OPTS__": "--master spark://192.168.0.255:7077 --deploy-mode client --num-executors 4 --executor-memory 4g --executor-cores 8 --packages com.databricks:spark-csv_2.10:1.4.0"
}
}