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: 127.0.1.1; using 10.0.0.46 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/log4j-defaults.properties
Pi is roughly 3.146355731778659

Last updated