[ 
https://issues.apache.org/jira/browse/BEAM-4471?focusedWorklogId=126239&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-126239
 ]

ASF GitHub Bot logged work on BEAM-4471:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Jul/18 18:57
            Start Date: 23/Jul/18 18:57
    Worklog Time Spent: 10m 
      Work Description: asfgit closed pull request #503: [BEAM-4471] Update 
Java Quickstart for Windows
URL: https://github.com/apache/beam-site/pull/503
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/get-started/quickstart-java.md 
b/src/get-started/quickstart-java.md
index acdcd2976..8c3cd9383 100644
--- a/src/get-started/quickstart-java.md
+++ b/src/get-started/quickstart-java.md
@@ -41,6 +41,7 @@ This Quickstart will walk you through executing your first 
Beam pipeline to run
 
 The easiest way to get a copy of the WordCount pipeline is to use the 
following command to generate a simple Maven project that contains Beam's 
WordCount examples and builds against the most recent Beam release:
 
+{:.shell-unix}
 ```
 $ mvn archetype:generate \
       -DarchetypeGroupId=org.apache.beam \
@@ -53,8 +54,23 @@ $ mvn archetype:generate \
       -DinteractiveMode=false
 ```
 
+{:.shell-PowerShell}
+```
+PS> mvn archetype:generate `
+ -D archetypeGroupId=org.apache.beam `
+ -D archetypeArtifactId=beam-sdks-java-maven-archetypes-examples `
+ -D archetypeVersion={{ site.release_latest }} `
+ -D groupId=org.example `
+ -D artifactId=word-count-beam `
+ -D version="0.1" `
+ -D package=org.apache.beam.examples `
+ -D interactiveMode=false
+```
+
+
 This will create a directory `word-count-beam` that contains a simple 
`pom.xml` and a series of example pipelines that count words in text files.
 
+{:.shell-unix}
 ```
 $ cd word-count-beam/
 
@@ -66,6 +82,33 @@ DebuggingWordCount.java      WindowedWordCount.java  common
 MinimalWordCount.java  WordCount.java
 ```
 
+{:.shell-PowerShell}
+```
+PS> cd .\word-count-beam
+
+PS> dir
+
+... 
+ 
+Mode                LastWriteTime         Length Name                          
                              
+----                -------------         ------ ----                          
                              
+d-----        7/19/2018  11:00 PM                src                           
                              
+-a----        7/19/2018  11:00 PM          16051 pom.xml
+
+PS> dir .\src\main\java\org\apache\beam\examples
+
+...
+Mode                LastWriteTime         Length Name                          
                              
+----                -------------         ------ ----                          
                              
+d-----        7/19/2018  11:00 PM                common                        
                              
+d-----        7/19/2018  11:00 PM                complete                      
                              
+d-----        7/19/2018  11:00 PM                subprocess                    
                              
+-a----        7/19/2018  11:00 PM           7073 DebuggingWordCount.java       
                              
+-a----        7/19/2018  11:00 PM           5945 MinimalWordCount.java         
                              
+-a----        7/19/2018  11:00 PM           9490 WindowedWordCount.java        
                              
+-a----        7/19/2018  11:00 PM           7662 WordCount.java
+```
+
 For a detailed introduction to the Beam concepts used in these examples, see 
the [WordCount Example Walkthrough]({{ site.baseurl 
}}/get-started/wordcount-example). Here, we'll just focus on executing 
`WordCount.java`.
 
 
@@ -82,12 +125,20 @@ After you've chosen which runner you'd like to use:
     1. Choosing input files and an output location are accessible on the 
chosen runner. (For example, you can't access a local file if you are running 
the pipeline on an external cluster.)
 1.  Run your first WordCount pipeline.
 
+For Unix shells:
+
 {:.runner-direct}
 ```
 $ mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount \
      -Dexec.args="--inputFile=pom.xml --output=counts" -Pdirect-runner
 ```
 
+{:.runner-direct-powershell}
+```
+PS> mvn compile exec:java -D exec.mainClass=org.apache.beam.examples.WordCount 
`
+ -D exec.args="--inputFile=pom.xml --output=counts" -P direct-runner
+```
+
 {:.runner-apex}
 ```
 $ mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount \
@@ -131,6 +182,57 @@ $ mvn compile exec:java 
-Dexec.mainClass=org.apache.beam.examples.WordCount \
 $ mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount \
      -Dexec.args="--inputFile=pom.xml --output=/tmp/counts 
--runner=SamzaRunner" -Psamza-runner
 ```
+For Windows PowerShell:
+
+{:.runner-direct}
+```
+PS> mvn compile exec:java -D exec.mainClass=org.apache.beam.examples.WordCount 
`
+ -D exec.args="--inputFile=pom.xml --output=counts" -P direct-runner
+```
+
+{:.runner-apex}
+```
+PS> mvn compile exec:java -D exec.mainClass=org.apache.beam.examples.WordCount 
`
+ -D exec.args="--inputFile=pom.xml --output=counts --runner=ApexRunner" -P 
apex-runner
+```
+
+{:.runner-flink-local}
+```
+PS> mvn compile exec:java -D exec.mainClass=org.apache.beam.examples.WordCount 
`
+ -D exec.args="--runner=FlinkRunner --inputFile=pom.xml --output=counts" -P 
flink-runner
+```
+
+{:.runner-flink-cluster}
+```
+PS> mvn package exec:java -D exec.mainClass=org.apache.beam.examples.WordCount 
`
+ -D exec.args="--runner=FlinkRunner --flinkMaster=<flink master> 
--filesToStage=.\target\word-count-beam-bundled-0.1.jar `
+               --inputFile=C:\path\to\quickstart\pom.xml 
--output=C:\tmp\counts" -P flink-runner
+
+You can monitor the running job by visiting the Flink dashboard at 
http://<flink master>:8081
+```
+
+{:.runner-spark}
+```
+PS> mvn compile exec:java -D exec.mainClass=org.apache.beam.examples.WordCount 
`
+ -D exec.args="--runner=SparkRunner --inputFile=pom.xml --output=counts" -P 
spark-runner
+```
+
+{:.runner-dataflow}
+```
+Make sure you complete the setup steps at 
https://beam.apache.org/documentation/runners/dataflow/#setup
+
+PS> mvn compile exec:java -D exec.mainClass=org.apache.beam.examples.WordCount 
`
+ -D exec.args="--runner=DataflowRunner --project=<your-gcp-project> `
+               --gcpTempLocation=gs://<your-gcs-bucket>/tmp `
+               --inputFile=gs://apache-beam-samples/shakespeare/* 
--output=gs://<your-gcs-bucket>/counts" `
+ -P dataflow-runner
+```
+
+{:.runner-samza-local}
+```
+PS> mvn compile exec:java -D exec.mainClass=org.apache.beam.examples.WordCount 
`
+     -D exec.args="--inputFile=pom.xml --output=/tmp/counts 
--runner=SamzaRunner" -P samza-runner
+```
 
 ## Inspect the results
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 126239)
    Time Spent: 1h  (was: 50m)

> Documentation for Windows SDK users
> -----------------------------------
>
>                 Key: BEAM-4471
>                 URL: https://issues.apache.org/jira/browse/BEAM-4471
>             Project: Beam
>          Issue Type: New Feature
>          Components: website
>            Reporter: Udi Meiri
>            Assignee: Rafael Fernandez
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> This is a request to document how to use Apache Beam on Windows machines.
> At minimum, add Windows-specific steps to the Java quickstart guide:
> [https://beam.apache.org/get-started/quickstart-java/]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to