Run Scala code with spark-submit

Run Scala code with Apache Spark

You can also scp or winscp to the Spark cluster elsewhere (on premise or in the cloud), such as in our Linux “production” spark cluster and run it with spark-submit:
$SPARK_HOME/bin/spark-submit --class com.jentekco.spark.pi pi.jar
19/12/21 21:03:20 WARN Utils: Your hostname, bigdata2 resolves to a loopback address:; using instead (on interface enp3s0)
19/12/21 21:03:20 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address
Using Spark's default log4j profile: org/apache/spark/
Pi is roughly 3.146355731778659