title: spark-submit for a .scala file
body: <p>I have been running some test spark scala code using probably a bad way of doing things with spark-shell:</p>
  
  <pre><code>spark-shell --conf spark.neo4j.bolt.password=Stuffffit --packages neo4j-contrib:neo4j-spark-connector:2.0.0-M2,graphframes:graphframes:0.2.0-spark2.0-s_2.11 -i neo4jsparkCluster.scala 
  </code></pre>
  
  <p>This would execute my code on spark and pop into the shell when done.</p>
  
  <p>Now that I am trying to run this on a cluster, I think I need to use spark-submit, to which I thought would be:</p>
  
  <pre><code>spark-submit --conf spark.neo4j.bolt.password=Stuffffit --packages neo4j-contrib:neo4j-spark-connector:2.0.0-M2,graphframes:graphframes:0.2.0-spark2.0-s_2.11 -i neo4jsparkCluster.scala 
  </code></pre>
  
  <p>but it does not like the .scala file, somehow does it have to be compiled into a class?    the scala code is a simple scala file with several helper classes defined in it and no real main class so to speak.   I don't see int he help files but maybe I am missing it, can I just spark-submit a file or do I have to somehow give it the class?  Thus changing my scala code?</p>
  
  <p>I did add this to my scala code too:</p>
  
  <p>went from this</p>
  
  <pre><code>val conf = new SparkConf.setMaster("local").setAppName("neo4jspark")
  
  
  val sc = new SparkContext(conf)  
  </code></pre>
  
  <p>To this:</p>
  
  <pre><code>val sc = new SparkContext(new SparkConf().setMaster("spark://192.20.0.71:7077")
  </code></pre>