bq. 150.142.11
The address above seem to be missing one octet.
bq. org.apache.spark.examples/HdfsTest
The slash should be a dot.
Cheers
On Mon, Feb 15, 2016 at 5:53 PM, Ashok Kumar wrote:
> Thank you sir it is spark-examples-1.5.2-hadoop2.6.0.jar in mine
>
> Can you please tell me how to run with spark-submit correctly as I did
>
> spark-shell --master spark:///150.142.11:7077 --class
> org.apache.spark.examples/HdfsTest
> $SPARK_HOME/lib/spark-examples-1.5.2-hadoop2.6.0.jar
>
> ava.lang.ClassNotFoundException: org.apache.spark.examples/HdfsTest
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:270)
> at org.apache.spark.util.Utils$.classForName(Utils.scala:173)
> at
> org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:641)
> at
> org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
> at
> org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
> at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
> at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
>
> thanks
>
>
>
>
> On Tuesday, 16 February 2016, 1:33, Ted Yu wrote:
>
>
> Here is the path to the examples jar in 1.6.0 release:
>
> ./lib/spark-examples-1.6.0-hadoop2.6.0.jar
>
> On Mon, Feb 15, 2016 at 5:30 PM, Ted Yu wrote:
>
> If you don't modify HdfsTest.scala, there is no need to rebuild it - it is
> contained in the examples jar coming with Spark release.
>
> You can use spark-submit to run the example.
>
> Cheers
>
> On Mon, Feb 15, 2016 at 5:24 PM, Ashok Kumar > wrote:
>
> Gurus,
>
> I am trying to run some examples given under directory examples
>
> spark/examples/src/main/scala/org/apache/spark/examples/
>
> I am trying to run HdfsTest.scala
>
> However, when I run HdfsTest.scala against spark shell it comes back with
> error
>
> Spark context available as sc.
> SQL context available as sqlContext.
> Loading HdfsTest.scala...
> :19: error: illegal start of definition
>package org.apache.spark.examples
>^
> import org.apache.spark._
> defined module HdfsTest
>
> scala>
>
> Can someone guide me how to run these Ccala codes without errors? Do I
> need to compile them first with scalac -cp $CLASSPATH HdfsTest.scala
>
> Thanking you
>
>
>
>
>
>