Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Scalac not working in spark

Scalac not working in spark

Explorer

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

5 REPLIES 5

Re: Scalac not working in spark

Master Collaborator
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.

Re: Scalac not working in spark

Explorer

Yes i am using spark-shell.  

 

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

 

 

 

Re: Scalac not working in spark

New Contributor

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?

Re: Scalac not working in spark

Master Collaborator
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.

Re: Scalac not working in spark

Explorer

OK, So how we get to SCALAC so we can do this? Is there no faciity in Cloudera?