You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by MasterSergius <ma...@gmail.com> on 2015/08/20 19:07:04 UTC

Run scala code with spark submit

Is there any possibility to run standalone scala program via spark submit? Or
I have always put it in some packages, build it with maven (or sbt)?

What if I have just simple program, like that example word counter? 
Could anyone please, show it on this simple test file Greeting.scala:



It comiles with scalac, runs with scala. Now I want to run in with spark (I
can get these files via wget, for example)





So, how I can run via spark-submit one-filer scala program?



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Run-scala-code-with-spark-submit-tp24367.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Re: Run scala code with spark submit

Posted by Dean Wampler <de...@gmail.com>.
I haven't tried it, but scala-shell should work if you give it a scala
"script" file, since it's basically a wrapper around the Scala REPL.

dean

On Thursday, August 20, 2015, MasterSergius <ma...@gmail.com>
wrote:

> Is there any possibility to run standalone scala program via spark submit?
> Or
> I have always put it in some packages, build it with maven (or sbt)?
>
> What if I have just simple program, like that example word counter?
> Could anyone please, show it on this simple test file Greeting.scala:
>
>
>
> It comiles with scalac, runs with scala. Now I want to run in with spark (I
> can get these files via wget, for example)
>
>
>
>
>
> So, how I can run via spark-submit one-filer scala program?
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/Run-scala-code-with-spark-submit-tp24367.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org <javascript:;>
> For additional commands, e-mail: user-help@spark.apache.org <javascript:;>
>
>

-- 
Dean Wampler, Ph.D.
Author: Programming Scala, 2nd Edition
<http://shop.oreilly.com/product/0636920033073.do> (O'Reilly)
Typesafe <http://typesafe.com>
@deanwampler <http://twitter.com/deanwampler>
http://polyglotprogramming.com