So I have installed Spark in the location /opt/spark/
(Ubuntu). I am trying to install Apache Toree in order to use Spark in the Jupyter notebooks. I believe the install locations for both Apache Spark and Toree need to be in the same directory but I can't pip install toree
into the same folder. So I am attaching the directory information where spark has been installed -
deep@deep-VirtualBox:~$ cd /opt/spark/
deep@deep-VirtualBox:/opt/spark$ ls
bin conf data examples jars kubernetes LICENSE licenses
logs NOTICE python R README.md RELEASE sbin work yarn
and the errors -
[I 01:40:14.396 LabApp] KernelRestarter: restarting kernel (4/5), keep random ports
Starting Spark Kernel with SPARK_HOME=/opt/spark/
21/01/27 01:40:16 WARN Utils: Your hostname, deep-VirtualBox resolves to a loopback address: 127.0.1.1; using 10.0.2.15 instead (on interface enp0s3)
21/01/27 01:40:16 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.spark.unsafe.Platform (file:/opt/spark/jars/spark-unsafe_2.12-3.0.1.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of org.apache.spark.unsafe.Platform
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
21/01/27 01:40:17 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Exception in thread "main" java.lang.NoClassDefFoundError: scala/App$class
at org.apache.toree.Main$.<init>(Main.scala:24)
at org.apache.toree.Main$.<clinit>(Main.scala)
at org.apache.toree.Main.main(Main.scala)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:928)
at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1007)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1016)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.ClassNotFoundException: scala.App$class
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 15 more
log4j:WARN No appenders could be found for logger (org.apache.spark.util.ShutdownHookManager).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[W 01:40:17.410 LabApp] KernelRestarter: restart failed
[W 01:40:17.410 LabApp] Kernel 5bac4936-6c30-45b3-bb78-c82469d58dd3 died, removing from map.
[W 01:40:56.400 LabApp] Timeout waiting for kernel_info reply from 5bac4936-6c30-45b3-bb78-c82469d58dd3
[E 01:40:56.401 LabApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: 5bac4936-6c30-45b3-bb78-c82469d58dd3)
Can any of you please help me out? I am probably doing something wrong here. Thanks for your inputs.
question from:
https://stackoverflow.com/questions/65908740/how-to-install-apache-toree-in-the-exact-location-where-i-installed-apache-spark 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…