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:
1
$SPARK_HOME/bin/spark-submit --class com.jentekco.spark.pi pi.jar
2
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)
3
19/12/21 21:03:20 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address
4
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
5
Pi is roughly 3.146355731778659
Copied!
Last modified 1yr ago
Copy link