Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix examples on website #31066

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need -Pdataflow-runner here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is required, as otherwise it gives error "Exception in thread "main" java.lang.IllegalArgumentException: Unknown 'runner' specified 'DataflowRunner', supported pipeline runners [DirectRunner, PortableRunner, TestUniversalRunner]"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @Abacn

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. -Pdataflow-runner is a flag for maven pprofile. It adds beam-runners-google-cloud-dataflow-java to classpath; --runner=DayaflowRinner is a pipeline option.

{{< /runner >}}
{{< runner samza>}}
TODO: document Samza on Gradle: https://github.com/apache/beam/issues/21500
Expand Down
Loading