You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by ja...@apache.org on 2019/02/01 19:41:53 UTC

svn commit: r1852770 [14/14] - in /samza/site: ./ archive/ blog/ case-studies/ community/ contribute/ learn/documentation/1.0.0/ learn/documentation/1.0.0/api/ learn/documentation/1.0.0/api/javadocs/ learn/documentation/1.0.0/api/javadocs/org/apache/sa...

Added: samza/site/startup/quick-start/1.0.0/samza-sql.html
URL: http://svn.apache.org/viewvc/samza/site/startup/quick-start/1.0.0/samza-sql.html?rev=1852770&view=auto
==============================================================================
--- samza/site/startup/quick-start/1.0.0/samza-sql.html (added)
+++ samza/site/startup/quick-start/1.0.0/samza-sql.html Fri Feb  1 19:41:48 2019
@@ -0,0 +1,703 @@
+<!DOCTYPE html>
+<!--
+   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.
+-->
+<html lang="en">
+
+<head>
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+  <meta charset="utf-8">
+  <title>Samza - Samza SQL Quick Start</title>
+  <link rel="apple-touch-icon-precomposed" sizes="57x57" href="/img/favicon/apple-touch-icon-57x57.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/favicon/apple-touch-icon-114x114.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/favicon/apple-touch-icon-72x72.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/img/favicon/apple-touch-icon-144x144.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="60x60" href="/img/favicon/apple-touch-icon-60x60.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/img/favicon/apple-touch-icon-120x120.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/img/favicon/apple-touch-icon-76x76.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/img/favicon/apple-touch-icon-152x152.png" />
+  <link rel="icon" type="image/png" href="/img/favicon/favicon-196x196.png" sizes="196x196" />
+  <link rel="icon" type="image/png" href="/img/favicon/favicon-96x96.png" sizes="96x96" />
+  <link rel="icon" type="image/png" href="/img/favicon/favicon-32x32.png" sizes="32x32" />
+  <link rel="icon" type="image/png" href="/img/favicon/favicon-16x16.png" sizes="16x16" />
+  <link rel="icon" type="image/png" href="/img/favicon/favicon-128.png" sizes="128x128" />
+  <meta name="application-name" content="https://samza.apache.org" />
+  <meta name="msapplication-TileColor" content="#FFFFFF" />
+  <meta name="msapplication-TileImage" content="/img/favicon/mstile-144x144.png" />
+  <meta name="msapplication-square70x70logo" content="/img/favicon/mstile-70x70.png" />
+  <meta name="msapplication-square150x150logo" content="/img/favicon/mstile-150x150.png" />
+  <meta name="msapplication-wide310x150logo" content="/img/favicon/mstile-310x150.png" />
+  <meta name="msapplication-square310x310logo" content="/img/favicon/mstile-310x310.png" />
+  <link href="/css/ionicons.min.css" rel="stylesheet">
+  <link href="/css/google-fonts.css" rel="stylesheet">
+  <link href="/css/syntax.css" rel="stylesheet"/>
+  <link rel="stylesheet" href="/css/main.new.css" />
+</head>
+
+<body class="page">
+  <!--
+   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.
+-->
+<div class="main-navigation" data-plugin="menu">
+  <div class="main-navigation__toggle" data-menu-closed>
+    <i class="icon ion-md-menu"></i>
+  </div>
+  <div class="main-navigation__toggle main-navigation__toggle--opened" data-menu-opened>
+    <i class="icon ion-md-close"></i>
+  </div>
+  <div class="main-navigation__inner">
+    <div class="main-navigation__logo">
+      <a href="/">
+        <img class="main-navigation__logo-img" src="/img/samza-logo.png" srcset="/img/samza-logo.png 1x, /img/samza-logo@2x.png 2x"
+          alt="Samza Logo" />
+      </a>
+    </div>
+    <div class="main-navigation__items" data-menu-opened>
+      <a class="main-navigation__item" href="/">Home</a>
+      <a class="main-navigation__item" href="/learn/documentation/1.0.0/core-concepts/core-concepts.html">Docs</a>
+      <a class="main-navigation__item" href="/powered-by/">Powered By</a>
+      <a class="main-navigation__item" href="/startup/download/">Downloads</a>
+      <a class="main-navigation__item" href="/blog/">Blog</a>
+      <div class="main-navigation__item main-navigation__item--group">
+        <div class="main-navigation__item-group-title">
+          Community
+          <i class="icon ion-md-arrow-dropdown"></i>
+        </div>
+        <div class="main-navigation__item-group-list">
+          <a class="main-navigation__item" href="/community/contact-us.html">Contact Us</a>
+          <a class="main-navigation__item" href="/contribute/contributors-corner.html">Contributor's Corner</a>
+          <a class="main-navigation__item" href="/community/committers.html">PMC Members and committers</a>
+          <a class="main-navigation__item" href="/meetups/">Talks and Meetups</a>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+
+  <div class="container">
+      <div class="container__toggle">
+        <i class="icon ion-md-arrow-dropleft-circle container__toggle-icon"></i>
+        <i class="icon ion-md-arrow-dropright-circle container__toggle-icon container__toggle-icon--opened"></i>
+      </div>
+      
+      <!-- There is only one menu, but made it as a no-output collection to grab data only -->
+      
+        <!--
+   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.
+-->
+
+
+<div class="side-navigation">
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group side-navigation__group--has-nested" data-plugin="sub-menu" data-sub-menu-show-class="side-navigation__group--has-nested-visible">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <div class="side-navigation__group-title">
+        <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
+        Getting Started
+      </div>
+      <div class="side-navigation__group-items " data-sub-menu >
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/startup/quick-start/1.0.0/">QuickStart</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/startup/code-examples/1.0.0/">Code Examples</a>
+      
+
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+    <!-- Close sub nav group -->
+    
+      </div>
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group side-navigation__group--has-nested" data-plugin="sub-menu" data-sub-menu-show-class="side-navigation__group--has-nested-visible">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <div class="side-navigation__group-title">
+        <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
+        Documentation
+      </div>
+      <div class="side-navigation__group-items side-navigation__group-has-submenus" data-sub-menu data-documentation="/learn/documentation/1.0.0/">
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+    <!-- Close sub nav group -->
+    
+      </div>
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group side-navigation__group--has-nested" data-plugin="sub-menu" data-sub-menu-show-class="side-navigation__group--has-nested-visible">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <div class="side-navigation__group-title">
+        <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
+        Releases
+      </div>
+      <div class="side-navigation__group-items " data-sub-menu >
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/1.0.0">1.0.0</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/0.14">0.14</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/0.13">0.13</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/0.12">0.12</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/0.11">0.11</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/0.10">0.10</a>
+      
+
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+    <!-- Close sub nav group -->
+    
+      </div>
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <a class="side-navigation__group-title" data-plugin="top-menu" data-match-active="" href="/blog/">
+        Blog
+      </a>
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+    <!-- Close sub nav group -->
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group side-navigation__group--has-nested" data-plugin="sub-menu" data-sub-menu-show-class="side-navigation__group--has-nested-visible">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <div class="side-navigation__group-title">
+        <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
+        Community
+      </div>
+      <div class="side-navigation__group-items " data-sub-menu >
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/community/contact-us.html">Contact Us</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/contribute/contributors-corner.html">Contributor's Corner</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/contribute/enhancement-proposal.html">Enhancement Proposal</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/community/committers.html">PMC members & Committers</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/meetups/">Talks and Meetups</a>
+      
+
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+    <!-- Close sub nav group -->
+    
+      </div>
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group side-navigation__group--has-nested" data-plugin="sub-menu" data-sub-menu-show-class="side-navigation__group--has-nested-visible">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <div class="side-navigation__group-title">
+        <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
+        Case Studies
+      </div>
+      <div class="side-navigation__group-items " data-sub-menu >
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+      
+        
+      <a class="side-navigation__group-item" data-match-active="exact" href="/case-studies/">View All</a>
+      
+        
+          <hr>
+          
+
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+      
+
+      
+
+      
+
+      
+        
+          
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/ebay" data-match-active="">eBay</a>
+      
+        
+          
+        
+          
+        
+          
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/tripadvisor" data-match-active="">TripAdvisor</a>
+      
+        
+          
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/slack" data-match-active="">Slack</a>
+      
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/optimizely" data-match-active="">Optimizely</a>
+      
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/redfin" data-match-active="">Redfin</a>
+      
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/linkedin" data-match-active="">LinkedIn</a>
+      
+        
+          
+        
+          
+        
+          
+
+    
+
+    <!-- Close sub nav group -->
+    
+      </div>
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+</div>
+
+      
+      
+      <div class="section">
+        <div class="content">
+          
+          <h2>Samza SQL Quick Start</h2>
+          
+
+          
+    
+          <!--
+   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.
+-->
+
+<h3 id="overview">Overview</h3>
+
+<p>Samza SQL allows you to define your stream processing logic declaratively as a a SQL query.
+This allows you to create streaming pipelines without Java code or configuration unless you 
+require user-defined functions (<a href="#how-to-write-a-udf">UDF</a>). </p>
+
+<p>You can run Samza SQL locally on your machine or on a YARN cluster.</p>
+
+<h3 id="running-samza-sql-on-your-local-machine">Running Samza SQL on your local machine</h3>
+
+<p>The <a href="https://samza.apache.org/learn/tutorials/0.14/samza-tools.html">Samza SQL console</a> allows you to experiment with Samza SQL locally on your machine. </p>
+
+<h4 id="setup-kafka">Setup Kafka</h4>
+
+<p>Follow the instructions from the <a href="http://kafka.apache.org/quickstart">Kafka quickstart</a> to start the zookeeper and Kafka server.</p>
+
+<p>Let us create a Kafka topic named “ProfileChangeStream” for this demo.</p>
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>./deploy/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor <span class="m">1</span> --partitions <span class="m">1</span> --topic ProfileChangeStream
+</code></pre></div>
+<p>Download the Samza tools package from <a href="https://samza.apache.org/learn/tutorials/0.14/samza-tools.html">here</a> and use the <code>generate-kafka-events</code> script populate the stream with sample data.</p>
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span><span class="nb">cd</span> samza-tools-&lt;version&gt;
+./scripts/generate-kafka-events.sh -t ProfileChangeStream -e ProfileChange
+</code></pre></div>
+<h4 id="using-the-samza-sql-console">Using the Samza SQL Console</h4>
+
+<p>The simplest SQL query is to read all events from a Kafka topic <code>ProfileChangeStream</code> and print them to the console.</p>
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>./scripts/samza-sql-console.sh --sql <span class="s2">&quot;insert into log.consoleoutput select * from kafka.ProfileChangeStream&quot;</span>
+</code></pre></div>
+<p>Next, let us project a few fields from the input stream.</p>
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>./scripts/samza-sql-console.sh --sql <span class="s2">&quot;insert into log.consoleoutput select Name, OldCompany, NewCompany from kafka.ProfileChangeStream&quot;</span>
+</code></pre></div>
+<p>You can also filter messages in the input stream based on some predicate. In this example, we filter profiles currently working at LinkedIn, whose previous employer matches the regex <code>.*soft</code>. The function <code>RegexMatch(regex, company)</code> is an example of 
+a UDF that defines a predicate. </p>
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>./scripts/samza-sql-console.sh --sql <span class="s2">&quot;insert into log.consoleoutput select Name as __key__, Name, NewCompany, RegexMatch(&#39;.*soft&#39;, OldCompany) from kafka.ProfileChangeStream where NewCompany = &#39;LinkedIn&#39;&quot;</span>
+</code></pre></div>
+<h3 id="running-samza-sql-on-yarn">Running Samza SQL on YARN</h3>
+
+<p>The <a href="https://github.com/apache/samza-hello-samza">hello-samza</a> project has examples to 
+get started with Samza on YARN. You can define your SQL query in a 
+configuration file and submit it to a YARN cluster.</p>
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>./deploy/samza/bin/run-app.sh --config-factory<span class="o">=</span>org.apache.samza.config.factories.PropertiesConfigFactory --config-path<span class="o">=</span>file://<span class="nv">$PWD</span>/deploy/samza/config/page-view-filter-sql.properties
+</code></pre></div>
+<h3 id="how-to-write-a-udf">How to write a UDF</h3>
+
+<p>Right now Samza SQL support Scalar UDFs which means that each 
+ UDF should act on each record at a time and return the result 
+ corresponding to the record. In essence it exhibits the behavior
+  of 1 output to an input. Users need to implement the following 
+  interface to create a UDF.</p>
+
+<figure class="highlight"><pre><code class="language-java" data-lang="java"><span></span> <span class="cm">/**</span>
+<span class="cm">  * The base class for the Scalar UDFs. All the scalar UDF classes needs to extend this and implement a method named</span>
+<span class="cm">  * &quot;execute&quot;. The number of arguments for the execute method in the UDF class should match the number of fields</span>
+<span class="cm">  * used while invoking this UDF in SQL statement.</span>
+<span class="cm">  * Say for e.g. User creates a UDF class with signature int execute(int var1, String var2). It can be used in a SQL query</span>
+<span class="cm">  *     select myudf(id, name) from profile</span>
+<span class="cm">  * In the above query, Profile should contain fields named &#39;id&#39; of INTEGER/NUMBER type and &#39;name&#39; of type VARCHAR/CHARACTER</span>
+<span class="cm">  */</span>
+ <span class="kd">public</span> <span class="kd">interface</span> <span class="nc">ScalarUdf</span> <span class="o">{</span>
+   <span class="cm">/**</span>
+<span class="cm">    * Udfs can implement this method to perform any initialization that they may need.</span>
+<span class="cm">    * @param udfConfig Config specific to the udf.</span>
+<span class="cm">    */</span>
+   <span class="kt">void</span> <span class="nf">init</span><span class="o">(</span><span class="n">Config</span> <span class="n">udfConfig</span><span class="o">);</span>
+  
+   <span class="cm">/**</span>
+<span class="cm">    * Actual implementation of the udf function</span>
+<span class="cm">    * @param args</span>
+<span class="cm">    *   list of all arguments that the udf needs</span>
+<span class="cm">    * @return</span>
+<span class="cm">    *   Return value from the scalar udf.</span>
+<span class="cm">    */</span>
+   <span class="n">Object</span> <span class="nf">execute</span><span class="o">(</span><span class="n">Object</span><span class="o">...</span> <span class="n">args</span><span class="o">);</span>
+ <span class="o">}</span>
+ </code></pre></figure>
+
+           
+        </div>
+      </div>
+
+  </div>
+  
+
+  <!-- footer starts here -->
+
+  <!--
+   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.
+-->
+
+<footer>
+  <div class="footer-inner">
+    <div class="side-by-side">
+      <div>
+        <div class="footer__heading">Learn More</div>
+        <div class="footer__items">
+          <a class="footer__item" href="/meetups/">Meetups</a>
+          <a class="footer__item" href="/blog/">Blog</a>
+          <a class="footer__item" href="/learn/documentation/1.0.0/introduction/background.html">About</a>
+        </div>
+      </div>
+      <div>
+        <div class="footer__heading">Community</div>
+        <div class="footer__items">
+          <a class="footer__item" href="/community/contact-us.html">Contact Us</a>
+          <a class="footer__item" href="/contribute/contributors-corner.html">Contributors' Corner</a>
+          <a class="footer__item" href="/community/committers.html">PMC members and committers</a>
+          <a class="footer__item" href="/powered-by/">Powered By</a>
+        </div>
+      </div>
+
+      <div>
+        <div class="quick-links">
+          <a class="quick-link" href="/startup/download" target="_blank">
+            <i class="icon ion-md-download"></i>
+          </a>
+          <a class="quick-link" href="https://git-wip-us.apache.org/repos/asf?p=samza.git;a=tree" target="_blank">
+            <i class="icon ion-md-code"></i>
+          </a>
+          <a class="quick-link" href="https://twitter.com/samzastream" target="_blank">
+            <i class="icon ion-logo-twitter"></i>
+          </a>
+        </div>
+
+        <p>
+          <script>document.write(new Date().getFullYear());</script> &copy; samza.apache.org</p>
+      </div>
+
+    </div>
+  </div>
+
+</footer>
+
+
+<script>
+  var tryFile = function (url, cb) {
+    var myRequest = new Request(url);
+    fetch(myRequest).then((response, cb) => {
+      console.log(response.status); // returns 200
+      cb(response.status != 404);
+    });
+  }
+
+  tryFile(window.location.pathname, function (status) {
+    // do something with the status
+    console.log(status);
+  });
+</script>
+
+
+<!-- Google Analytics -->
+<script>
+  (function (i, s, o, g, r, a, m) {
+    i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
+      (i[r].q = i[r].q || []).push(arguments)
+    }, i[r].l = 1 * new Date(); a = s.createElement(o),
+      m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
+  })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+
+  ga('create', 'UA-43122768-1', 'apache.org');
+  ga('send', 'pageview');
+
+</script>
+<script src="/js/main.new.js"></script>
+
+</body>
+
+</html>
\ No newline at end of file

Added: samza/site/startup/quick-start/1.0.0/samza.html
URL: http://svn.apache.org/viewvc/samza/site/startup/quick-start/1.0.0/samza.html?rev=1852770&view=auto
==============================================================================
--- samza/site/startup/quick-start/1.0.0/samza.html (added)
+++ samza/site/startup/quick-start/1.0.0/samza.html Fri Feb  1 19:41:48 2019
@@ -0,0 +1,814 @@
+<!DOCTYPE html>
+<!--
+   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.
+-->
+<html lang="en">
+
+<head>
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+  <meta charset="utf-8">
+  <title>Samza - Samza Quick Start</title>
+  <link rel="apple-touch-icon-precomposed" sizes="57x57" href="/img/favicon/apple-touch-icon-57x57.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/favicon/apple-touch-icon-114x114.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/favicon/apple-touch-icon-72x72.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/img/favicon/apple-touch-icon-144x144.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="60x60" href="/img/favicon/apple-touch-icon-60x60.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/img/favicon/apple-touch-icon-120x120.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/img/favicon/apple-touch-icon-76x76.png" />
+  <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/img/favicon/apple-touch-icon-152x152.png" />
+  <link rel="icon" type="image/png" href="/img/favicon/favicon-196x196.png" sizes="196x196" />
+  <link rel="icon" type="image/png" href="/img/favicon/favicon-96x96.png" sizes="96x96" />
+  <link rel="icon" type="image/png" href="/img/favicon/favicon-32x32.png" sizes="32x32" />
+  <link rel="icon" type="image/png" href="/img/favicon/favicon-16x16.png" sizes="16x16" />
+  <link rel="icon" type="image/png" href="/img/favicon/favicon-128.png" sizes="128x128" />
+  <meta name="application-name" content="https://samza.apache.org" />
+  <meta name="msapplication-TileColor" content="#FFFFFF" />
+  <meta name="msapplication-TileImage" content="/img/favicon/mstile-144x144.png" />
+  <meta name="msapplication-square70x70logo" content="/img/favicon/mstile-70x70.png" />
+  <meta name="msapplication-square150x150logo" content="/img/favicon/mstile-150x150.png" />
+  <meta name="msapplication-wide310x150logo" content="/img/favicon/mstile-310x150.png" />
+  <meta name="msapplication-square310x310logo" content="/img/favicon/mstile-310x310.png" />
+  <link href="/css/ionicons.min.css" rel="stylesheet">
+  <link href="/css/google-fonts.css" rel="stylesheet">
+  <link href="/css/syntax.css" rel="stylesheet"/>
+  <link rel="stylesheet" href="/css/main.new.css" />
+</head>
+
+<body class="page">
+  <!--
+   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.
+-->
+<div class="main-navigation" data-plugin="menu">
+  <div class="main-navigation__toggle" data-menu-closed>
+    <i class="icon ion-md-menu"></i>
+  </div>
+  <div class="main-navigation__toggle main-navigation__toggle--opened" data-menu-opened>
+    <i class="icon ion-md-close"></i>
+  </div>
+  <div class="main-navigation__inner">
+    <div class="main-navigation__logo">
+      <a href="/">
+        <img class="main-navigation__logo-img" src="/img/samza-logo.png" srcset="/img/samza-logo.png 1x, /img/samza-logo@2x.png 2x"
+          alt="Samza Logo" />
+      </a>
+    </div>
+    <div class="main-navigation__items" data-menu-opened>
+      <a class="main-navigation__item" href="/">Home</a>
+      <a class="main-navigation__item" href="/learn/documentation/1.0.0/core-concepts/core-concepts.html">Docs</a>
+      <a class="main-navigation__item" href="/powered-by/">Powered By</a>
+      <a class="main-navigation__item" href="/startup/download/">Downloads</a>
+      <a class="main-navigation__item" href="/blog/">Blog</a>
+      <div class="main-navigation__item main-navigation__item--group">
+        <div class="main-navigation__item-group-title">
+          Community
+          <i class="icon ion-md-arrow-dropdown"></i>
+        </div>
+        <div class="main-navigation__item-group-list">
+          <a class="main-navigation__item" href="/community/contact-us.html">Contact Us</a>
+          <a class="main-navigation__item" href="/contribute/contributors-corner.html">Contributor's Corner</a>
+          <a class="main-navigation__item" href="/community/committers.html">PMC Members and committers</a>
+          <a class="main-navigation__item" href="/meetups/">Talks and Meetups</a>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+
+  <div class="container">
+      <div class="container__toggle">
+        <i class="icon ion-md-arrow-dropleft-circle container__toggle-icon"></i>
+        <i class="icon ion-md-arrow-dropright-circle container__toggle-icon container__toggle-icon--opened"></i>
+      </div>
+      
+      <!-- There is only one menu, but made it as a no-output collection to grab data only -->
+      
+        <!--
+   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.
+-->
+
+
+<div class="side-navigation">
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group side-navigation__group--has-nested" data-plugin="sub-menu" data-sub-menu-show-class="side-navigation__group--has-nested-visible">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <div class="side-navigation__group-title">
+        <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
+        Getting Started
+      </div>
+      <div class="side-navigation__group-items " data-sub-menu >
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/startup/quick-start/1.0.0/">QuickStart</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/startup/code-examples/1.0.0/">Code Examples</a>
+      
+
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+    <!-- Close sub nav group -->
+    
+      </div>
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group side-navigation__group--has-nested" data-plugin="sub-menu" data-sub-menu-show-class="side-navigation__group--has-nested-visible">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <div class="side-navigation__group-title">
+        <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
+        Documentation
+      </div>
+      <div class="side-navigation__group-items side-navigation__group-has-submenus" data-sub-menu data-documentation="/learn/documentation/1.0.0/">
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+    <!-- Close sub nav group -->
+    
+      </div>
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group side-navigation__group--has-nested" data-plugin="sub-menu" data-sub-menu-show-class="side-navigation__group--has-nested-visible">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <div class="side-navigation__group-title">
+        <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
+        Releases
+      </div>
+      <div class="side-navigation__group-items " data-sub-menu >
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/1.0.0">1.0.0</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/0.14">0.14</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/0.13">0.13</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/0.12">0.12</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/0.11">0.11</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/releases/0.10">0.10</a>
+      
+
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+    <!-- Close sub nav group -->
+    
+      </div>
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <a class="side-navigation__group-title" data-plugin="top-menu" data-match-active="" href="/blog/">
+        Blog
+      </a>
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+    <!-- Close sub nav group -->
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group side-navigation__group--has-nested" data-plugin="sub-menu" data-sub-menu-show-class="side-navigation__group--has-nested-visible">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <div class="side-navigation__group-title">
+        <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
+        Community
+      </div>
+      <div class="side-navigation__group-items " data-sub-menu >
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/community/contact-us.html">Contact Us</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/contribute/contributors-corner.html">Contributor's Corner</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/contribute/enhancement-proposal.html">Enhancement Proposal</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/community/committers.html">PMC members & Committers</a>
+      
+        
+      <a class="side-navigation__group-item" data-match-active="" href="/meetups/">Talks and Meetups</a>
+      
+
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+    <!-- Close sub nav group -->
+    
+      </div>
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+    
+
+    
+    <!-- Start Group -->
+    
+    <div class="side-navigation__group side-navigation__group--has-nested" data-plugin="sub-menu" data-sub-menu-show-class="side-navigation__group--has-nested-visible">
+    
+
+    <!-- Make menu_title, and start items group if needed -->
+    
+      <div class="side-navigation__group-title">
+        <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
+        Case Studies
+      </div>
+      <div class="side-navigation__group-items " data-sub-menu >
+    
+
+    <!-- Handle sub navigation items from data -->
+    
+      
+        
+      <a class="side-navigation__group-item" data-match-active="exact" href="/case-studies/">View All</a>
+      
+        
+          <hr>
+          
+
+    
+
+    <!-- Handle sub nagivation from site collections -->
+    
+
+      
+
+      
+
+      
+
+      
+        
+          
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/ebay" data-match-active="">eBay</a>
+      
+        
+          
+        
+          
+        
+          
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/tripadvisor" data-match-active="">TripAdvisor</a>
+      
+        
+          
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/slack" data-match-active="">Slack</a>
+      
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/optimizely" data-match-active="">Optimizely</a>
+      
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/redfin" data-match-active="">Redfin</a>
+      
+        
+
+        
+        
+        
+
+        
+
+        
+
+        
+
+      <a class="side-navigation__group-item" href="/case-studies/linkedin" data-match-active="">LinkedIn</a>
+      
+        
+          
+        
+          
+        
+          
+
+    
+
+    <!-- Close sub nav group -->
+    
+      </div>
+    
+
+    <!-- Close menu group -->
+    </div>
+
+  
+
+</div>
+
+      
+      
+      <div class="section">
+        <div class="content">
+          
+          <h2>Samza Quick Start</h2>
+          
+
+          
+    
+          <!--
+   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.
+-->
+
+<p>In this tutorial, we will create our first Samza application - <code>WordCount</code>. This application will consume messages from a Kafka stream, tokenize them into individual words and count the frequency of each word.  Let us download the entire project from <a href="https://github.com/apache/samza-hello-samza/blob/latest/quickstart/wordcount.tar.gz">here</a>.</p>
+
+<h3 id="setting-up-a-java-project">Setting up a Java Project</h3>
+
+<p>Observe the project structure as follows:</p>
+
+<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>wordcount
+<span class="p">|</span>-- build.gradle
+<span class="p">|</span>-- gradle.properties
+<span class="p">|</span>-- scripts
+<span class="p">|</span>-- src
+    <span class="p">|</span>-- main
+        <span class="p">|</span>-- config
+        <span class="p">|</span>-- java
+            <span class="p">|</span>-- samzaapp
+                 <span class="p">|</span>-- WordCount.java</code></pre></figure>
+
+<p>You can build the project anytime by running:</p>
+
+<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>&gt; <span class="nb">cd</span> wordcount
+&gt; gradle wrapper --gradle-version <span class="m">4</span>.9
+&gt; ./gradlew build</code></pre></figure>
+
+<h3 id="create-a-samza-streamapplication">Create a Samza StreamApplication</h3>
+
+<p>Now let’s write some code! An application written using Samza&rsquo;s <a href="/learn/documentation/1.0.0/api/api/high-level-api.html">high-level API</a> implements the <a href="/learn/documentation/1.0.0/api/javadocs/org/apache/samza/application/StreamApplication.html">StreamApplication</a> interface:</p>
+
+<figure class="highlight"><pre><code class="language-java" data-lang="java"><span></span><span class="kn">package</span> <span class="nn">samzaapp</span><span class="o">;</span>
+
+<span class="kn">import</span> <span class="nn">org.apache.samza.application.StreamApplication</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.samza.application.descriptors.StreamApplicationDescriptor</span><span class="o">;</span>
+
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">WordCount</span> <span class="kd">implements</span> <span class="n">StreamApplication</span> <span class="o">{</span>
+ <span class="nd">@Override</span>
+ <span class="kd">public</span> <span class="kt">void</span> <span class="nf">describe</span><span class="o">(</span><span class="n">StreamApplicationDescriptor</span> <span class="n">streamApplicationDescriptor</span><span class="o">)</span> <span class="o">{</span>
+ <span class="o">}</span>
+<span class="o">}</span></code></pre></figure>
+
+<p>The interface provides a single method named <code>describe()</code>, which allows us to define our inputs, the processing logic and outputs for our application. </p>
+
+<h3 id="describe-your-inputs-and-outputs">Describe your inputs and outputs</h3>
+
+<p>To interact with Kafka, we will first create a <code>KafkaSystemDescriptor</code> by providing the coordinates of the Kafka cluster. For each Kafka topic our application reads from, we create a <code>KafkaInputDescriptor</code> with the name of the topic and a serializer. Likewise, for each output topic, we instantiate a corresponding <code>KafkaOutputDescriptor</code>. </p>
+
+<figure class="highlight"><pre><code class="language-java" data-lang="java"><span></span><span class="kd">public</span> <span class="kd">class</span> <span class="nc">WordCount</span> <span class="kd">implements</span> <span class="n">StreamApplication</span> <span class="o">{</span>
+ <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">KAFKA_SYSTEM_NAME</span> <span class="o">=</span> <span class="s">&quot;kafka&quot;</span><span class="o">;</span>
+ <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="n">KAFKA_CONSUMER_ZK_CONNECT</span> <span class="o">=</span> <span class="n">ImmutableList</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="s">&quot;localhost:2181&quot;</span><span class="o">);</span>
+ <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="n">KAFKA_PRODUCER_BOOTSTRAP_SERVERS</span> <span class="o">=</span> <span class="n">ImmutableList</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="s">&quot;localhost:9092&quot;</span><span class="o">);</span>
+ <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">KAFKA_DEFAULT_STREAM_CONFIGS</span> <span class="o">=</span> <span class="n">ImmutableMap</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="s">&quot;replication.factor&quot;</span><span class="o">,</span> <span class="s">&quot;1&quot;</span><span class="o">);</span>
+
+ <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">INPUT_STREAM_ID</span> <span class="o">=</span> <span class="s">&quot;sample-text&quot;</span><span class="o">;</span>
+ <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">OUTPUT_STREAM_ID</span> <span class="o">=</span> <span class="s">&quot;word-count-output&quot;</span><span class="o">;</span>
+
+ <span class="nd">@Override</span>
+ <span class="kd">public</span> <span class="kt">void</span> <span class="nf">describe</span><span class="o">(</span><span class="n">StreamApplicationDescriptor</span> <span class="n">streamApplicationDescriptor</span><span class="o">)</span> <span class="o">{</span>
+   <span class="c1">// Create a KafkaSystemDescriptor providing properties of the cluster</span>
+   <span class="n">KafkaSystemDescriptor</span> <span class="n">kafkaSystemDescriptor</span> <span class="o">=</span> <span class="k">new</span> <span class="n">KafkaSystemDescriptor</span><span class="o">(</span><span class="n">KAFKA_SYSTEM_NAME</span><span class="o">)</span>
+       <span class="o">.</span><span class="na">withConsumerZkConnect</span><span class="o">(</span><span class="n">KAFKA_CONSUMER_ZK_CONNECT</span><span class="o">)</span>
+       <span class="o">.</span><span class="na">withProducerBootstrapServers</span><span class="o">(</span><span class="n">KAFKA_PRODUCER_BOOTSTRAP_SERVERS</span><span class="o">)</span>
+       <span class="o">.</span><span class="na">withDefaultStreamConfigs</span><span class="o">(</span><span class="n">KAFKA_DEFAULT_STREAM_CONFIGS</span><span class="o">);</span>
+
+   <span class="c1">// For each input or output stream, create a KafkaInput/Output descriptor</span>
+   <span class="n">KafkaInputDescriptor</span><span class="o">&lt;</span><span class="n">KV</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;&gt;</span> <span class="n">inputDescriptor</span> <span class="o">=</span>
+       <span class="n">kafkaSystemDescriptor</span><span class="o">.</span><span class="na">getInputDescriptor</span><span class="o">(</span><span class="n">INPUT_STREAM_ID</span><span class="o">,</span>
+           <span class="n">KVSerde</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="k">new</span> <span class="n">StringSerde</span><span class="o">(),</span> <span class="k">new</span> <span class="n">StringSerde</span><span class="o">()));</span>
+   <span class="n">KafkaOutputDescriptor</span><span class="o">&lt;</span><span class="n">KV</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;&gt;</span> <span class="n">outputDescriptor</span> <span class="o">=</span>
+       <span class="n">kafkaSystemDescriptor</span><span class="o">.</span><span class="na">getOutputDescriptor</span><span class="o">(</span><span class="n">OUTPUT_STREAM_ID</span><span class="o">,</span>
+           <span class="n">KVSerde</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="k">new</span> <span class="n">StringSerde</span><span class="o">(),</span> <span class="k">new</span> <span class="n">StringSerde</span><span class="o">()));</span>
+
+   <span class="c1">// Obtain a handle to a MessageStream that you can chain operations on</span>
+   <span class="n">MessageStream</span><span class="o">&lt;</span><span class="n">KV</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;&gt;</span> <span class="n">lines</span> <span class="o">=</span> <span class="n">streamApplicationDescriptor</span><span class="o">.</span><span class="na">getInputStream</span><span class="o">(</span><span class="n">inputDescriptor</span><span class="o">);</span>
+   <span class="n">OutputStream</span><span class="o">&lt;</span><span class="n">KV</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;&gt;</span> <span class="n">counts</span> <span class="o">=</span> <span class="n">streamApplicationDescriptor</span><span class="o">.</span><span class="na">getOutputStream</span><span class="o">(</span><span class="n">outputDescriptor</span><span class="o">);</span>
+ <span class="o">}</span>
+<span class="o">}</span></code></pre></figure>
+
+<p>The above example creates a <a href="/learn/documentation/1.0.0/api/javadocs/org/apache/samza/operators/MessageStream.html">MessageStream</a> which reads from an input topic named <code>sample-text</code>. It also defines an output stream that emits results to a topic named <code>word-count-output</code>. Next let’s add our processing logic. </p>
+
+<h3 id="add-word-count-processing-logic">Add word count processing logic</h3>
+
+<p>Kafka messages typically have a key and a value. Since we only care about the value here, we will apply the <code>map</code> operator on the input stream to extract the value. </p>
+
+<figure class="highlight"><pre><code class="language-java" data-lang="java"><span></span><span class="n">lines</span><span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">kv</span> <span class="o">-&gt;</span> <span class="n">kv</span><span class="o">.</span><span class="na">value</span><span class="o">)</span></code></pre></figure>
+
+<p>Next, we will tokenize the message into individual words using the <code>flatmap</code> operator.</p>
+
+<figure class="highlight"><pre><code class="language-java" data-lang="java"><span></span><span class="o">.</span><span class="na">flatMap</span><span class="o">(</span><span class="n">s</span> <span class="o">-&gt;</span> <span class="n">Arrays</span><span class="o">.</span><span class="na">asList</span><span class="o">(</span><span class="n">s</span><span class="o">.</span><span class="na">split</span><span class="o">(</span><span class="s">&quot;\\W+&quot;</span><span class="o">)))</span></code></pre></figure>
+
+<p>We now need to group the words, aggregate their respective counts and periodically emit our results. For this, we will use Samza&rsquo;s session-windowing feature.</p>
+
+<figure class="highlight"><pre><code class="language-java" data-lang="java"><span></span><span class="o">.</span><span class="na">window</span><span class="o">(</span><span class="n">Windows</span><span class="o">.</span><span class="na">keyedSessionWindow</span><span class="o">(</span>
+   <span class="n">w</span> <span class="o">-&gt;</span> <span class="n">w</span><span class="o">,</span> <span class="n">Duration</span><span class="o">.</span><span class="na">ofSeconds</span><span class="o">(</span><span class="mi">5</span><span class="o">),</span> <span class="o">()</span> <span class="o">-&gt;</span> <span class="mi">0</span><span class="o">,</span> <span class="o">(</span><span class="n">m</span><span class="o">,</span> <span class="n">prevCount</span><span class="o">)</span> <span class="o">-&gt;</span> <span class="n">prevCount</span> <span class="o">+</span> <span class="mi">1</span><span class="o">,</span>
+   <span class="k">new</span> <span class="n">StringSerde</span><span class="o">(),</span> <span class="k">new</span> <span class="n">IntegerSerde</span><span class="o">()),</span> <span class="s">&quot;count&quot;</span><span class="o">)</span></code></pre></figure>
+
+<p>Let&rsquo;s walk through each of the parameters to the above <code>window</code> function:
+The first parameter is a &ldquo;key function&rdquo;, which defines the key to group messages by. In our case, we can simply use the word as the key. The second parameter is the windowing interval, which is set to 5 seconds. The third parameter is a function which provides the initial value for our aggregations. We can start with an initial count of zero for each word. The fourth parameter is an aggregation function for computing counts. The next two parameters specify the key and value serializers for our window. </p>
+
+<p>The output from the window operator is captured in a <a href="/learn/documentation/1.0.0/api/javadocs/org/apache/samza/operators/windows/WindowPane.html">WindowPane</a> type, which contains the word as the key and its count as the value. We add a further <code>map</code> to format this into a <code>KV</code>, that we can send to our Kafka topic. To write our results to the output topic, we use the <code>sendTo</code> operator in Samza.</p>
+
+<figure class="highlight"><pre><code class="language-java" data-lang="java"><span></span><span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">windowPane</span> <span class="o">-&gt;</span>
+   <span class="n">KV</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="n">windowPane</span><span class="o">.</span><span class="na">getKey</span><span class="o">().</span><span class="na">getKey</span><span class="o">(),</span>
+       <span class="n">windowPane</span><span class="o">.</span><span class="na">getKey</span><span class="o">().</span><span class="na">getKey</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot;: &quot;</span> <span class="o">+</span> <span class="n">windowPane</span><span class="o">.</span><span class="na">getMessage</span><span class="o">().</span><span class="na">toString</span><span class="o">()))</span>
+<span class="o">.</span><span class="na">sendTo</span><span class="o">(</span><span class="n">counts</span><span class="o">);</span></code></pre></figure>
+
+<p>The full processing logic looks like the following:</p>
+
+<figure class="highlight"><pre><code class="language-java" data-lang="java"><span></span><span class="n">lines</span>
+   <span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">kv</span> <span class="o">-&gt;</span> <span class="n">kv</span><span class="o">.</span><span class="na">value</span><span class="o">)</span>
+   <span class="o">.</span><span class="na">flatMap</span><span class="o">(</span><span class="n">s</span> <span class="o">-&gt;</span> <span class="n">Arrays</span><span class="o">.</span><span class="na">asList</span><span class="o">(</span><span class="n">s</span><span class="o">.</span><span class="na">split</span><span class="o">(</span><span class="s">&quot;\\W+&quot;</span><span class="o">)))</span>
+   <span class="o">.</span><span class="na">window</span><span class="o">(</span><span class="n">Windows</span><span class="o">.</span><span class="na">keyedSessionWindow</span><span class="o">(</span>
+       <span class="n">w</span> <span class="o">-&gt;</span> <span class="n">w</span><span class="o">,</span> <span class="n">Duration</span><span class="o">.</span><span class="na">ofSeconds</span><span class="o">(</span><span class="mi">5</span><span class="o">),</span> <span class="o">()</span> <span class="o">-&gt;</span> <span class="mi">0</span><span class="o">,</span> <span class="o">(</span><span class="n">m</span><span class="o">,</span> <span class="n">prevCount</span><span class="o">)</span> <span class="o">-&gt;</span> <span class="n">prevCount</span> <span class="o">+</span> <span class="mi">1</span><span class="o">,</span>
+       <span class="k">new</span> <span class="n">StringSerde</span><span class="o">(),</span> <span class="k">new</span> <span class="n">IntegerSerde</span><span class="o">()),</span> <span class="s">&quot;count&quot;</span><span class="o">)</span>
+   <span class="o">.</span><span class="na">map</span><span class="o">(</span><span class="n">windowPane</span> <span class="o">-&gt;</span>
+       <span class="n">KV</span><span class="o">.</span><span class="na">of</span><span class="o">(</span><span class="n">windowPane</span><span class="o">.</span><span class="na">getKey</span><span class="o">().</span><span class="na">getKey</span><span class="o">(),</span>
+           <span class="n">windowPane</span><span class="o">.</span><span class="na">getKey</span><span class="o">().</span><span class="na">getKey</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot;: &quot;</span> <span class="o">+</span> <span class="n">windowPane</span><span class="o">.</span><span class="na">getMessage</span><span class="o">().</span><span class="na">toString</span><span class="o">()))</span>
+   <span class="o">.</span><span class="na">sendTo</span><span class="o">(</span><span class="n">counts</span><span class="o">);</span></code></pre></figure>
+
+<h3 id="configure-your-application">Configure your application</h3>
+
+<p>In this section, we will configure our word count example to run locally in a single JVM. Let us add a file named “word-count.properties” under the config folder. </p>
+
+<figure class="highlight"><pre><code class="language-jproperties" data-lang="jproperties"><span></span><span class="na">job.name</span><span class="o">=</span><span class="s">word-count</span>
+<span class="c"># Use a PassthroughJobCoordinator since there is no coordination needed</span>
+<span class="na">job.coordinator.factory</span><span class="o">=</span><span class="s">org.apache.samza.standalone.PassthroughJobCoordinatorFactory</span>
+<span class="na">job.coordination.utils.factory</span><span class="o">=</span><span class="s">org.apache.samza.standalone.PassthroughCoordinationUtilsFactory</span>
+
+<span class="na">job.changelog.system</span><span class="o">=</span><span class="s">kafka</span>
+
+<span class="c"># Use a single container to process all of the data</span>
+<span class="na">task.name.grouper.factory</span><span class="o">=</span><span class="s">org.apache.samza.container.grouper.task.SingleContainerGrouperFactory</span>
+<span class="na">processor.id</span><span class="o">=</span><span class="s">0</span>
+
+<span class="c"># Read from the beginning of the topic</span>
+<span class="na">systems.kafka.default.stream.samza.offset.default</span><span class="o">=</span><span class="s">oldest</span></code></pre></figure>
+
+<p>For more details on Samza&rsquo;s configs, feel free to check out the latest <a href="/learn/documentation/1.0.0/jobs/configuration-table.html">configuration reference</a>.</p>
+
+<h3 id="run-your-application">Run your application</h3>
+
+<p>We are ready to add a <code>main()</code> function to the <code>WordCount</code> class. It parses the command-line arguments and instantiates a <code>LocalApplicationRunner</code> to execute the application locally.</p>
+
+<figure class="highlight"><pre><code class="language-java" data-lang="java"><span></span><span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="o">{</span>
+ <span class="n">CommandLine</span> <span class="n">cmdLine</span> <span class="o">=</span> <span class="k">new</span> <span class="n">CommandLine</span><span class="o">();</span>
+ <span class="n">OptionSet</span> <span class="n">options</span> <span class="o">=</span> <span class="n">cmdLine</span><span class="o">.</span><span class="na">parser</span><span class="o">().</span><span class="na">parse</span><span class="o">(</span><span class="n">args</span><span class="o">);</span>
+ <span class="n">Config</span> <span class="n">config</span> <span class="o">=</span> <span class="n">cmdLine</span><span class="o">.</span><span class="na">loadConfig</span><span class="o">(</span><span class="n">options</span><span class="o">);</span>
+ <span class="n">LocalApplicationRunner</span> <span class="n">runner</span> <span class="o">=</span> <span class="k">new</span> <span class="n">LocalApplicationRunner</span><span class="o">(</span><span class="k">new</span> <span class="n">WordCount</span><span class="o">(),</span> <span class="n">config</span><span class="o">);</span>
+ <span class="n">runner</span><span class="o">.</span><span class="na">run</span><span class="o">();</span>
+ <span class="n">runner</span><span class="o">.</span><span class="na">waitForFinish</span><span class="o">();</span>
+<span class="o">}</span></code></pre></figure>
+
+<p>Before running <code>main()</code>, we will create our input Kafka topic and populate it with sample data. You can download the scripts to interact with Kafka along with the sample data from <a href="https://github.com/apache/samza-hello-samza/blob/latest/quickstart/wordcount.tar.gz">here</a>.</p>
+
+<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>&gt; ./scripts/grid install zookeeper <span class="o">&amp;&amp;</span> ./scripts/grid start zookeeper
+&gt; ./scripts/grid install kafka <span class="o">&amp;&amp;</span> ./scripts/grid start kafka</code></pre></figure>
+
+<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>&gt; ./deploy/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --topic sample-text --partition <span class="m">1</span> --replication-factor <span class="m">1</span>
+&gt; ./deploy/kafka/bin/kafka-console-producer.sh --topic sample-text --broker localhost:9092 &lt; ./sample-text.txt</code></pre></figure>
+
+<p>Let’s kick off our application and use gradle to run it. Alternately, you can also run it directly from your IDE, with the same program arguments.</p>
+
+<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>&gt; <span class="nb">export</span> <span class="nv">BASE_DIR</span><span class="o">=</span><span class="sb">`</span><span class="nb">pwd</span><span class="sb">`</span>
+&gt; ./gradlew run --args<span class="o">=</span><span class="s2">&quot;--config-factory=org.apache.samza.config.factories.PropertiesConfigFactory --config-path=file://</span><span class="nv">$BASE_DIR</span><span class="s2">/src/main/config/word-count.properties&quot;</span></code></pre></figure>
+
+<p>The application will output to a Kafka topic named &ldquo;word-count-output&rdquo;. We will now fire up a Kafka consumer to read from this topic:</p>
+
+<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>&gt;  ./deploy/kafka/bin/kafka-console-consumer.sh --topic word-count-output --zookeeper localhost:2181 --from-beginning</code></pre></figure>
+
+<p>It will show the counts for each word like the following:</p>
+
+<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span></span>well: <span class="m">4</span>
+complaining: <span class="m">1</span>
+die: <span class="m">3</span>
+but: <span class="m">22</span>
+not: <span class="m">50</span>
+truly: <span class="m">5</span>
+murmuring: <span class="m">1</span>
+satisfied: <span class="m">3</span>
+the: <span class="m">120</span>
+thy: <span class="m">8</span>
+gods: <span class="m">8</span>
+thankful: <span class="m">1</span>
+and: <span class="m">243</span>
+from: <span class="m">16</span></code></pre></figure>
+
+<p>Congratulations! You&rsquo;ve successfully run your first Samza application.</p>
+
+<h3 id="more-examples"><a href="/startup/code-examples/1.0.0">More Examples &gt;&gt;</a></h3>
+
+           
+        </div>
+      </div>
+
+  </div>
+  
+
+  <!-- footer starts here -->
+
+  <!--
+   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.
+-->
+
+<footer>
+  <div class="footer-inner">
+    <div class="side-by-side">
+      <div>
+        <div class="footer__heading">Learn More</div>
+        <div class="footer__items">
+          <a class="footer__item" href="/meetups/">Meetups</a>
+          <a class="footer__item" href="/blog/">Blog</a>
+          <a class="footer__item" href="/learn/documentation/1.0.0/introduction/background.html">About</a>
+        </div>
+      </div>
+      <div>
+        <div class="footer__heading">Community</div>
+        <div class="footer__items">
+          <a class="footer__item" href="/community/contact-us.html">Contact Us</a>
+          <a class="footer__item" href="/contribute/contributors-corner.html">Contributors' Corner</a>
+          <a class="footer__item" href="/community/committers.html">PMC members and committers</a>
+          <a class="footer__item" href="/powered-by/">Powered By</a>
+        </div>
+      </div>
+
+      <div>
+        <div class="quick-links">
+          <a class="quick-link" href="/startup/download" target="_blank">
+            <i class="icon ion-md-download"></i>
+          </a>
+          <a class="quick-link" href="https://git-wip-us.apache.org/repos/asf?p=samza.git;a=tree" target="_blank">
+            <i class="icon ion-md-code"></i>
+          </a>
+          <a class="quick-link" href="https://twitter.com/samzastream" target="_blank">
+            <i class="icon ion-logo-twitter"></i>
+          </a>
+        </div>
+
+        <p>
+          <script>document.write(new Date().getFullYear());</script> &copy; samza.apache.org</p>
+      </div>
+
+    </div>
+  </div>
+
+</footer>
+
+
+<script>
+  var tryFile = function (url, cb) {
+    var myRequest = new Request(url);
+    fetch(myRequest).then((response, cb) => {
+      console.log(response.status); // returns 200
+      cb(response.status != 404);
+    });
+  }
+
+  tryFile(window.location.pathname, function (status) {
+    // do something with the status
+    console.log(status);
+  });
+</script>
+
+
+<!-- Google Analytics -->
+<script>
+  (function (i, s, o, g, r, a, m) {
+    i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
+      (i[r].q = i[r].q || []).push(arguments)
+    }, i[r].l = 1 * new Date(); a = s.createElement(o),
+      m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
+  })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+
+  ga('create', 'UA-43122768-1', 'apache.org');
+  ga('send', 'pageview');
+
+</script>
+<script src="/js/main.new.js"></script>
+
+</body>
+
+</html>
\ No newline at end of file

Modified: samza/site/talks/index.html
URL: http://svn.apache.org/viewvc/samza/site/talks/index.html?rev=1852770&r1=1852769&r2=1852770&view=diff
==============================================================================
--- samza/site/talks/index.html (original)
+++ samza/site/talks/index.html Fri Feb  1 19:41:48 2019
@@ -81,7 +81,7 @@
     </div>
     <div class="main-navigation__items" data-menu-opened>
       <a class="main-navigation__item" href="/">Home</a>
-      <a class="main-navigation__item" href="/learn/documentation/latest/core-concepts/core-concepts.html">Docs</a>
+      <a class="main-navigation__item" href="/learn/documentation/1.0.0/core-concepts/core-concepts.html">Docs</a>
       <a class="main-navigation__item" href="/powered-by/">Powered By</a>
       <a class="main-navigation__item" href="/startup/download/">Downloads</a>
       <a class="main-navigation__item" href="/blog/">Blog</a>
@@ -152,10 +152,10 @@
     
       
         
-      <a class="side-navigation__group-item" data-match-active="" href="/startup/quick-start/latest/">QuickStart</a>
+      <a class="side-navigation__group-item" data-match-active="" href="/startup/quick-start/1.0.0/">QuickStart</a>
       
         
-      <a class="side-navigation__group-item" data-match-active="" href="/startup/code-examples/latest/">Code Examples</a>
+      <a class="side-navigation__group-item" data-match-active="" href="/startup/code-examples/1.0.0/">Code Examples</a>
       
 
     
@@ -187,7 +187,7 @@
         <i class="side-navigation__group-title-icon icon ion-md-arrow-dropdown"></i>
         Documentation
       </div>
-      <div class="side-navigation__group-items side-navigation__group-has-submenus" data-sub-menu data-documentation="/learn/documentation/latest/">
+      <div class="side-navigation__group-items side-navigation__group-has-submenus" data-sub-menu data-documentation="/learn/documentation/1.0.0/">
     
 
     <!-- Handle sub navigation items from data -->
@@ -781,7 +781,7 @@
         <div class="footer__items">
           <a class="footer__item" href="/meetups/">Meetups</a>
           <a class="footer__item" href="/blog/">Blog</a>
-          <a class="footer__item" href="/learn/documentation/latest/introduction/background.html">About</a>
+          <a class="footer__item" href="/learn/documentation/1.0.0/introduction/background.html">About</a>
         </div>
       </div>
       <div>