You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by me...@apache.org on 2018/07/23 18:57:39 UTC
[beam-site] branch asf-site updated (7cbd122 -> e26fcbe)
This is an automated email from the ASF dual-hosted git repository.
mergebot-role pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/beam-site.git.
from 7cbd122 Prepare repository for deployment.
add 0a13ed8 Update Java Quickstart for Windows
add 580b7eb Update quickstart-java.md
add 55244af This closes #503
new e26fcbe Prepare repository for deployment.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
content/get-started/quickstart-java/index.html | 93 +++++++++++++++++++++-
src/get-started/quickstart-java.md | 102 +++++++++++++++++++++++++
2 files changed, 193 insertions(+), 2 deletions(-)
[beam-site] 01/01: Prepare repository for deployment.
Posted by me...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mergebot-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/beam-site.git
commit e26fcbe915094063eae2d65f1dd9dfa40bdaac54
Author: Mergebot <me...@apache.org>
AuthorDate: Mon Jul 23 18:57:37 2018 +0000
Prepare repository for deployment.
---
content/get-started/quickstart-java/index.html | 93 +++++++++++++++++++++++++-
1 file changed, 91 insertions(+), 2 deletions(-)
diff --git a/content/get-started/quickstart-java/index.html b/content/get-started/quickstart-java/index.html
index eb293de..2a3993a 100644
--- a/content/get-started/quickstart-java/index.html
+++ b/content/get-started/quickstart-java/index.html
@@ -229,7 +229,7 @@ limitations under the License.
<p>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:</p>
-<div class="highlighter-rouge"><pre class="highlight"><code>$ mvn archetype:generate \
+<div class="shell-unix highlighter-rouge"><pre class="highlight"><code>$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.beam \
-DarchetypeArtifactId=beam-sdks-java-maven-archetypes-examples \
-DarchetypeVersion=2.5.0 \
@@ -241,9 +241,21 @@ limitations under the License.
</code></pre>
</div>
+<div class="shell-PowerShell highlighter-rouge"><pre class="highlight"><code>PS> mvn archetype:generate `
+ -D archetypeGroupId=org.apache.beam `
+ -D archetypeArtifactId=beam-sdks-java-maven-archetypes-examples `
+ -D archetypeVersion=2.5.0 `
+ -D groupId=org.example `
+ -D artifactId=word-count-beam `
+ -D version="0.1" `
+ -D package=org.apache.beam.examples `
+ -D interactiveMode=false
+</code></pre>
+</div>
+
<p>This will create a directory <code class="highlighter-rouge">word-count-beam</code> that contains a simple <code class="highlighter-rouge">pom.xml</code> and a series of example pipelines that count words in text files.</p>
-<div class="highlighter-rouge"><pre class="highlight"><code>$ cd word-count-beam/
+<div class="shell-unix highlighter-rouge"><pre class="highlight"><code>$ cd word-count-beam/
$ ls
pom.xml src
@@ -254,6 +266,32 @@ MinimalWordCount.java WordCount.java
</code></pre>
</div>
+<div class="shell-PowerShell highlighter-rouge"><pre class="highlight"><code>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
+</code></pre>
+</div>
+
<p>For a detailed introduction to the Beam concepts used in these examples, see the <a href="/get-started/wordcount-example">WordCount Example Walkthrough</a>. Here, we’ll just focus on executing <code class="highlighter-rouge">WordCount.java</code>.</p>
<h2 id="run-wordcount">Run WordCount</h2>
@@ -274,11 +312,18 @@ MinimalWordCount.java WordCount.java
<li>Run your first WordCount pipeline.</li>
</ol>
+<p>For Unix shells:</p>
+
<div class="runner-direct highlighter-rouge"><pre class="highlight"><code>$ mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount \
-Dexec.args="--inputFile=pom.xml --output=counts" -Pdirect-runner
</code></pre>
</div>
+<div class="runner-direct-powershell highlighter-rouge"><pre class="highlight"><code>PS> mvn compile exec:java -D exec.mainClass=org.apache.beam.examples.WordCount `
+ -D exec.args="--inputFile=pom.xml --output=counts" -P direct-runner
+</code></pre>
+</div>
+
<div class="runner-apex highlighter-rouge"><pre class="highlight"><code>$ mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount \
-Dexec.args="--inputFile=pom.xml --output=counts --runner=ApexRunner" -Papex-runner
</code></pre>
@@ -316,6 +361,50 @@ $ mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount \
-Dexec.args="--inputFile=pom.xml --output=/tmp/counts --runner=SamzaRunner" -Psamza-runner
</code></pre>
</div>
+<p>For Windows PowerShell:</p>
+
+<div class="runner-direct highlighter-rouge"><pre class="highlight"><code>PS> mvn compile exec:java -D exec.mainClass=org.apache.beam.examples.WordCount `
+ -D exec.args="--inputFile=pom.xml --output=counts" -P direct-runner
+</code></pre>
+</div>
+
+<div class="runner-apex highlighter-rouge"><pre class="highlight"><code>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
+</code></pre>
+</div>
+
+<div class="runner-flink-local highlighter-rouge"><pre class="highlight"><code>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
+</code></pre>
+</div>
+
+<div class="runner-flink-cluster highlighter-rouge"><pre class="highlight"><code>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
+</code></pre>
+</div>
+
+<div class="runner-spark highlighter-rouge"><pre class="highlight"><code>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
+</code></pre>
+</div>
+
+<div class="runner-dataflow highlighter-rouge"><pre class="highlight"><code>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
+</code></pre>
+</div>
+
+<div class="runner-samza-local highlighter-rouge"><pre class="highlight"><code>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
+</code></pre>
+</div>
<h2 id="inspect-the-results">Inspect the results</h2>