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/05/16 04:08:31 UTC
[beam-site] 01/04: Add Go SDK quickstart and minimal documentation
page
This is an automated email from the ASF dual-hosted git repository.
mergebot-role pushed a commit to branch mergebot
in repository https://gitbox.apache.org/repos/asf/beam-site.git
commit b040c928c11d3c515ae52603fe27c1208f7b1c86
Author: Henning Rohde <he...@google.com>
AuthorDate: Mon May 14 14:28:22 2018 -0700
Add Go SDK quickstart and minimal documentation page
---
src/_includes/section-menu/get-started.html | 1 +
src/_includes/section-menu/sdks.html | 11 +++++
src/documentation/index.md | 3 +-
src/documentation/sdks/go.md | 20 +++++++++
src/get-started/beam-overview.md | 3 +-
src/get-started/index.md | 2 +-
src/get-started/quickstart-go.md | 67 ++++++++++++++++++++++++++++
src/images/logos/sdks/go.png | Bin 0 -> 15475 bytes
src/index.md | 2 +
9 files changed, 106 insertions(+), 3 deletions(-)
diff --git a/src/_includes/section-menu/get-started.html b/src/_includes/section-menu/get-started.html
index e60ebd9..74a5a71 100644
--- a/src/_includes/section-menu/get-started.html
+++ b/src/_includes/section-menu/get-started.html
@@ -6,6 +6,7 @@
<ul class="section-nav-list">
<li><a href="{{ site.baseurl }}/get-started/quickstart-java/">Quickstart - Java</a></li>
<li><a href="{{ site.baseurl }}/get-started/quickstart-py/">Quickstart - Python</a></li>
+ <li><a href="{{ site.baseurl }}/get-started/quickstart-go/">Quickstart - Go</a></li>
</ul>
</li>
<li>
diff --git a/src/_includes/section-menu/sdks.html b/src/_includes/section-menu/sdks.html
index ddcd1e2..ed988fe 100644
--- a/src/_includes/section-menu/sdks.html
+++ b/src/_includes/section-menu/sdks.html
@@ -30,6 +30,17 @@
</li>
<li>
+ <span class="section-nav-list-title">Go SDK</span>
+ <ul class="section-nav-list">
+ <li><a href="{{ site.baseurl }}/documentation/sdks/go/">Go SDK overview</a></li>
+ <li><a href="https://godoc.org/github.com/apache/beam/sdks/go/pkg/beam" target="_blank">Go SDK API reference <img src="{{ site.baseurl }}/images/external-link-icon.png"
+ width="14" height="14"
+ alt="External link."></a>
+ </li>
+ </ul>
+</li>
+
+<li>
<span class="section-nav-list-title">DSLs</span>
<ul class="section-nav-list">
<li><a href="{{ site.baseurl }}/documentation/dsls/sql/">SQL</a></li>
diff --git a/src/documentation/index.md b/src/documentation/index.md
index d54543d..e7b36cc 100644
--- a/src/documentation/index.md
+++ b/src/documentation/index.md
@@ -32,6 +32,7 @@ Find status and reference information on all of the available Beam SDKs.
* [Java SDK]({{ site.baseurl }}/documentation/sdks/java/)
* [Python SDK]({{ site.baseurl }}/documentation/sdks/python/)
+* [Go SDK]({{ site.baseurl }}/documentation/sdks/go/)
## Runners
@@ -50,4 +51,4 @@ A Beam Runner runs a Beam pipeline on a specific (often distributed) data proces
Beam is designed to enable pipelines to be portable across different runners. However, given every runner has different capabilities, they also have different abilities to implement the core concepts in the Beam model. The [Capability Matrix]({{ site.baseurl }}/documentation/runners/capability-matrix/) provides a detailed comparison of runner functionality.
-Once you have chosen which runner to use, see that runner's page for more information about any initial runner-specific setup as well as any required or optional `PipelineOptions` for configuring it's execution. You may also want to refer back to the Quickstart for [Java]({{ site.baseurl }}/get-started/quickstart-java) or [Python]({{ site.baseurl }}/get-started/quickstart-py) for instructions on executing the sample WordCount pipeline.
+Once you have chosen which runner to use, see that runner's page for more information about any initial runner-specific setup as well as any required or optional `PipelineOptions` for configuring it's execution. You may also want to refer back to the Quickstart for [Java]({{ site.baseurl }}/get-started/quickstart-java), [Python]({{ site.baseurl }}/get-started/quickstart-py) or [Go]({{ site.baseurl }}/get-started/quickstart-go) for instructions on executing the sample WordCount pipeline.
diff --git a/src/documentation/sdks/go.md b/src/documentation/sdks/go.md
new file mode 100644
index 0000000..14891b1
--- /dev/null
+++ b/src/documentation/sdks/go.md
@@ -0,0 +1,20 @@
+---
+layout: section
+title: "Beam Go SDK"
+section_menu: section-menu/sdks.html
+permalink: /documentation/sdks/go/
+---
+# Apache Beam Go SDK
+
+The Go SDK for Apache Beam provides a simple, powerful API for building both batch and streaming parallel data processing pipelines. It is based on the following
+[design](https://s.apache.org/beam-go-sdk-design-rfc).
+
+## Get Started with the Go SDK
+
+Get started with the [Beam Go SDK quickstart]({{ site.baseurl }}/get-started/quickstart-go) to set up your development environment and run an example pipeline. Then, read through the [Beam programming guide]({{ site.baseurl }}/documentation/programming-guide) to learn the basic concepts that apply to all SDKs in Beam.
+
+See the [godoc](https://godoc.org/github.com/apache/beam/sdks/go/pkg/beam) for more detailed information.
+
+## Status
+
+The Go SDK is currently experimental, does not yet offer any compatibility guarantees and is not recommended for production usage. It supports most features, but not all.
diff --git a/src/get-started/beam-overview.md b/src/get-started/beam-overview.md
index b23811c..1b2fbfc 100644
--- a/src/get-started/beam-overview.md
+++ b/src/get-started/beam-overview.md
@@ -22,6 +22,7 @@ Beam currently supports the following language-specific SDKs:
* Java 
* Python 
+* Go {: height="45px"}
A Scala {: height="45px"} interface is also available as [Scio](https://github.com/spotify/scio).
@@ -43,7 +44,7 @@ Beam currently supports Runners that work with the following distributed process
Get started using Beam for your data processing tasks.
-1. Follow the Quickstart for the [Java SDK]({{ site.baseurl }}/get-started/quickstart-java) or the [Python SDK]({{ site.baseurl }}/get-started/quickstart-py).
+1. Follow the Quickstart for the [Java SDK]({{ site.baseurl }}/get-started/quickstart-java), the [Python SDK]({{ site.baseurl }}/get-started/quickstart-py) or the [Go SDK]({{ site.baseurl }}/get-started/quickstart-go).
2. See the [WordCount Examples Walkthrough]({{ site.baseurl }}/get-started/wordcount-example) for examples that introduce various features of the SDKs.
diff --git a/src/get-started/index.md b/src/get-started/index.md
index 41bfd57..7f9d3e8 100644
--- a/src/get-started/index.md
+++ b/src/get-started/index.md
@@ -15,7 +15,7 @@ Learn to use Beam to create data processing pipelines that run on supported proc
Learn about the Beam model, the currently available Beam SDKs and Runners, and Beam's native I/O connectors.
-#### Quickstart for [Java]({{ site.baseurl }}/get-started/quickstart-java) or [Python]({{ site.baseurl }}/get-started/quickstart-py)
+#### Quickstart for [Java]({{ site.baseurl }}/get-started/quickstart-java), [Python]({{ site.baseurl }}/get-started/quickstart-py) or [Go]({{ site.baseurl }}/get-started/quickstart-go)
Learn how to set up a Beam project and run a simple example Beam pipeline on your local machine.
diff --git a/src/get-started/quickstart-go.md b/src/get-started/quickstart-go.md
new file mode 100644
index 0000000..17dc3a2
--- /dev/null
+++ b/src/get-started/quickstart-go.md
@@ -0,0 +1,67 @@
+---
+layout: section
+title: "Beam Quickstart for Go"
+permalink: /get-started/quickstart-go/
+section_menu: section-menu/get-started.html
+---
+
+# Apache Beam Go SDK Quickstart
+
+This Quickstart will walk you through executing your first Beam pipeline to run [WordCount]({{ site.baseurl }}/get-started/wordcount-example), written using Beam's [Go SDK]({{ site.baseurl }}/documentation/sdks/go), on a [runner]({{ site.baseurl }}/documentation#runners) of your choice.
+
+* TOC
+{:toc}
+
+## Set up your environment
+
+The Beam SDK for Go requires `go` version 1.10 or newer. It can be downloaded [here](https://golang.org/). Check that you have version 1.10 by running:
+
+```
+$ go --version
+```
+
+## Get the SDK and the examples
+
+The easiest way to obtain the Apache Beam Go SDK is via `go get`:
+
+```
+$ go get -u github.com/apache/beam/sdks/go/...
+```
+
+For development of the Go SDK itself, see [BUILD.md](https://github.com/apache/beam/blob/master/sdks/go/BUILD.md) for details.
+
+## Run wordcount
+
+The Apache Beam
+[examples](https://github.com/apache/beam/tree/master/sdks/go/examples)
+directory has many examples. All examples can be run by passing the
+required arguments described in the examples.
+
+For example, to run `wordcount`, run:
+
+{:.runner-direct}
+```
+$ go install github.com/apache/beam/sdks/go/examples/wordcount
+$ wordcount --input <PATH_TO_INPUT_FILE> --output counts
+```
+
+{:.runner-dataflow}
+```
+$ go install github.com/apache/beam/sdks/go/examples/wordcount
+$ wordcount --input gs://dataflow-samples/shakespeare/kinglear.txt \
+ --output gs://<your-gcs-bucket>/counts \
+ --runner dataflow \
+ --project your-gcp-project \
+ --temp_location gs://<your-gcs-bucket>/tmp/ \
+ --worker_harness_container_image=herohde-docker-apache.bintray.io/beam/go:20180514
+```
+
+## Next Steps
+
+* Learn more about the [Beam SDK for Go]({{ site.baseurl }}/documentation/sdks/go/)
+ and look through the [godoc](https://godoc.org/github.com/apache/beam/sdks/go/pkg/beam).
+* Walk through these WordCount examples in the [WordCount Example Walkthrough]({{ site.baseurl }}/get-started/wordcount-example).
+* Dive in to some of our favorite [articles and presentations]({{ site.baseurl }}/documentation/resources).
+* Join the Beam [users@]({{ site.baseurl }}/get-started/support#mailing-lists) mailing list.
+
+Please don't hesitate to [reach out]({{ site.baseurl }}/get-started/support) if you encounter any issues!
diff --git a/src/images/logos/sdks/go.png b/src/images/logos/sdks/go.png
new file mode 100644
index 0000000..d6d98c3
Binary files /dev/null and b/src/images/logos/sdks/go.png differ
diff --git a/src/index.md b/src/index.md
index 94a4c66..bb5eaec 100644
--- a/src/index.md
+++ b/src/index.md
@@ -53,6 +53,7 @@ cards:
<div class="hero__ctas">
<a class="button" href="{{'/get-started/quickstart-java/'|prepend:site.baseurl}}">Java Quickstart</a>
<a class="button" href="{{'/get-started/quickstart-py/'|prepend:site.baseurl}}">Python Quickstart</a>
+ <a class="button" href="{{'/get-started/quickstart-go/'|prepend:site.baseurl}}">Go Quickstart</a>
</div>
</div>
</div>
@@ -153,5 +154,6 @@ cards:
<div class="ctas__ctas">
<a class="button" href="{{'/get-started/quickstart-java/'|prepend:site.baseurl}}">Java Quickstart</a>
<a class="button" href="{{'/get-started/quickstart-py/'|prepend:site.baseurl}}">Python Quickstart</a>
+ <a class="button" href="{{'/get-started/quickstart-go/'|prepend:site.baseurl}}">Go Quickstart</a>
</div>
</div>
--
To stop receiving notification emails like this one, please contact
mergebot-role@apache.org.