Skip to content

Commit

Permalink
fix examples on website (#31066)
Browse files Browse the repository at this point in the history
* add DataflowRunner in wordCount run command with Gradle

add DataflowRunner in wordCount run command with Gradle

* Update dataflow.md to update mvn package and run commands

Update dataflow.md to update mvn package and run commands
  • Loading branch information
rajkgupt authored Apr 22, 2024
1 parent 49da7a3 commit 516ac97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions website/www/site/content/en/documentation/runners/dataflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Then, add the mainClass name in the Maven JAR plugin.
{{< /highlight >}}

{{< paragraph class="language-java" >}}
After running <code>mvn package</code>, run <code>ls target</code> and you should see (assuming your artifactId is `beam-examples` and the version is 1.0.0) the following output.
After running <code>mvn package -Pdataflow-runner</code>, run <code>ls target</code> and you should see (assuming your artifactId is `beam-examples` and the version is 1.0.0) the following output.
{{< /paragraph >}}

{{< highlight java >}}
Expand All @@ -117,7 +117,8 @@ java -jar target/beam-examples-bundled-1.0.0.jar \
--runner=DataflowRunner \
--project=<YOUR_GCP_PROJECT_ID> \
--region=<GCP_REGION> \
--tempLocation=gs://<YOUR_GCS_BUCKET>/temp/
--tempLocation=gs://<YOUR_GCS_BUCKET>/temp/ \
--output=gs://<YOUR_GCS_BUCKET>/output
{{< /highlight >}}

## Pipeline options for the Cloud Dataflow Runner {#pipeline-options}
Expand Down
2 changes: 1 addition & 1 deletion website/www/site/content/en/get-started/quickstart-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ TODO: document Spark on Gradle: https://github.com/apache/beam/issues/21502
{{< runner dataflow >}}
gradle clean execute -DmainClass=org.apache.beam.examples.WordCount \
--args="--project=<your-gcp-project> --inputFile=gs://apache-beam-samples/shakespeare/* \
--output=gs://<your-gcs-bucket>/counts" -Pdataflow-runner
--output=gs://<your-gcs-bucket>/counts --runner=DataflowRunner" -Pdataflow-runner
{{< /runner >}}
{{< runner samza>}}
TODO: document Samza on Gradle: https://github.com/apache/beam/issues/21500
Expand Down

0 comments on commit 516ac97

Please sign in to comment.