Reply
Explorer
Posts: 10
Registered: ‎02-29-2016

Scalac not working in spark

Scalac command is not found when i try to run scala code in spark.

 

Syntax i tried : scalac test.scala

 

Help on how to run scala code in spark terminal or if anyother choices

Cloudera Employee
Posts: 366
Registered: ‎07-29-2013

Re: Scalac not working in spark

scalac is not part of Spark; it is the Scala compiler. It's not clear
what you mean by "Spark terminal", but the Spark shell is not a
command line, and not something related to scalac. It is a shell where
you type code, like the Scala shell.
Explorer
Posts: 10
Registered: ‎02-29-2016

Re: Scalac not working in spark

[ Edited ]

Yes i am using spark-shell.  

 

can we compile and run mutiples lines of scala code in spark shell like scalac filename  ?

 

 

 

New Contributor
Posts: 2
Registered: ‎11-12-2017

Re: Scalac not working in spark

I have the same problem.  Scalac does not seem to exist in the CDH download (even though scala does.)  I seached for scalac in the file explorere stating at the file system and the search found nothing.  How does one compile spark (.scala) programs in CDH?

Highlighted
Cloudera Employee
Posts: 461
Registered: ‎08-11-2014

Re: Scalac not working in spark

You don't, in general. The cluster is where you run rather than create software. It is more like the JRE env than JDK. Lots of compiler tools aren't available and generally on purpose.
Announcements