I've been working some on building spark blueprints, and recently tried to
generalize one for easy blueprints of spark apps.

https://github.com/jayunit100/SparkBlueprint.git

It runs the spark app's main method in a unit test, and builds in SBT.

You can easily try it out and improve on it.

Obviously, calling a main method is the wrong kind of coupling for a unit
test, but it works pretty good in a simple CI environment.

I'll improve it eventually by injecting the SparkContext and validating the
RDD directly, in a next iteration.

Pull requests welcome :)





On Tue, Jul 29, 2014 at 11:29 AM, soumick86 <sdasgu...@dstsystems.com>
wrote:

> Is there any example out there for unit testing a Spark application in
> Java?
> Even a trivial application like word count will be very helpful. I am very
> new to this and I am struggling to understand how I can use JavaSpark
> Context for JUnit
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/Unit-Testing-JUnit-with-Spark-tp10861.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>



-- 
jay vyas

Reply via email to