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 <[email protected]> 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... > <console>: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 >
