shanthoosh commented on a change in pull request #948: SAMZA-2124: Add Beam API 
doc to the website
URL: https://github.com/apache/samza/pull/948#discussion_r264772299
 
 

 ##########
 File path: docs/startup/code-examples/versioned/beam.md
 ##########
 @@ -0,0 +1,125 @@
+---
+layout: page
+title: Beam Code Examples
+---
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
+-->
+
+The [samza-beam-examples](https://github.com/apache/samza-beam-examples) 
project contains examples to demonstrate running Beam pipelines with 
SamzaRunner locally, in Yarn cluster, or in standalone cluster with Zookeeper. 
More complex pipelines can be built from this project and run in similar 
manner.  
+
+### Example Pipelines
+
+The following examples are included:
+
+1. 
[`WordCount`](https://github.com/apache/samza-beam-examples/blob/master/src/main/java/org/apache/beam/examples/WordCount.java)
 reads a file as input (bounded data source), and computes word frequencies. 
+
+1. 
[`KafkaWordCount`](https://github.com/apache/samza-beam-examples/blob/master/src/main/java/org/apache/beam/examples/KafkaWordCount.java)
 does the same word-count computation but reading from a Kafka stream 
(unbounded data source). It uses a fixed 10-sec window to aggregate the counts.
+
+### Run Examples
+
+Each example can be run locally, in Yarn cluster or in standalone cluster. 
Here we use WordCount as an example.
+
+#### Set Up
+
+1. Download and install [JDK version 
8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).
 Verify that the JAVA_HOME environment variable is set and points to your JDK 
installation.
+
+1. Download and install [Apache Maven](http://maven.apache.org/download.cgi) 
by following Maven’s [installation guide](http://maven.apache.org/install.html) 
for your specific operating system.
+
+1. A script named "grid" is included in this project which allows you to 
easily download and install Zookeeper, Kafka, and Yarn.
 
 Review comment:
   I think all the individual line-items in SetUp(Install JDK, install maven, 
install grid) are numbered with 1. May be it would better to provide them right 
ordering. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to