Ramakrishna Ramakrishna - 1 year ago 174
Scala Question

Spark : how to run spark file from spark shell

I am using CDH 5.2. I am able to use spark-shell to run the commands. how can i run the file(file.spark) which contain spark commands. Second, is there any way to run/compile the scala programs in CDH 5.2 without sbt?

Thanks in advance,

Answer Source

To load an external file from spark-shell simply do


This will call everything in your file.

I don't have a solution for your SBT question though sorry :-)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download