> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/install/9.3-install/using-spark-submit-cp/modify-the-sample-spark-submit-job/run-the-sample-spark-submit-job.md).

# Run the sample Spark Submit job

Complete the following steps to run the sample Spark Submit job:

1. Open the Spark PI job entry.

   Spark PI is the name given to the Spark Submit job entry in the sample.
2. Indicate the path to the spark-submit utility in the **Spark Submit Utility** field.

   It is located where you installed the Spark client.
3. Indicate the path to your Spark examples JAR file (either the local version or the one on the cluster in the HDFS) in the **Application Jar** field.

   The Word Count example is in this JAR.
4. In the **Class Name** field, add the following: `org.apache.spark.examples.JavaWordCount`.
5. We recommend that you set the **Master URL** to `yarn-client`.

   To read more about other execution modes, see the [Submitting Applications article in the Spark documentation](https://spark.apache.org/docs/2.3.2/submitting-applications.html).
6. In the **Arguments** field, indicate the path to the file you want to run Word Count on.
7. Click **OK**.
8. Save the job.
9. Run the job.

As the Spark Submit job entry runs, you will see the results of the word count program in the Execution pane.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/install/9.3-install/using-spark-submit-cp/modify-the-sample-spark-submit-job/run-the-sample-spark-submit-job.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
