Home > other >  Spark to run the example
Spark to run the example

Time:10-01

Everyone a great god, and I just started to learn the spark, it has been installed under unbuntu spark, but have not been able to run the spark own examples, such as SparkPi, appear this kind of circumstance:
CD @ ubuntu: ~/spark - 1.0.2/examples/SRC/main/scala/org/apache/spark/examples $run - example LocalPi. Scala local
Spark an assembly has had been built with Hive, o Datanucleus jars on the classpath
The Exception in the thread "main" Java. Lang. ClassNotFoundException: org. Apache. Spark. Examples. LocalPi. Scala
The at java.net.URLClassLoader$1.run URLClassLoader. Java: (217)
The at Java. Security. The AccessController. DoPrivileged (Native Method)
The at java.net.URLClassLoader.findClass URLClassLoader. Java: (205)
The at Java. Lang. This. LoadClass (323). This Java:
The at Java. Lang. This. LoadClass (268). This Java:
The at Java. Lang. Class. ForName0 (Native Method)
The at Java. Lang. Class.forname (270) Class. Java:
The at org. Apache. Spark. Deploy. SparkSubmit $. Launch (SparkSubmit. Scala: 300)
At org. Apache. Spark. Deploy. SparkSubmit $. The main (55) SparkSubmit. Scala:
The at org. Apache. Spark. Deploy. SparkSubmit. Main (SparkSubmit. Scala)
Please god help solve,,,

CodePudding user response:

SPARK_HOME directory
Bin/run - example org. Apache. Spark. Examples. LocalPi

CodePudding user response:

SPARK_HOME path is configured to execute the following command:
$SPARK_HOME/bin/run - example SparkPi 10
  • Related