scalaapache-sparkcloudera-cdhcloudera-manager

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.

  1. How can I run the file(file.spark) which contain spark commands.
  2. Is there any way to run/compile the scala programs in CDH 5.2 without sbt?

Solution

  • To load an external file from spark-shell simply do

    :load PATH_TO_FILE
    

    This will call everything in your file.

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