# 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://george-jen.gitbook.io/data-science-and-apache-spark/run-scala-code-with-apache-spark.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
