You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/08/16 21:25:31 UTC

[GitHub] [beam] VeronicaWasson opened a new pull request, #22747: [WebSite] Add new Java quickstart

VeronicaWasson opened a new pull request, #22747:
URL: https://github.com/apache/beam/pull/22747

   Adds a new quickstart for Java based on https://github.com/apache/beam-starter-java
   
   This PR keeps the the original Java quickstart but renames it to "WordCount sample for Java"
   
   ------------------------
   
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/workflows/Go%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pcoet commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
pcoet commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r951944845


##########
website/www/site/content/en/get-started/quickstart-java.md:
##########
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-# Apache Beam Java SDK quickstart
+# WordCount sample for Java

Review Comment:
   Consider: "WordCount quickstart for Java"



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}
+var options = PipelineOptionsFactory.fromArgs(args).withValidation().as(Options.class);
+var pipeline = Pipeline.create(options);
+{{< /highlight >}}
+
+The `PipelineOptions` object lets you set various options for the pipeline. The
+`fromArgs` method shown in this example parses command-line arguments, which
+lets you set pipeline options through the command line.
+
+### Create an initial PCollection
+
+The `PCollection` abstraction represents a potentially distributed,
+multi-element data set. A Beam pipeline needs a source of data to populate an
+initial `PCollection`. The source can be bounded (with a known, fixed size) or
+unbounded (with unlimited size).
+
+This example uses the
+[`Create.of`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/transforms/Create.html)
+method to create a `PCollection` from an in-memory array of strings. The
+resulting `PCollection` contains the strings "Hello", "World!", and a
+user-provided input string.
+
+{{< highlight >}}
+return pipeline
+	.apply("Create elements", Create.of(Arrays.asList("Hello", "World!", inputText)))

Review Comment:
   Is this how @davidcavazos is spacing the example? I think in modern Java development we usually use 2 spaces for the first indent and 4 spaces for line wrapping: https://google.github.io/styleguide/javaguide.html#s4.2-block-indentation 



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:

Review Comment:
   See my comment above. I don't think we're quite ready to redirect this yet, especially given that the Dataflow getting started docs are still using the WordCount quickstarts.



##########
website/www/site/content/en/get-started/quickstart-java.md:
##########
@@ -1,5 +1,5 @@
 ---
-title: "Beam Quickstart for Java"
+title: "WordCount sample for Java"
 aliases:

Review Comment:
   We could also rename it "WordCount quickstart for Java" and not touch the filename. IMO, it's okay two have the old quickstarts and the new quickstarts live side-by-side for a while, especially because the Dataflow docs are still referring to the old WordCount quickstarts. We could just consider this a "soft" deprecation.



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}
+var options = PipelineOptionsFactory.fromArgs(args).withValidation().as(Options.class);
+var pipeline = Pipeline.create(options);
+{{< /highlight >}}
+
+The `PipelineOptions` object lets you set various options for the pipeline. The
+`fromArgs` method shown in this example parses command-line arguments, which
+lets you set pipeline options through the command line.
+
+### Create an initial PCollection
+
+The `PCollection` abstraction represents a potentially distributed,
+multi-element data set. A Beam pipeline needs a source of data to populate an
+initial `PCollection`. The source can be bounded (with a known, fixed size) or
+unbounded (with unlimited size).
+
+This example uses the
+[`Create.of`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/transforms/Create.html)
+method to create a `PCollection` from an in-memory array of strings. The
+resulting `PCollection` contains the strings "Hello", "World!", and a
+user-provided input string.
+
+{{< highlight >}}
+return pipeline
+	.apply("Create elements", Create.of(Arrays.asList("Hello", "World!", inputText)))
+{{< /highlight >}}
+
+### Apply a transform to the PCollection
+
+Transforms can change, filter, group, analyze, or otherwise process the
+elements in a `PCollection`. This example uses the
+[`MapElements`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/transforms/MapElements.html)
+transform, which maps the elements of a collection into a new collection:
+
+{{< highlight >}}
+.apply("Print elements",
+		MapElements.into(TypeDescriptors.strings()).via(x -> {

Review Comment:
   See question above about line wrapping and indents.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r954166236


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}
+# Instll sdkman
+curl -s "https://get.sdkman.io" | bash
+
+# Install Java 11
+sdk install java 11.0.12-tem

Review Comment:
   Nit: just checked and the latest version is `11.0.16-tem`, can we change it to that?
   
   It should still work, but it's always good to have a more updated version.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on PR #22747:
URL: https://github.com/apache/beam/pull/22747#issuecomment-1265723355

   > Needs to resolve conflicts
   
   Done!
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r960976407


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}

Review Comment:
   @davidcavazos  Is there anything else needed on this PR or is it OK to merge?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pcoet commented on pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
pcoet commented on PR #22747:
URL: https://github.com/apache/beam/pull/22747#issuecomment-1265803960

   Thanks @damccorm! And thanks all!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r953137328


##########
website/www/site/content/en/get-started/quickstart-java.md:
##########
@@ -1,5 +1,5 @@
 ---
-title: "Beam Quickstart for Java"
+title: "WordCount sample for Java"
 aliases:

Review Comment:
   Renamed to "WordCount quickstart" per @pcoet 's suggestion



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on PR #22747:
URL: https://github.com/apache/beam/pull/22747#issuecomment-1222999802

   It looks like the linter found some trailing spaces (spaces or tabs _after_ the last non-space character in a line).
   
   ```
   21:27:08 Running whitespacelint...
   21:27:29 ./website/www/site/content/en/get-started/quickstart/java.md:87:54: W201 Trailing whitespace
   21:27:41 ====================================================================================================
   21:27:41 Whitespacelint has found above issues.
   21:27:41 You can open the file with vim and remove trailing whitespaces by:
   21:27:41 vim -es -c ":%s/\s\+$//e" -c ":wq" "./website/www/site/content/en/get-started/quickstart/java.md"
   21:27:41 ====================================================================================================
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r955486646


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}

Review Comment:
   Maybe changing them to backtick blocks ` ``` ` would help? Maybe the `{{< highlight >}}` tag includes the newlines kind of like how `<code>` tags in HTML work?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r955489828


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}

Review Comment:
   If you mean in the rendered page, that seems to be the built-in styling (e.g. compare https://beam.apache.org/get-started/quickstart-java/#get-the-example-code)
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r951899351


##########
website/www/site/content/en/get-started/quickstart-java.md:
##########
@@ -1,5 +1,5 @@
 ---
-title: "Beam Quickstart for Java"
+title: "WordCount sample for Java"
 aliases:

Review Comment:
   Since this is no longer titled "Quickstart", maybe we should rename this file?



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the

Review Comment:
   Let's remove Java 8 since it's already end of life, so it's no longer supported.
   
   https://endoflife.date/java
   
   @kennknowles do you know if Beam already supports Java 17? From the docs it looks like it's [not supported yet](https://beam.apache.org/roadmap/java-sdk/).



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:

Review Comment:
   Can we make these (Gradle / Maven) into tabs?



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).

Review Comment:
   Again, with `sdkman` installing Gradle or Maven is really easy. Installing them manually is very painful, so I wouldn't send people through that route :)
   
   ```sh
   # To install Gradle.
   sdk install gradle
   
   # To install Maven.
   sdk install maven
   ```



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}

Review Comment:
   I believe it would be nice to include the language for the syntax highlighting (?)
   
   `{{< highlight java >}}`
   
   And same for other Java code snippets.



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:

Review Comment:
   We probably want to add `/get-started/quickstart-java/` to the aliases list here to redirect people from the "old quickstart".



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)

Review Comment:
   If using `sdkman`, it already takes care of this automatically.



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)

Review Comment:
   I personally use `sdkman` to install Java, it's a lot easier it install and it allows you to choose which vendor's SDK to install.
   
   https://sdkman.io/
   
   I believe their default choice is the Temurin flavor (not Oracle) since it's open source and production ready.
   
   https://sdkman.io/jdks#tem
   
   I would personally recommend this route since it's faster, easier, and the installation cannot go wrong.
   
   ```sh
   # Install sdkman.
   curl -s "https://get.sdkman.io" | bash
   
   # Install Java 11.
   sdk install java 11.0.12-tem
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r951940474


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:

Review Comment:
   I looked into that, actually, but I don't see a way. The existing ones are predefined.
   
   https://github.com/apache/beam/tree/master/website/www/site/layouts/shortcodes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r961844479


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}

Review Comment:
   I think it's good to merge. This is great, thank you!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r951922310


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:

Review Comment:
   Maybe @pcoet knows how to do tabs in Beam? :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damccorm merged pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
damccorm merged PR #22747:
URL: https://github.com/apache/beam/pull/22747


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on pull request #22747: [WebSite] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on PR #22747:
URL: https://github.com/apache/beam/pull/22747#issuecomment-1217182620

   R: kennknowles


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on PR #22747:
URL: https://github.com/apache/beam/pull/22747#issuecomment-1226563268

   R: @lukecwik 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r986000120


##########
website/www/site/layouts/partials/section-menu/en/get-started.html:
##########
@@ -19,9 +19,11 @@
   <ul class="section-nav-list">
     <li><a href="/get-started/try-apache-beam/">Try Apache Beam</a></li>
     <li><a href="/get-started/try-beam-playground/">Try Beam Playground (Beta)</a></li>
-    <li><a href="/get-started/quickstart-java/">Java quickstart</a></li>
+    <li><a href="/get-started/quickstart/java/">Java quickstart</a></li>
     <li><a href="/get-started/quickstart-py/">Python quickstart</a></li>
     <li><a href="/get-started/quickstart-go/">Go quickstart</a></li>
+    <li><a href="/get-started/quickstart-java/">WordCount quickstart for

Review Comment:
   Leaving for now per @pcoet 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r952890365


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}
+var options = PipelineOptionsFactory.fromArgs(args).withValidation().as(Options.class);
+var pipeline = Pipeline.create(options);
+{{< /highlight >}}
+
+The `PipelineOptions` object lets you set various options for the pipeline. The
+`fromArgs` method shown in this example parses command-line arguments, which
+lets you set pipeline options through the command line.
+
+### Create an initial PCollection
+
+The `PCollection` abstraction represents a potentially distributed,
+multi-element data set. A Beam pipeline needs a source of data to populate an
+initial `PCollection`. The source can be bounded (with a known, fixed size) or
+unbounded (with unlimited size).
+
+This example uses the
+[`Create.of`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/transforms/Create.html)
+method to create a `PCollection` from an in-memory array of strings. The
+resulting `PCollection` contains the strings "Hello", "World!", and a
+user-provided input string.
+
+{{< highlight >}}
+return pipeline
+	.apply("Create elements", Create.of(Arrays.asList("Hello", "World!", inputText)))

Review Comment:
   Good catch, yeah let's stick to the Java style guide.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r953143199


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}
+var options = PipelineOptionsFactory.fromArgs(args).withValidation().as(Options.class);
+var pipeline = Pipeline.create(options);
+{{< /highlight >}}
+
+The `PipelineOptions` object lets you set various options for the pipeline. The
+`fromArgs` method shown in this example parses command-line arguments, which
+lets you set pipeline options through the command line.
+
+### Create an initial PCollection
+
+The `PCollection` abstraction represents a potentially distributed,
+multi-element data set. A Beam pipeline needs a source of data to populate an
+initial `PCollection`. The source can be bounded (with a known, fixed size) or
+unbounded (with unlimited size).
+
+This example uses the
+[`Create.of`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/transforms/Create.html)
+method to create a `PCollection` from an in-memory array of strings. The
+resulting `PCollection` contains the strings "Hello", "World!", and a
+user-provided input string.
+
+{{< highlight >}}
+return pipeline
+	.apply("Create elements", Create.of(Arrays.asList("Hello", "World!", inputText)))

Review Comment:
   done



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}
+var options = PipelineOptionsFactory.fromArgs(args).withValidation().as(Options.class);
+var pipeline = Pipeline.create(options);
+{{< /highlight >}}
+
+The `PipelineOptions` object lets you set various options for the pipeline. The
+`fromArgs` method shown in this example parses command-line arguments, which
+lets you set pipeline options through the command line.
+
+### Create an initial PCollection
+
+The `PCollection` abstraction represents a potentially distributed,
+multi-element data set. A Beam pipeline needs a source of data to populate an
+initial `PCollection`. The source can be bounded (with a known, fixed size) or
+unbounded (with unlimited size).
+
+This example uses the
+[`Create.of`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/transforms/Create.html)
+method to create a `PCollection` from an in-memory array of strings. The
+resulting `PCollection` contains the strings "Hello", "World!", and a
+user-provided input string.
+
+{{< highlight >}}
+return pipeline
+	.apply("Create elements", Create.of(Arrays.asList("Hello", "World!", inputText)))
+{{< /highlight >}}
+
+### Apply a transform to the PCollection
+
+Transforms can change, filter, group, analyze, or otherwise process the
+elements in a `PCollection`. This example uses the
+[`MapElements`](https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/transforms/MapElements.html)
+transform, which maps the elements of a collection into a new collection:
+
+{{< highlight >}}
+.apply("Print elements",
+		MapElements.into(TypeDescriptors.strings()).via(x -> {

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r953138330


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)

Review Comment:
   That makes sense. I rewrote this section to use sdkman. (It's definitely simpler!)



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)

Review Comment:
   done



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r953137495


##########
website/www/site/content/en/get-started/quickstart-java.md:
##########
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-# Apache Beam Java SDK quickstart
+# WordCount sample for Java

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pcoet commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
pcoet commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r951934125


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}

Review Comment:
   If this is a Java-only tutorial, you can also use code fences: ```java ... ```: https://github.com/apache/beam/blob/master/website/www/site/content/en/documentation/sdks/java-multi-language-pipelines.md?plain=1#L79-L97 That looks a little cleaner, if you're not actually switching from Java to another SDK language.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r951935630


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)

Review Comment:
   I copied this section from our existing quickstart. 
   
   Qs:
   
   - Is it better to be agnostic about how customers install the JDK and Gradle/Maven? My assumption was anyone using Java already has a preference. OTOH your approach gives customers definite steps to follow.
   - If we show sdkman, will we have to keep the version # up-to-date?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r955490665


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}
+# Instll sdkman
+curl -s "https://get.sdkman.io" | bash
+
+# Install Java 11
+sdk install java 11.0.16-tem
+{{< /highlight >}}
+
+You can use either [Gradle](https://gradle.org/) or
+[Apache Maven](https://maven.apache.org/) to run this quickstart:
+
+{{< highlight >}}
+# Install Gradle
+sdk install gradle
+
+# Install Maven
+sdk install maven
+{{< /highlight >}}
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r955577284


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}

Review Comment:
   my $0.02: The existing docs also render like this, and use the same markup, so I'd vote to keep it this way for consistency. (Seems like an issue with the highlight.html shortcode rather than the markup in the doc.)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on PR #22747:
URL: https://github.com/apache/beam/pull/22747#issuecomment-1256436342

   Hi @kennknowles, this PR seems to be either ready to merge or very close. Are there any other comments on your side or are we good to merge? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r953137877


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:

Review Comment:
   Per @pcoet I'll leave this out for now



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pcoet commented on pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
pcoet commented on PR #22747:
URL: https://github.com/apache/beam/pull/22747#issuecomment-1265780923

   @pabloem @damccorm Can one of you help us merge this? We were waiting on approval from @kennknowles, and he signed off. @VeronicaWasson just fixed the outstanding merge conflict. Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on PR #22747:
URL: https://github.com/apache/beam/pull/22747#issuecomment-1223070651

   Overall it's looking great! I made some questions and minor comments, but other than that it looks great! Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r952886998


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)

Review Comment:
   I've gone through the manual installs and they're all pretty bad. The instructions are not consistent and it's easy to get something wrong (like not setting JAVA_HOME). Maven specifically has pretty bad documentation on how to install, Gradle isn't as bad.
   
   I think it's best to give an opinionated approach to install them, especially since it's _so much_ easier. We don't have to worry about keeping versions up to date, sdkman takes care of that. The only thing we have to make sure is that people install a compatible Java version (which I think it's currently only Java 11?).
   
   If they're already using Java and already have a Java development environment set up, they can safely skip those steps. They're there mostly for people who don't have it ready. We can say something like "If you don't have Java installed, a simple way to install it is with `sdkman`", or something along those lines. What do you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on pull request #22747: [WebSite] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on PR #22747:
URL: https://github.com/apache/beam/pull/22747#issuecomment-1217182325

   R: davidcavazos


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r958805742


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}

Review Comment:
   Yeah, no problem. Sounds good to me.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] kennknowles commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
kennknowles commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r955449759


##########
website/www/site/layouts/partials/section-menu/en/get-started.html:
##########
@@ -19,9 +19,11 @@
   <ul class="section-nav-list">
     <li><a href="/get-started/try-apache-beam/">Try Apache Beam</a></li>
     <li><a href="/get-started/try-beam-playground/">Try Beam Playground (Beta)</a></li>
-    <li><a href="/get-started/quickstart-java/">Java quickstart</a></li>
+    <li><a href="/get-started/quickstart/java/">Java quickstart</a></li>
     <li><a href="/get-started/quickstart-py/">Python quickstart</a></li>
     <li><a href="/get-started/quickstart-go/">Go quickstart</a></li>
+    <li><a href="/get-started/quickstart-java/">WordCount quickstart for

Review Comment:
   I say just wipe out the old one. Was there a decision to keep it? The use of maven archetypes is just weird and unhelpful.



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}

Review Comment:
   These highlight blocks have newlines before and after the listing making it look funny. Can they be removed?



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}
+# Instll sdkman
+curl -s "https://get.sdkman.io" | bash
+
+# Install Java 11
+sdk install java 11.0.16-tem
+{{< /highlight >}}
+
+You can use either [Gradle](https://gradle.org/) or
+[Apache Maven](https://maven.apache.org/) to run this quickstart:
+
+{{< highlight >}}
+# Install Gradle
+sdk install gradle
+
+# Install Maven
+sdk install maven
+{{< /highlight >}}
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.

Review Comment:
   `beam-starter-java`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pcoet commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
pcoet commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r951934125


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}

Review Comment:
   If this is a Java-only tutorial, you can also use code fences, as shown here: https://github.com/apache/beam/blob/master/website/www/site/content/en/documentation/sdks/java-multi-language-pipelines.md?plain=1#L79-L97 That looks a little cleaner, if you're not actually switching from Java to another SDK language.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pcoet commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
pcoet commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r951934125


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}

Review Comment:
   If this is a Java-only tutorial, you can also use code fences: ````java ... ````: https://github.com/apache/beam/blob/master/website/www/site/content/en/documentation/sdks/java-multi-language-pipelines.md?plain=1#L79-L97 That looks a little cleaner, if you're not actually switching from Java to another SDK language.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pcoet commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
pcoet commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r951936678


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:

Review Comment:
   I don't think we actually have a tab shortcode for Maven and Gradle, like the one we use for the runners, shells, and SDKs. You might actually have to touch the Hugo template and the JavaScript to make this work, unfortunately.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r954319151


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}
+# Instll sdkman
+curl -s "https://get.sdkman.io" | bash
+
+# Install Java 11
+sdk install java 11.0.12-tem

Review Comment:
   Fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pcoet commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
pcoet commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r955473678


##########
website/www/site/layouts/partials/section-menu/en/get-started.html:
##########
@@ -19,9 +19,11 @@
   <ul class="section-nav-list">
     <li><a href="/get-started/try-apache-beam/">Try Apache Beam</a></li>
     <li><a href="/get-started/try-beam-playground/">Try Beam Playground (Beta)</a></li>
-    <li><a href="/get-started/quickstart-java/">Java quickstart</a></li>
+    <li><a href="/get-started/quickstart/java/">Java quickstart</a></li>
     <li><a href="/get-started/quickstart-py/">Python quickstart</a></li>
     <li><a href="/get-started/quickstart-go/">Go quickstart</a></li>
+    <li><a href="/get-started/quickstart-java/">WordCount quickstart for

Review Comment:
   We're not quite ready to remove the old WordCount quickstarts yet. The Dataflow quickstarts are still based on the WordCount examples, so this needs to stay around a little longer.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] davidcavazos commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
davidcavazos commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r955499058


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,195 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+Use [`sdkman`](https://sdkman.io/) to install the Java Development Kit (JDK).
+
+{{< highlight >}}

Review Comment:
   Looking at the [staged page](http://apache-beam-website-pull-requests.storage.googleapis.com/22747/get-started/quickstart/java/index.html)
   it looks like the backtick blocks ` ``` ` do remove the extra spaces, but the "copy contents" button at the top right disappear.
   
   I don't think it's a big deal having the extra spaces. One thing to try could be having everything in the same line, but that would make the markdown a lot uglier.
   
   ```
   -- Instead of
   {{< highlight >}}
   code here
   {{< highlight >}}
   
   -- Would be something like this
   {{< highlight >}}code here{{< highlight >}}
   ```
   
   I suspect it might be parsing the tags like HTML tags. That could be a workaround but it could be pretty ugly. I'm okay with having the extra spaces and having cleaner code. What are your thoughts on it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] VeronicaWasson commented on a diff in pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
VeronicaWasson commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r953138621


##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}

Review Comment:
   Changed to use code fences



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] github-actions[bot] commented on pull request #22747: [Website] Add new Java quickstart

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #22747:
URL: https://github.com/apache/beam/pull/22747#issuecomment-1226564916

   Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org