You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2014/12/23 16:59:19 UTC

svn commit: r1647601 [16/20] - in /storm/site/publish: ./ 2012/08/02/ 2012/09/06/ 2013/01/11/ 2013/12/08/ 2014/04/10/ 2014/04/17/ 2014/04/19/ 2014/04/21/ 2014/04/22/ 2014/04/23/ 2014/04/27/ 2014/04/29/ 2014/05/27/ 2014/06/17/ 2014/06/25/ 2014/10/20/ 20...

Modified: storm/site/publish/documentation/Trident-API-Overview.html
URL: http://svn.apache.org/viewvc/storm/site/publish/documentation/Trident-API-Overview.html?rev=1647601&r1=1647600&r2=1647601&view=diff
==============================================================================
--- storm/site/publish/documentation/Trident-API-Overview.html (original)
+++ storm/site/publish/documentation/Trident-API-Overview.html Tue Dec 23 15:59:17 2014
@@ -1,73 +1,79 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-	
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-   <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<meta name="description" content="Storm is a distributed and fault-tolerant realtime computation system. Similar to how Hadoop provides a set of general primitives for doing batch processing, Storm provides a set of general primitives for doing realtime computation. Storm is simple, can be used with any programming language, and is a lot of fun to use!" />
-	<meta name="keywords" content="storm, hadoop, realtime, stream, mapreduce, java, computation, scalability, clojure, scala, jvm, processing" />
-	<title>Storm Documentation</title>
-	<link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
-<script type="text/javascript">
-
-  var _gaq = _gaq || [];
-  _gaq.push(['_setAccount', 'UA-32530285-1']);
-  _gaq.push(['_trackPageview']);
-
-  (function() {
-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-  })();
-
-</script>
-</head>
-
-<body>
-<div id="wrap">
-<div id="top">
-<div id="projecttitle">
-<h2><a href="/" title="Back to main page">Storm</a></h2>
-<p id="slogan">Distributed and fault-tolerant realtime computation</p>
-</div>
-<div id="menu">
-<ul>
-<li><a href="/about/integrates.html">about</a></li>
-
-<!--
-<li><a href="/blog.html">blog</a></li>
--->
-
-<li><a href="/documentation/Home.html">documentation</a></li>
-<li><a href="/blog.html">blog</a></li>
-<li><a href="/downloads.html">downloads</a></li>
-<li><a href="/community.html">community</a></li>
-</ul>
-</div>
-</div>
-<div id="content">
-<div id="sidebar">
-  <ul>
-  
-<li><a class="" href="/documentation/Home.html">Documentation Home</a></li>
-  
-<li><a class="" href="/documentation/Rationale.html">Rationale</a></li>
-  
-<li><a class="" href="/documentation/Tutorial.html">Tutorial</a></li>
-  
-<li><a class="" href="/documentation/Documentation.html">Manual</a></li>
-  
-<li><a class="" href="/apidocs/">Javadoc</a></li>
-  
-<li><a class="" href="/documentation/FAQ.html">FAQ</a></li>
-  
-<li><a class="" href="/documentation/Contributing-to-Storm.html">Contributing</a></li>
-  
-  </ul>
-</div>
-<div id="aboutcontent">
-<h1 id="toc_0">Trident API overview</h1>
+<!DOCTYPE html>
+<html>
+
+    <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="description" content="">
+    <meta name="author" content="">
+    <link rel="icon" href="/assets/favicon.ico">
+
+    <title>Trident API Overview</title>
+
+    <!-- Bootstrap core CSS -->
+    <link href="/assets/css/bootstrap.min.css" rel="stylesheet">
+    <!-- Bootstrap theme -->
+    <link href="/assets/css/bootstrap-theme.min.css" rel="stylesheet">
+
+    <!-- Custom styles for this template -->
+    <link href="/assets/css/theme.css" rel="stylesheet">
+	
+	<link href="/css/main.css" rel="stylesheet">
+
+    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
+    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
+    <script src="/assets/js/ie-emulation-modes-warning.js"></script>
+
+    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+    <!--[if lt IE 9]>
+      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+    <![endif]-->
+  </head>
+
+
+
+  <body>
+    <div class="container">
+        <!-- Fixed navbar -->
+    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a class="navbar-brand" href="/">Apache Storm<!-- <img alt="Apache Storm" src="/images/storm_logo_tagline_color.png"></a> -->
+        </div>
+        <div id="navbar" class="navbar-collapse collapse">
+          <ul class="nav navbar-nav">
+            <li><a href="/">Home</a></li>
+            <li><a href="/about/integrates.html">About</a></li>
+            <li><a href="/downloads.html">Download</a></li>
+			<li><a href="/documentation/Home.html">Documentation</a></li>
+			<li><a href="/news.html">News</a></li>
+          </ul>
+        </div><!--/.nav-collapse -->
+      </div>
+    </nav>
+
+
+
+
+      
+        <!-- Documentation -->
+<!-- <div class="container"> -->
+
+  <header class="post-header">
+    <h1 class="post-title">Trident API Overview</h1>
+    <p class="post-meta"></p>
+  </header>
 
-<p>The core data model in Trident is the &quot;Stream&quot;, processed as a series of batches. A stream is partitioned among the nodes in the cluster, and operations applied to a stream are applied in parallel across each partition.</p>
+  <article class="post-content">
+    <p>The core data model in Trident is the &quot;Stream&quot;, processed as a series of batches. A stream is partitioned among the nodes in the cluster, and operations applied to a stream are applied in parallel across each partition.</p>
 
 <p>There are five kinds of operations in Trident:</p>
 
@@ -79,61 +85,61 @@
 <li>Merges and joins</li>
 </ol>
 
-<h2 id="toc_1">Partition-local operations</h2>
+<h2 id="partition-local-operations">Partition-local operations</h2>
 
 <p>Partition-local operations involve no network transfer and are applied to each batch partition independently.</p>
 
-<h3 id="toc_2">Functions</h3>
+<h3 id="functions">Functions</h3>
 
 <p>A function takes in a set of input fields and emits zero or more tuples as output. The fields of the output tuple are appended to the original input tuple in the stream. If a function emits no tuples, the original input tuple is filtered out. Otherwise, the input tuple is duplicated for each output tuple. Suppose you have this function:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyFunction</span> <span class="kd">extends</span> <span class="n">BaseFunction</span> <span class="o">{</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyFunction</span> <span class="kd">extends</span> <span class="n">BaseFunction</span> <span class="o">{</span>
     <span class="kd">public</span> <span class="kt">void</span> <span class="nf">execute</span><span class="o">(</span><span class="n">TridentTuple</span> <span class="n">tuple</span><span class="o">,</span> <span class="n">TridentCollector</span> <span class="n">collector</span><span class="o">)</span> <span class="o">{</span>
         <span class="k">for</span><span class="o">(</span><span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="o">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">tuple</span><span class="o">.</span><span class="na">getInteger</span><span class="o">(</span><span class="mi">0</span><span class="o">);</span> <span class="n">i</span><span class="o">++)</span> <span class="o">{</span>
-            <span class="n">collector</span><span class="o">.</span><span class="na">emit</span><span class="o">(</span><span class="k">new</span> <span class="n">Values</span><span class="o">(</span><span class="n">i</span><span class="o">));</span>
+            <span class="n">collector</span><span class="o">.</span><span class="na">emit</span><span class="o">(</span><span class="k">new</span> <span class="nf">Values</span><span class="o">(</span><span class="n">i</span><span class="o">));</span>
         <span class="o">}</span>
     <span class="o">}</span>
 <span class="o">}</span>
 </code></pre></div>
 <p>Now suppose you have a stream in the variable &quot;mystream&quot; with the fields [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;] with the following tuples:</p>
-<div class="highlight"><pre><code class="text language-text" data-lang="text">[1, 2, 3]
+<div class="highlight"><pre><code class="language-text" data-lang="text">[1, 2, 3]
 [4, 1, 6]
 [3, 0, 8]
 </code></pre></div>
 <p>If you run this code:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">each</span><span class="o">(</span><span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;b&quot;</span><span class="o">),</span> <span class="k">new</span> <span class="n">MyFunction</span><span class="o">(),</span> <span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;d&quot;</span><span class="o">)))</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">each</span><span class="o">(</span><span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;b&quot;</span><span class="o">),</span> <span class="k">new</span> <span class="nf">MyFunction</span><span class="o">(),</span> <span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;d&quot;</span><span class="o">)))</span>
 </code></pre></div>
 <p>The resulting tuples would have fields [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;] and look like this:</p>
-<div class="highlight"><pre><code class="text language-text" data-lang="text">[1, 2, 3, 0]
+<div class="highlight"><pre><code class="language-text" data-lang="text">[1, 2, 3, 0]
 [1, 2, 3, 1]
 [4, 1, 6, 0]
 </code></pre></div>
-<h3 id="toc_3">Filters</h3>
+<h3 id="filters">Filters</h3>
 
 <p>Filters take in a tuple as input and decide whether or not to keep that tuple or not. Suppose you had this filter:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyFilter</span> <span class="kd">extends</span> <span class="n">BaseFunction</span> <span class="o">{</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyFilter</span> <span class="kd">extends</span> <span class="n">BaseFunction</span> <span class="o">{</span>
     <span class="kd">public</span> <span class="kt">boolean</span> <span class="nf">isKeep</span><span class="o">(</span><span class="n">TridentTuple</span> <span class="n">tuple</span><span class="o">)</span> <span class="o">{</span>
         <span class="k">return</span> <span class="n">tuple</span><span class="o">.</span><span class="na">getInteger</span><span class="o">(</span><span class="mi">0</span><span class="o">)</span> <span class="o">==</span> <span class="mi">1</span> <span class="o">&amp;&amp;</span> <span class="n">tuple</span><span class="o">.</span><span class="na">getInteger</span><span class="o">(</span><span class="mi">1</span><span class="o">)</span> <span class="o">==</span> <span class="mi">2</span><span class="o">;</span>
     <span class="o">}</span>
 <span class="o">}</span>
 </code></pre></div>
 <p>Now suppose you had these tuples with fields [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]:</p>
-<div class="highlight"><pre><code class="text language-text" data-lang="text">[1, 2, 3]
+<div class="highlight"><pre><code class="language-text" data-lang="text">[1, 2, 3]
 [2, 1, 1]
 [2, 3, 4]
 </code></pre></div>
 <p>If you ran this code:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">each</span><span class="o">(</span><span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;b&quot;</span><span class="o">,</span> <span class="s">&quot;a&quot;</span><span class="o">),</span> <span class="k">new</span> <span class="n">MyFilter</span><span class="o">())</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">each</span><span class="o">(</span><span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;b&quot;</span><span class="o">,</span> <span class="s">&quot;a&quot;</span><span class="o">),</span> <span class="k">new</span> <span class="nf">MyFilter</span><span class="o">())</span>
 </code></pre></div>
 <p>The resulting tuples would be:</p>
-<div class="highlight"><pre><code class="text language-text" data-lang="text">[2, 1, 1]
+<div class="highlight"><pre><code class="language-text" data-lang="text">[2, 1, 1]
 </code></pre></div>
-<h3 id="toc_4">partitionAggregate</h3>
+<h3 id="partitionaggregate">partitionAggregate</h3>
 
 <p>partitionAggregate runs a function on each partition of a batch of tuples. Unlike functions, the tuples emitted by partitionAggregate replace the input tuples given to it. Consider this example:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">partitionAggregate</span><span class="o">(</span><span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;b&quot;</span><span class="o">),</span> <span class="k">new</span> <span class="n">Sum</span><span class="o">(),</span> <span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;sum&quot;</span><span class="o">))</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">partitionAggregate</span><span class="o">(</span><span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;b&quot;</span><span class="o">),</span> <span class="k">new</span> <span class="nf">Sum</span><span class="o">(),</span> <span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;sum&quot;</span><span class="o">))</span>
 </code></pre></div>
 <p>Suppose the input stream contained fields [&quot;a&quot;, &quot;b&quot;] and the following partitions of tuples:</p>
-<div class="highlight"><pre><code class="text language-text" data-lang="text">Partition 0:
+<div class="highlight"><pre><code class="language-text" data-lang="text">Partition 0:
 [&quot;a&quot;, 1]
 [&quot;b&quot;, 2]
 
@@ -147,7 +153,7 @@ Partition 2:
 [&quot;d&quot;, 10]
 </code></pre></div>
 <p>Then the output stream of that code would contain these tuples with one field called &quot;sum&quot;:</p>
-<div class="highlight"><pre><code class="text language-text" data-lang="text">Partition 0:
+<div class="highlight"><pre><code class="language-text" data-lang="text">Partition 0:
 [3]
 
 Partition 1:
@@ -159,14 +165,14 @@ Partition 2:
 <p>There are three different interfaces for defining aggregators: CombinerAggregator, ReducerAggregator, and Aggregator.</p>
 
 <p>Here&#39;s the interface for CombinerAggregator:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">CombinerAggregator</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="kd">extends</span> <span class="n">Serializable</span> <span class="o">{</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">CombinerAggregator</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="kd">extends</span> <span class="n">Serializable</span> <span class="o">{</span>
     <span class="n">T</span> <span class="nf">init</span><span class="o">(</span><span class="n">TridentTuple</span> <span class="n">tuple</span><span class="o">);</span>
     <span class="n">T</span> <span class="nf">combine</span><span class="o">(</span><span class="n">T</span> <span class="n">val1</span><span class="o">,</span> <span class="n">T</span> <span class="n">val2</span><span class="o">);</span>
     <span class="n">T</span> <span class="nf">zero</span><span class="o">();</span>
 <span class="o">}</span>
 </code></pre></div>
 <p>A CombinerAggregator returns a single tuple with a single field as output. CombinerAggregators run the init function on each input tuple and use the combine function to combine values until there&#39;s only one value left. If there&#39;s no tuples in the partition, the CombinerAggregator emits the output of the zero function. For example, here&#39;s the implementation of Count:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">Count</span> <span class="kd">implements</span> <span class="n">CombinerAggregator</span><span class="o">&lt;</span><span class="n">Long</span><span class="o">&gt;</span> <span class="o">{</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">Count</span> <span class="kd">implements</span> <span class="n">CombinerAggregator</span><span class="o">&lt;</span><span class="n">Long</span><span class="o">&gt;</span> <span class="o">{</span>
     <span class="kd">public</span> <span class="n">Long</span> <span class="nf">init</span><span class="o">(</span><span class="n">TridentTuple</span> <span class="n">tuple</span><span class="o">)</span> <span class="o">{</span>
         <span class="k">return</span> <span class="mi">1L</span><span class="o">;</span>
     <span class="o">}</span>
@@ -183,13 +189,13 @@ Partition 2:
 <p>The benefits of CombinerAggregators are seen when you use the with the aggregate method instead of partitionAggregate. In that case, Trident automatically optimizes the computation by doing partial aggregations before transferring tuples over the network.</p>
 
 <p>A ReducerAggregator has the following interface:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">ReducerAggregator</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="kd">extends</span> <span class="n">Serializable</span> <span class="o">{</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">ReducerAggregator</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="kd">extends</span> <span class="n">Serializable</span> <span class="o">{</span>
     <span class="n">T</span> <span class="nf">init</span><span class="o">();</span>
     <span class="n">T</span> <span class="nf">reduce</span><span class="o">(</span><span class="n">T</span> <span class="n">curr</span><span class="o">,</span> <span class="n">TridentTuple</span> <span class="n">tuple</span><span class="o">);</span>
 <span class="o">}</span>
 </code></pre></div>
 <p>A ReducerAggregator produces an initial value with init, and then it iterates on that value for each input tuple to produce a single tuple with a single value as output. For example, here&#39;s how you would define Count as a ReducerAggregator:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">Count</span> <span class="kd">implements</span> <span class="n">ReducerAggregator</span><span class="o">&lt;</span><span class="n">Long</span><span class="o">&gt;</span> <span class="o">{</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">Count</span> <span class="kd">implements</span> <span class="n">ReducerAggregator</span><span class="o">&lt;</span><span class="n">Long</span><span class="o">&gt;</span> <span class="o">{</span>
     <span class="kd">public</span> <span class="n">Long</span> <span class="nf">init</span><span class="o">()</span> <span class="o">{</span>
         <span class="k">return</span> <span class="mi">0L</span><span class="o">;</span>
     <span class="o">}</span>
@@ -202,7 +208,7 @@ Partition 2:
 <p>ReducerAggregator can also be used with persistentAggregate, as you&#39;ll see later.</p>
 
 <p>The most general interface for performing aggregations is Aggregator, which looks like this:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Aggregator</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="kd">extends</span> <span class="n">Operation</span> <span class="o">{</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Aggregator</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="kd">extends</span> <span class="n">Operation</span> <span class="o">{</span>
     <span class="n">T</span> <span class="nf">init</span><span class="o">(</span><span class="n">Object</span> <span class="n">batchId</span><span class="o">,</span> <span class="n">TridentCollector</span> <span class="n">collector</span><span class="o">);</span>
     <span class="kt">void</span> <span class="nf">aggregate</span><span class="o">(</span><span class="n">T</span> <span class="n">state</span><span class="o">,</span> <span class="n">TridentTuple</span> <span class="n">tuple</span><span class="o">,</span> <span class="n">TridentCollector</span> <span class="n">collector</span><span class="o">);</span>
     <span class="kt">void</span> <span class="nf">complete</span><span class="o">(</span><span class="n">T</span> <span class="n">state</span><span class="o">,</span> <span class="n">TridentCollector</span> <span class="n">collector</span><span class="o">);</span>
@@ -217,7 +223,7 @@ Partition 2:
 </ol>
 
 <p>Here&#39;s how you would implement Count as an Aggregator:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">CountAgg</span> <span class="kd">extends</span> <span class="n">BaseAggregator</span><span class="o">&lt;</span><span class="n">CountState</span><span class="o">&gt;</span> <span class="o">{</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="kd">public</span> <span class="kd">class</span> <span class="nc">CountAgg</span> <span class="kd">extends</span> <span class="n">BaseAggregator</span><span class="o">&lt;</span><span class="n">CountState</span><span class="o">&gt;</span> <span class="o">{</span>
     <span class="kd">static</span> <span class="kd">class</span> <span class="nc">CountState</span> <span class="o">{</span>
         <span class="kt">long</span> <span class="n">count</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
     <span class="o">}</span>
@@ -231,30 +237,30 @@ Partition 2:
     <span class="o">}</span>
 
     <span class="kd">public</span> <span class="kt">void</span> <span class="nf">complete</span><span class="o">(</span><span class="n">CountState</span> <span class="n">state</span><span class="o">,</span> <span class="n">TridentCollector</span> <span class="n">collector</span><span class="o">)</span> <span class="o">{</span>
-        <span class="n">collector</span><span class="o">.</span><span class="na">emit</span><span class="o">(</span><span class="k">new</span> <span class="n">Values</span><span class="o">(</span><span class="n">state</span><span class="o">.</span><span class="na">count</span><span class="o">));</span>
+        <span class="n">collector</span><span class="o">.</span><span class="na">emit</span><span class="o">(</span><span class="k">new</span> <span class="nf">Values</span><span class="o">(</span><span class="n">state</span><span class="o">.</span><span class="na">count</span><span class="o">));</span>
     <span class="o">}</span>
 <span class="o">}</span>
 </code></pre></div>
 <p>Sometimes you want to execute multiple aggregators at the same time. This is called chaining and can be accomplished like this:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">chainedAgg</span><span class="o">()</span>
-        <span class="o">.</span><span class="na">partitionAggregate</span><span class="o">(</span><span class="k">new</span> <span class="n">Count</span><span class="o">(),</span> <span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;count&quot;</span><span class="o">))</span>
-        <span class="o">.</span><span class="na">partitionAggregate</span><span class="o">(</span><span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;b&quot;</span><span class="o">),</span> <span class="k">new</span> <span class="n">Sum</span><span class="o">(),</span> <span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;sum&quot;</span><span class="o">))</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">chainedAgg</span><span class="o">()</span>
+        <span class="o">.</span><span class="na">partitionAggregate</span><span class="o">(</span><span class="k">new</span> <span class="nf">Count</span><span class="o">(),</span> <span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;count&quot;</span><span class="o">))</span>
+        <span class="o">.</span><span class="na">partitionAggregate</span><span class="o">(</span><span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;b&quot;</span><span class="o">),</span> <span class="k">new</span> <span class="nf">Sum</span><span class="o">(),</span> <span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;sum&quot;</span><span class="o">))</span>
         <span class="o">.</span><span class="na">chainEnd</span><span class="o">()</span>
 </code></pre></div>
 <p>This code will run the Count and Sum aggregators on each partition. The output will contain a single tuple with the fields [&quot;count&quot;, &quot;sum&quot;].</p>
 
-<h3 id="toc_5">stateQuery and partitionPersist</h3>
+<h3 id="statequery-and-partitionpersist">stateQuery and partitionPersist</h3>
 
 <p>stateQuery and partitionPersist query and update sources of state, respectively. You can read about how to use them on <a href="Trident-state.html">Trident state doc</a>.</p>
 
-<h3 id="toc_6">projection</h3>
+<h3 id="projection">projection</h3>
 
 <p>The projection method on Stream keeps only the fields specified in the operation. If you had a Stream with fields [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;] and you ran this code:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">project</span><span class="o">(</span><span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;b&quot;</span><span class="o">,</span> <span class="s">&quot;d&quot;</span><span class="o">))</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">project</span><span class="o">(</span><span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;b&quot;</span><span class="o">,</span> <span class="s">&quot;d&quot;</span><span class="o">))</span>
 </code></pre></div>
 <p>The output stream would contain only the fields [&quot;b&quot;, &quot;d&quot;].</p>
 
-<h2 id="toc_7">Repartitioning operations</h2>
+<h2 id="repartitioning-operations">Repartitioning operations</h2>
 
 <p>Repartitioning operations run a function to change how the tuples are partitioned across tasks. The number of partitions can also change as a result of repartitioning (for example, if the parallelism hint is greater after repartioning). Repartitioning requires network transfer. Here are the repartitioning functions:</p>
 
@@ -267,40 +273,40 @@ Partition 2:
 <li>partition: This method takes in a custom partitioning function that implements backtype.storm.grouping.CustomStreamGrouping</li>
 </ol>
 
-<h2 id="toc_8">Aggregation operations</h2>
+<h2 id="aggregation-operations">Aggregation operations</h2>
 
 <p>Trident has aggregate and persistentAggregate methods for doing aggregations on Streams. aggregate is run on each batch of the stream in isolation, while persistentAggregate will aggregation on all tuples across all batches in the stream and store the result in a source of state.</p>
 
 <p>Running aggregate on a Stream does a global aggregation. When you use a ReducerAggregator or an Aggregator, the stream is first repartitioned into a single partition, and then the aggregation function is run on that partition. When you use a CombinerAggregator, on the other hand, first Trident will compute partial aggregations of each partition, then repartition to a single partition, and then finish the aggregation after the network transfer. CombinerAggregator&#39;s are far more efficient and should be used when possible.</p>
 
 <p>Here&#39;s an example of using aggregate to get a global count for a batch:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">aggregate</span><span class="o">(</span><span class="k">new</span> <span class="n">Count</span><span class="o">(),</span> <span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;count&quot;</span><span class="o">))</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">mystream</span><span class="o">.</span><span class="na">aggregate</span><span class="o">(</span><span class="k">new</span> <span class="nf">Count</span><span class="o">(),</span> <span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;count&quot;</span><span class="o">))</span>
 </code></pre></div>
 <p>Like partitionAggregate, aggregators for aggregate can be chained. However, if you chain a CombinerAggregator with a non-CombinerAggregator, Trident is unable to do the partial aggregation optimization.</p>
 
-<p>You can read more about how to use persistentAggregate in the <a href="https://github.com/apache/incubator-storm/wiki/Trident-state">Trident state doc</a>.</p>
+<p>You can read more about how to use persistentAggregate in the <a href="https://github.com/apache/storm/wiki/Trident-state">Trident state doc</a>.</p>
 
-<h2 id="toc_9">Operations on grouped streams</h2>
+<h2 id="operations-on-grouped-streams">Operations on grouped streams</h2>
 
 <p>The groupBy operation repartitions the stream by doing a partitionBy on the specified fields, and then within each partition groups tuples together whose group fields are equal. For example, here&#39;s an illustration of a groupBy operation:</p>
 
 <p><img src="images/grouping.png" alt="Grouping"></p>
 
-<p>If you run aggregators on a grouped stream, the aggregation will be run within each group instead of against the whole batch. persistentAggregate can also be run on a GroupedStream, in which case the results will be stored in a <a href="https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/storm/trident/state/map/MapState.java">MapState</a> with the key being the grouping fields. You can read more about persistentAggregate in the <a href="Trident-state.html">Trident state doc</a>.</p>
+<p>If you run aggregators on a grouped stream, the aggregation will be run within each group instead of against the whole batch. persistentAggregate can also be run on a GroupedStream, in which case the results will be stored in a <a href="https://github.com/apache/storm/blob/master/storm-core/src/jvm/storm/trident/state/map/MapState.java">MapState</a> with the key being the grouping fields. You can read more about persistentAggregate in the <a href="Trident-state.html">Trident state doc</a>.</p>
 
 <p>Like regular streams, aggregators on grouped streams can be chained.</p>
 
-<h2 id="toc_10">Merges and joins</h2>
+<h2 id="merges-and-joins">Merges and joins</h2>
 
 <p>The last part of the API is combining different streams together. The simplest way to combine streams is to merge them into one stream. You can do that with the TridentTopology#merge method, like so:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="n">topology</span><span class="o">.</span><span class="na">merge</span><span class="o">(</span><span class="n">stream1</span><span class="o">,</span> <span class="n">stream2</span><span class="o">,</span> <span class="n">stream3</span><span class="o">);</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">topology</span><span class="o">.</span><span class="na">merge</span><span class="o">(</span><span class="n">stream1</span><span class="o">,</span> <span class="n">stream2</span><span class="o">,</span> <span class="n">stream3</span><span class="o">);</span>
 </code></pre></div>
 <p>Trident will name the output fields of the new, merged stream as the output fields of the first stream.</p>
 
 <p>Another way to combine streams is with a join. Now, a standard join, like the kind from SQL, require finite input. So they don&#39;t make sense with infinite streams. Joins in Trident only apply within each small batch that comes off of the spout. </p>
 
 <p>Here&#39;s an example join between a stream containing fields [&quot;key&quot;, &quot;val1&quot;, &quot;val2&quot;] and another stream containing [&quot;x&quot;, &quot;val1&quot;]:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="n">topology</span><span class="o">.</span><span class="na">join</span><span class="o">(</span><span class="n">stream1</span><span class="o">,</span> <span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;key&quot;</span><span class="o">),</span> <span class="n">stream2</span><span class="o">,</span> <span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;x&quot;</span><span class="o">),</span> <span class="k">new</span> <span class="n">Fields</span><span class="o">(</span><span class="s">&quot;key&quot;</span><span class="o">,</span> <span class="s">&quot;a&quot;</span><span class="o">,</span> <span class="s">&quot;b&quot;</span><span class="o">,</span> <span class="s">&quot;c&quot;</span><span class="o">));</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">topology</span><span class="o">.</span><span class="na">join</span><span class="o">(</span><span class="n">stream1</span><span class="o">,</span> <span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;key&quot;</span><span class="o">),</span> <span class="n">stream2</span><span class="o">,</span> <span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;x&quot;</span><span class="o">),</span> <span class="k">new</span> <span class="nf">Fields</span><span class="o">(</span><span class="s">&quot;key&quot;</span><span class="o">,</span> <span class="s">&quot;a&quot;</span><span class="o">,</span> <span class="s">&quot;b&quot;</span><span class="o">,</span> <span class="s">&quot;c&quot;</span><span class="o">));</span>
 </code></pre></div>
 <p>This joins stream1 and stream2 together using &quot;key&quot; and &quot;x&quot; as the join fields for each respective stream. Then, Trident requires that all the output fields of the new stream be named, since the input streams could have overlapping field names. The tuples emitted from the join will contain:</p>
 
@@ -315,14 +321,30 @@ Partition 2:
 
 <p>To do this, you would make use of partitionPersist and stateQuery. The last hour of tuples from one side of the join would be stored and rotated in a source of state, keyed by the join field. Then the stateQuery would do lookups by the join field to perform the &quot;join&quot;.</p>
 
+  </article>
+
+<!-- </div> -->
+
+      
+
+    <hr/>
+<div id="footer" class="container text-center">
+	
+            <p class="text-muted credit"><p>
+Copyright © 2014 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. Apache Storm, Apache, the Apache feather logo, and the Apache Storm project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
+
 </div>
-</div>
-<div id="clear"></div></div>
-<div id="footer">
-	<p>
-Copyright © 2014 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. Apache Storm, Apache, the Apache feather logo, and the Apache Storm project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
-</div>
-</div>
-
-</body>
-</html>
\ No newline at end of file
+
+    <!-- Bootstrap core JavaScript
+    ================================================== -->
+    <!-- Placed at the end of the document so the pages load faster -->
+    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
+    <script src="/assets/js/bootstrap.min.js"></script>
+    <script src="/assets/js/docs.min.js"></script>
+    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
+    <script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
+    </div>
+	
+  </body>
+
+</html>

Modified: storm/site/publish/documentation/Trident-spouts.html
URL: http://svn.apache.org/viewvc/storm/site/publish/documentation/Trident-spouts.html?rev=1647601&r1=1647600&r2=1647601&view=diff
==============================================================================
--- storm/site/publish/documentation/Trident-spouts.html (original)
+++ storm/site/publish/documentation/Trident-spouts.html Tue Dec 23 15:59:17 2014
@@ -1,79 +1,87 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-	
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-   <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<meta name="description" content="Storm is a distributed and fault-tolerant realtime computation system. Similar to how Hadoop provides a set of general primitives for doing batch processing, Storm provides a set of general primitives for doing realtime computation. Storm is simple, can be used with any programming language, and is a lot of fun to use!" />
-	<meta name="keywords" content="storm, hadoop, realtime, stream, mapreduce, java, computation, scalability, clojure, scala, jvm, processing" />
-	<title>Storm Documentation</title>
-	<link rel="stylesheet" type="text/css" href="/css/style.css" media="screen" />
-<script type="text/javascript">
-
-  var _gaq = _gaq || [];
-  _gaq.push(['_setAccount', 'UA-32530285-1']);
-  _gaq.push(['_trackPageview']);
-
-  (function() {
-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-  })();
-
-</script>
-</head>
-
-<body>
-<div id="wrap">
-<div id="top">
-<div id="projecttitle">
-<h2><a href="/" title="Back to main page">Storm</a></h2>
-<p id="slogan">Distributed and fault-tolerant realtime computation</p>
-</div>
-<div id="menu">
-<ul>
-<li><a href="/about/integrates.html">about</a></li>
-
-<!--
-<li><a href="/blog.html">blog</a></li>
--->
-
-<li><a href="/documentation/Home.html">documentation</a></li>
-<li><a href="/blog.html">blog</a></li>
-<li><a href="/downloads.html">downloads</a></li>
-<li><a href="/community.html">community</a></li>
-</ul>
-</div>
-</div>
-<div id="content">
-<div id="sidebar">
-  <ul>
-  
-<li><a class="" href="/documentation/Home.html">Documentation Home</a></li>
-  
-<li><a class="" href="/documentation/Rationale.html">Rationale</a></li>
-  
-<li><a class="" href="/documentation/Tutorial.html">Tutorial</a></li>
-  
-<li><a class="" href="/documentation/Documentation.html">Manual</a></li>
-  
-<li><a class="" href="/apidocs/">Javadoc</a></li>
-  
-<li><a class="" href="/documentation/FAQ.html">FAQ</a></li>
-  
-<li><a class="" href="/documentation/Contributing-to-Storm.html">Contributing</a></li>
-  
-  </ul>
-</div>
-<div id="aboutcontent">
-<h1 id="toc_0">Trident spouts</h1>
+<!DOCTYPE html>
+<html>
+
+    <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="description" content="">
+    <meta name="author" content="">
+    <link rel="icon" href="/assets/favicon.ico">
+
+    <title>Trident Spouts</title>
+
+    <!-- Bootstrap core CSS -->
+    <link href="/assets/css/bootstrap.min.css" rel="stylesheet">
+    <!-- Bootstrap theme -->
+    <link href="/assets/css/bootstrap-theme.min.css" rel="stylesheet">
+
+    <!-- Custom styles for this template -->
+    <link href="/assets/css/theme.css" rel="stylesheet">
+	
+	<link href="/css/main.css" rel="stylesheet">
+
+    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
+    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
+    <script src="/assets/js/ie-emulation-modes-warning.js"></script>
+
+    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+    <!--[if lt IE 9]>
+      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+    <![endif]-->
+  </head>
+
+
+
+  <body>
+    <div class="container">
+        <!-- Fixed navbar -->
+    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a class="navbar-brand" href="/">Apache Storm<!-- <img alt="Apache Storm" src="/images/storm_logo_tagline_color.png"></a> -->
+        </div>
+        <div id="navbar" class="navbar-collapse collapse">
+          <ul class="nav navbar-nav">
+            <li><a href="/">Home</a></li>
+            <li><a href="/about/integrates.html">About</a></li>
+            <li><a href="/downloads.html">Download</a></li>
+			<li><a href="/documentation/Home.html">Documentation</a></li>
+			<li><a href="/news.html">News</a></li>
+          </ul>
+        </div><!--/.nav-collapse -->
+      </div>
+    </nav>
+
+
+
+
+      
+        <!-- Documentation -->
+<!-- <div class="container"> -->
+
+  <header class="post-header">
+    <h1 class="post-title">Trident Spouts</h1>
+    <p class="post-meta"></p>
+  </header>
+
+  <article class="post-content">
+    <h1 id="trident-spouts">Trident spouts</h1>
 
 <p>Like in the vanilla Storm API, spouts are the source of streams in a Trident topology. On top of the vanilla Storm spouts, Trident exposes additional APIs for more sophisticated spouts.</p>
 
 <p>There is an inextricable link between how you source your data streams and how you update state (e.g. databases) based on those data streams. See <a href="Trident-state.html">Trident state doc</a> for an explanation of this – understanding this link is imperative for understanding the spout options available.</p>
 
 <p>Regular Storm spouts will be non-transactional spouts in a Trident topology. To use a regular Storm IRichSpout, create the stream like this in a TridentTopology:</p>
-<div class="highlight"><pre><code class="java language-java" data-lang="java"><span class="n">TridentTopology</span> <span class="n">topology</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TridentTopology</span><span class="o">();</span>
-<span class="n">topology</span><span class="o">.</span><span class="na">newStream</span><span class="o">(</span><span class="s">&quot;myspoutid&quot;</span><span class="o">,</span> <span class="k">new</span> <span class="n">MyRichSpout</span><span class="o">());</span>
+<div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">TridentTopology</span> <span class="n">topology</span> <span class="o">=</span> <span class="k">new</span> <span class="nf">TridentTopology</span><span class="o">();</span>
+<span class="n">topology</span><span class="o">.</span><span class="na">newStream</span><span class="o">(</span><span class="s">&quot;myspoutid&quot;</span><span class="o">,</span> <span class="k">new</span> <span class="nf">MyRichSpout</span><span class="o">());</span>
 </code></pre></div>
 <p>All spouts in a Trident topology are required to be given a unique identifier for the stream – this identifier must be unique across all topologies run on the cluster. Trident will use this identifier to store metadata about what the spout has consumed in Zookeeper, including the txid and any metadata associated with the spout.</p>
 
@@ -85,33 +93,49 @@
 <li><code>transactional.zookeeper.root</code>: The root dir in Zookeeper where metadata is stored. Metadata will be stored at the path <root path>/<spout id></li>
 </ol>
 
-<h2 id="toc_1">Pipelining</h2>
+<h2 id="pipelining">Pipelining</h2>
 
 <p>By default, Trident processes a single batch at a time, waiting for the batch to succeed or fail before trying another batch. You can get significantly higher throughput – and lower latency of processing of each batch – by pipelining the batches. You configure the maximum amount of batches to be processed simultaneously with the &quot;topology.max.spout.pending&quot; property. </p>
 
 <p>Even while processing multiple batches simultaneously, Trident will order any state updates taking place in the topology among batches. For example, suppose you&#39;re doing a global count aggregation into a database. The idea is that while you&#39;re updating the count in the database for batch 1, you can still be computing the partial counts for batches 2 through 10. Trident won&#39;t move on to the state updates for batch 2 until the state updates for batch 1 have succeeded. This is essential for achieving exactly-once processing semantics, as outline in <a href="Trident-state.html">Trident state doc</a>.</p>
 
-<h2 id="toc_2">Trident spout types</h2>
+<h2 id="trident-spout-types">Trident spout types</h2>
 
 <p>Here are the following spout APIs available:</p>
 
 <ol>
-<li><a href="https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/storm/trident/spout/ITridentSpout.java">ITridentSpout</a>: The most general API that can support transactional or opaque transactional semantics. Generally you&#39;ll use one of the partitioned flavors of this API rather than this one directly.</li>
-<li><a href="https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/storm/trident/spout/IBatchSpout.java">IBatchSpout</a>: A non-transactional spout that emits batches of tuples at a time</li>
-<li><a href="https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/storm/trident/spout/IPartitionedTridentSpout.java">IPartitionedTridentSpout</a>: A transactional spout that reads from a partitioned data source (like a cluster of Kafka servers)</li>
-<li><a href="https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/storm/trident/spout/IOpaquePartitionedTridentSpout.java">IOpaquePartitionedTridentSpout</a>: An opaque transactional spout that reads from a partitioned data source</li>
+<li><a href="https://github.com/apache/storm/blob/master/storm-core/src/jvm/storm/trident/spout/ITridentSpout.java">ITridentSpout</a>: The most general API that can support transactional or opaque transactional semantics. Generally you&#39;ll use one of the partitioned flavors of this API rather than this one directly.</li>
+<li><a href="https://github.com/apache/storm/blob/master/storm-core/src/jvm/storm/trident/spout/IBatchSpout.java">IBatchSpout</a>: A non-transactional spout that emits batches of tuples at a time</li>
+<li><a href="https://github.com/apache/storm/blob/master/storm-core/src/jvm/storm/trident/spout/IPartitionedTridentSpout.java">IPartitionedTridentSpout</a>: A transactional spout that reads from a partitioned data source (like a cluster of Kafka servers)</li>
+<li><a href="https://github.com/apache/storm/blob/master/storm-core/src/jvm/storm/trident/spout/IOpaquePartitionedTridentSpout.java">IOpaquePartitionedTridentSpout</a>: An opaque transactional spout that reads from a partitioned data source</li>
 </ol>
 
 <p>And, like mentioned in the beginning of this tutorial, you can use regular IRichSpout&#39;s as well.</p>
 
+  </article>
+
+<!-- </div> -->
+
+      
+
+    <hr/>
+<div id="footer" class="container text-center">
+	
+            <p class="text-muted credit"><p>
+Copyright © 2014 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. Apache Storm, Apache, the Apache feather logo, and the Apache Storm project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
+
 </div>
-</div>
-<div id="clear"></div></div>
-<div id="footer">
-	<p>
-Copyright © 2014 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. Apache Storm, Apache, the Apache feather logo, and the Apache Storm project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
-</div>
-</div>
-
-</body>
-</html>
\ No newline at end of file
+
+    <!-- Bootstrap core JavaScript
+    ================================================== -->
+    <!-- Placed at the end of the document so the pages load faster -->
+    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
+    <script src="/assets/js/bootstrap.min.js"></script>
+    <script src="/assets/js/docs.min.js"></script>
+    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
+    <script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
+    </div>
+	
+  </body>
+
+</html>