Skip to content

Commit 276165a

Browse files
committed
[TOREE-487][TOREE-488] Remove PySpark and SparkR interpreters
Instead, please use a supported kernel such IPython or IRKernel Closes #166
1 parent 9ee665d commit 276165a

39 files changed

+8
-2112
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash - && \
2626
npm install -g bower
2727

2828
# for pyspark demos
29-
ENV APACHE_SPARK_VERSION 2.0.0
29+
ENV APACHE_SPARK_VERSION 2.2.0
3030

3131
RUN apt-get -y update && \
3232
apt-get -y install software-properties-common

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ dist: dist/toree
173173

174174
define JUPYTER_COMMAND
175175
pip install toree-$(BASE_VERSION).tar.gz
176-
jupyter toree install --interpreters=PySpark,SQL,Scala,SparkR
176+
jupyter toree install --interpreters=Scala,SQL
177177
cd /srv/toree/etc/examples/notebooks
178178
jupyter notebook --ip=* --no-browser
179179
endef
@@ -197,7 +197,7 @@ system-test: pip-release .system-test-image
197197
$(SYSTEM_TEST_IMAGE) \
198198
bash -c "(cd /srv/system-test-resources && python -m http.server 8000 &) && \
199199
rm -rf /home/jovyan/.local/share/jupyter/kernels/apache_toree_scala/ && \
200-
pip install /srv/toree-pip/toree*.tar.gz && jupyter toree install --interpreters=PySpark,Scala,SparkR && \
200+
pip install /srv/toree-pip/toree*.tar.gz && jupyter toree install --interpreters=Scala && \
201201
pip install nose jupyter_kernel_test && python /srv/test_toree.py"
202202

203203

build.sbt

+2-18
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ credentials in ThisBuild+= Credentials(Path.userHome / ".ivy2" / ".credentials")
122122
lazy val root = (project in file("."))
123123
.settings(name := "toree")
124124
.aggregate(
125-
macros,protocol,plugins,communication,kernelApi,client,scalaInterpreter,sqlInterpreter,pysparkInterpreter,sparkrInterpreter,kernel
125+
macros,protocol,plugins,communication,kernelApi,client,scalaInterpreter,sqlInterpreter,kernel
126126
)
127127
.dependsOn(
128-
macros,protocol,communication,kernelApi,client,scalaInterpreter,sqlInterpreter,pysparkInterpreter,sparkrInterpreter,kernel
128+
macros,protocol,communication,kernelApi,client,scalaInterpreter,sqlInterpreter,kernel
129129
)
130130

131131
/**
@@ -187,20 +187,6 @@ lazy val sqlInterpreter = (project in file("sql-interpreter"))
187187
.settings(name := "toree-sql-interpreter")
188188
.dependsOn(plugins, protocol, kernelApi, scalaInterpreter)
189189

190-
/**
191-
* Project represents the Python interpreter used by the Spark Kernel.
192-
*/
193-
lazy val pysparkInterpreter = (project in file("pyspark-interpreter"))
194-
.settings(name := "toree-pyspark-interpreter")
195-
.dependsOn(plugins, protocol, kernelApi)
196-
197-
/**
198-
* Project represents the R interpreter used by the Spark Kernel.
199-
*/
200-
lazy val sparkrInterpreter = (project in file("sparkr-interpreter"))
201-
.settings(name := "toree-sparkr-interpreter")
202-
.dependsOn(plugins, protocol, kernelApi)
203-
204190
/**
205191
* Project representing the kernel code for the Spark Kernel backend.
206192
*/
@@ -211,9 +197,7 @@ lazy val kernel = (project in file("kernel"))
211197
protocol % "test->test;compile->compile",
212198
communication % "test->test;compile->compile",
213199
kernelApi % "test->test;compile->compile",
214-
pysparkInterpreter % "test->test;compile->compile",
215200
scalaInterpreter % "test->test;compile->compile",
216-
sparkrInterpreter % "test->test;compile->compile",
217201
sqlInterpreter % "test->test;compile->compile"
218202
)
219203

etc/examples/notebooks/sqlcontext_sharing.ipynb

-155
This file was deleted.

etc/pip_install/toree/toreeapp.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@
2727
from jupyter_client.kernelspec import KernelSpec
2828

2929
INTERPRETER_LANGUAGES = {
30-
'PySpark' : 'python',
31-
'SparkR' : 'r',
32-
'SQL' : 'sql',
33-
'Scala' : 'scala'
30+
'Scala' : 'scala',
31+
'SQL' : 'sql'
3432
}
3533

3634
PYTHON_PATH = 'PYTHONPATH'
@@ -50,7 +48,7 @@ class ToreeInstall(InstallKernelSpec):
5048
jupyter toree install --spark_opts='--master=local[4]'
5149
jupyter toree install --kernel_name=toree_special
5250
jupyter toree install --toree_opts='--spark-context-initialization-mode none'
53-
jupyter toree install --interpreters=PySpark,SQL
51+
jupyter toree install --interpreters=SQL
5452
jupyter toree install --python=python
5553
'''
5654

etc/tools/.rat-excludes

-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818

1919
# Files from sparkr which should not be changed
2020
.lintr
21-
package-sparkR.sh
2221
.*md
23-
.*sparkr-interpreter/src/main/.*
2422
NAMESPACE
2523
DESCRIPTION
2624
.*gitignore

kernel/src/main/scala/org/apache/toree/boot/CommandLineOptions.scala

-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ class CommandLineOptions(args: Seq[String]) {
204204
private def interpreterPlugins: Option[java.util.List[String]] = {
205205
//val defaults = getAll(_default_interpreter_plugin).getOrElse(List())
206206
//val defaults = List[String](
207-
// "PySpark:org.apache.toree.kernel.interpreter.pyspark.PySparkInterpreter",
208-
// "SparkR:org.apache.toree.kernel.interpreter.sparkr.SparkRInterpreter",
209207
// "SQL:org.apache.toree.kernel.interpreter.sql.SqlInterpreter"
210208
//)
211209

pyspark-interpreter/build.sbt

-17
This file was deleted.

0 commit comments

Comments
 (0)