Modified: incubator/samza/site/startup/download/index.html
URL: 
http://svn.apache.org/viewvc/incubator/samza/site/startup/download/index.html?rev=1605209&r1=1605208&r2=1605209&view=diff
==============================================================================
--- incubator/samza/site/startup/download/index.html (original)
+++ incubator/samza/site/startup/download/index.html Tue Jun 24 22:01:57 2014
@@ -23,6 +23,7 @@
     <link href="/css/bootstrap.min.css" rel="stylesheet"/>
     <link href="/css/font-awesome.min.css" rel="stylesheet"/>
     <link href="/css/main.css" rel="stylesheet"/>
+    <link href="/css/syntax.css" rel="stylesheet"/>
     <link rel="icon" type="image/png" href="/img/samza-icon.png">
   </head>
   <body>
@@ -135,61 +136,68 @@ All Samza JARs are published through Mav
 
 A Samza project that runs with Kafka and YARN should depend on the following 
artifacts.
 
-    <dependency>
-      <groupId>samza</groupId>
-      <artifactId>samza-api</artifactId>
-      <version>0.7.0</version>
-    </dependency>
-    <dependency>
-      <groupId>samza</groupId>
-      <artifactId>samza-core_2.9.2</artifactId>
-      <version>0.7.0</version>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>samza</groupId>
-      <artifactId>samza-serializers_2.9.2</artifactId>
-      <version>0.7.0</version>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>samza</groupId>
-      <artifactId>samza-yarn_2.9.2</artifactId>
-      <version>0.7.0</version>
-      <classifier>yarn-2.0.5-alpha</classifier>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>samza</groupId>
-      <artifactId>samza-kafka_2.9.2</artifactId>
-      <version>0.7.0</version>
-      <scope>runtime</scope>
-    </dependency>
+
+<div class="highlight"><pre><code class="xml"><span 
class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>samza<span 
class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>samza-api<span 
class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>0.7.0<span 
class="nt">&lt;/version&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+<span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>samza<span 
class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>samza-core_2.9.2<span 
class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>0.7.0<span 
class="nt">&lt;/version&gt;</span>
+  <span class="nt">&lt;scope&gt;</span>runtime<span 
class="nt">&lt;/scope&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+<span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>samza<span 
class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>samza-serializers_2.9.2<span 
class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>0.7.0<span 
class="nt">&lt;/version&gt;</span>
+  <span class="nt">&lt;scope&gt;</span>runtime<span 
class="nt">&lt;/scope&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+<span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>samza<span 
class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>samza-yarn_2.9.2<span 
class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>0.7.0<span 
class="nt">&lt;/version&gt;</span>
+  <span class="nt">&lt;classifier&gt;</span>yarn-2.0.5-alpha<span 
class="nt">&lt;/classifier&gt;</span>
+  <span class="nt">&lt;scope&gt;</span>runtime<span 
class="nt">&lt;/scope&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+<span class="nt">&lt;dependency&gt;</span>
+  <span class="nt">&lt;groupId&gt;</span>samza<span 
class="nt">&lt;/groupId&gt;</span>
+  <span class="nt">&lt;artifactId&gt;</span>samza-kafka_2.9.2<span 
class="nt">&lt;/artifactId&gt;</span>
+  <span class="nt">&lt;version&gt;</span>0.7.0<span 
class="nt">&lt;/version&gt;</span>
+  <span class="nt">&lt;scope&gt;</span>runtime<span 
class="nt">&lt;/scope&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span></code></pre></div>
+
 
 #### Repositories
 
 Samza is available in the Apache Maven repository.
 
-    <repository>
-      <id>apache-releases</id>
-      <url>https://repository.apache.org/content/groups/public</url>
-    </repository>
+
+<div class="highlight"><pre><code class="xml"><span 
class="nt">&lt;repository&gt;</span>
+  <span class="nt">&lt;id&gt;</span>apache-releases<span 
class="nt">&lt;/id&gt;</span>
+  <span 
class="nt">&lt;url&gt;</span>https://repository.apache.org/content/groups/public<span
 class="nt">&lt;/url&gt;</span>
+<span class="nt">&lt;/repository&gt;</span></code></pre></div>
+
 
 Snapshot builds are available in the Apache Maven snapshot repository.
 
-    <repository>
-      <id>apache-snapshots</id>
-      <url>https://repository.apache.org/content/groups/snapshots</url>
-    </repository>
+
+<div class="highlight"><pre><code class="xml"><span 
class="nt">&lt;repository&gt;</span>
+  <span class="nt">&lt;id&gt;</span>apache-snapshots<span 
class="nt">&lt;/id&gt;</span>
+  <span 
class="nt">&lt;url&gt;</span>https://repository.apache.org/content/groups/snapshots<span
 class="nt">&lt;/url&gt;</span>
+<span class="nt">&lt;/repository&gt;</span></code></pre></div>
+
 &ndash;>
 
 <h3 id="checking-out-and-building">Checking out and Building</h3>
 
 <p>If you&rsquo;re interested in working on Samza, or building the JARs from 
scratch, then you&rsquo;ll need to checkout and build the code. Samza does not 
have a binary release at this time. To check out and build Samza, run these 
commands.</p>
-<div class="highlight"><pre><code class="language-text" data-lang="text">git 
clone http://git-wip-us.apache.org/repos/asf/incubator-samza.git
-cd incubator-samza
-./gradlew clean build
-</code></pre></div>
+
+<div class="highlight"><pre><code class="bash">git clone 
http://git-wip-us.apache.org/repos/asf/incubator-samza.git
+<span class="nb">cd </span>incubator-samza
+./gradlew clean build</code></pre></div>
+
 <p>See the README.md file for details on building.</p>
 
 

Modified: incubator/samza/site/startup/hello-samza/0.7.0/index.html
URL: 
http://svn.apache.org/viewvc/incubator/samza/site/startup/hello-samza/0.7.0/index.html?rev=1605209&r1=1605208&r2=1605209&view=diff
==============================================================================
--- incubator/samza/site/startup/hello-samza/0.7.0/index.html (original)
+++ incubator/samza/site/startup/hello-samza/0.7.0/index.html Tue Jun 24 
22:01:57 2014
@@ -23,6 +23,7 @@
     <link href="/css/bootstrap.min.css" rel="stylesheet"/>
     <link href="/css/font-awesome.min.css" rel="stylesheet"/>
     <link href="/css/main.css" rel="stylesheet"/>
+    <link href="/css/syntax.css" rel="stylesheet"/>
     <link rel="icon" type="image/png" href="/img/samza-icon.png">
   </head>
   <body>
@@ -127,16 +128,18 @@
 <h3 id="get-the-code">Get the Code</h3>
 
 <p>Check out the hello-samza project:</p>
-<div class="highlight"><pre><code class="language-text" data-lang="text">git 
clone git://git.apache.org/incubator-samza-hello-samza.git hello-samza
-cd hello-samza
-</code></pre></div>
+
+<div class="highlight"><pre><code class="bash">git clone 
git://git.apache.org/incubator-samza-hello-samza.git hello-samza
+<span class="nb">cd </span>hello-samza</code></pre></div>
+
 <p>This project contains everything you&rsquo;ll need to run your first Samza 
jobs.</p>
 
 <h3 id="start-a-grid">Start a Grid</h3>
 
 <p>A Samza grid usually comprises three different systems: <a 
href="http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/YARN.html";>YARN</a>,
 <a href="http://kafka.apache.org/";>Kafka</a>, and <a 
href="http://zookeeper.apache.org/";>ZooKeeper</a>. The hello-samza project 
comes with a script called &ldquo;grid&rdquo; to help you setup these systems. 
Start by running:</p>
-<div class="highlight"><pre><code class="language-text" 
data-lang="text">bin/grid bootstrap
-</code></pre></div>
+
+<div class="highlight"><pre><code class="bash">bin/grid 
bootstrap</code></pre></div>
+
 <p>This command will download, install, and start ZooKeeper, Kafka, and YARN. 
It will also check out the latest version of Samza and build it. All package 
files will be put in a sub-directory called &ldquo;deploy&rdquo; inside 
hello-samza&rsquo;s root folder.</p>
 
 <p>If you get a complaint that JAVA_HOME is not set, then you&rsquo;ll need to 
set it to the path where Java is installed on your system.</p>
@@ -146,18 +149,21 @@ cd hello-samza
 <h3 id="build-a-samza-job-package">Build a Samza Job Package</h3>
 
 <p>Before you can run a Samza job, you need to build a package for it. This 
package is what YARN uses to deploy your jobs on the grid.</p>
-<div class="highlight"><pre><code class="language-text" data-lang="text">mvn 
clean package
+
+<div class="highlight"><pre><code class="bash">mvn clean package
 mkdir -p deploy/samza
-tar -xvf ./samza-job-package/target/samza-job-package-0.7.0-dist.tar.gz -C 
deploy/samza
-</code></pre></div>
+tar -xvf ./samza-job-package/target/samza-job-package-0.7.0-dist.tar.gz -C 
deploy/samza</code></pre></div>
+
 <h3 id="run-a-samza-job">Run a Samza Job</h3>
 
 <p>After you&rsquo;ve built your Samza package, you can start a job on the 
grid using the run-job.sh script.</p>
-<div class="highlight"><pre><code class="language-text" 
data-lang="text">deploy/samza/bin/run-job.sh 
--config-factory=org.apache.samza.config.factories.PropertiesConfigFactory 
--config-path=file://$PWD/deploy/samza/config/wikipedia-feed.properties
-</code></pre></div>
+
+<div class="highlight"><pre><code class="bash">deploy/samza/bin/run-job.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/wikipedia-feed.properties</code></pre></div>
+
 <p>The job will consume a feed of real-time edits from Wikipedia, and produce 
them to a Kafka topic called &ldquo;wikipedia-raw&rdquo;. Give the job a minute 
to startup, and then tail the Kafka topic:</p>
-<div class="highlight"><pre><code class="language-text" 
data-lang="text">deploy/kafka/bin/kafka-console-consumer.sh  --zookeeper 
localhost:2181 --topic wikipedia-raw
-</code></pre></div>
+
+<div class="highlight"><pre><code 
class="bash">deploy/kafka/bin/kafka-console-consumer.sh  --zookeeper 
localhost:2181 --topic wikipedia-raw</code></pre></div>
+
 <p>Pretty neat, right? Now, check out the YARN UI again (<a 
href="http://localhost:8088";>http://localhost:8088</a>). This time around, 
you&rsquo;ll see your Samza job is running!</p>
 
 <p>If you can not see any output from Kafka consumer, you may have connection 
problem. Check <a 
href="../../../learn/tutorials/0.7.0/run-hello-samza-without-internet.html">here</a>.</p>
@@ -165,28 +171,33 @@ tar -xvf ./samza-job-package/target/samz
 <h3 id="generate-wikipedia-statistics">Generate Wikipedia Statistics</h3>
 
 <p>Let&rsquo;s calculate some statistics based on the messages in the 
wikipedia-raw topic. Start two more jobs:</p>
-<div class="highlight"><pre><code class="language-text" 
data-lang="text">deploy/samza/bin/run-job.sh 
--config-factory=org.apache.samza.config.factories.PropertiesConfigFactory 
--config-path=file://$PWD/deploy/samza/config/wikipedia-parser.properties
-deploy/samza/bin/run-job.sh 
--config-factory=org.apache.samza.config.factories.PropertiesConfigFactory 
--config-path=file://$PWD/deploy/samza/config/wikipedia-stats.properties
-</code></pre></div>
+
+<div class="highlight"><pre><code class="bash">deploy/samza/bin/run-job.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/wikipedia-parser.properties
+deploy/samza/bin/run-job.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/wikipedia-stats.properties</code></pre></div>
+
 <p>The first job (wikipedia-parser) parses the messages in wikipedia-raw, and 
extracts information about the size of the edit, who made the change, etc. You 
can take a look at its output with:</p>
-<div class="highlight"><pre><code class="language-text" 
data-lang="text">deploy/kafka/bin/kafka-console-consumer.sh  --zookeeper 
localhost:2181 --topic wikipedia-edits
-</code></pre></div>
+
+<div class="highlight"><pre><code 
class="bash">deploy/kafka/bin/kafka-console-consumer.sh  --zookeeper 
localhost:2181 --topic wikipedia-edits</code></pre></div>
+
 <p>The last job (wikipedia-stats) reads messages from the wikipedia-edits 
topic, and calculates counts, every ten seconds, for all edits that were made 
during that window. It outputs these counts to the wikipedia-stats topic.</p>
-<div class="highlight"><pre><code class="language-text" 
data-lang="text">deploy/kafka/bin/kafka-console-consumer.sh  --zookeeper 
localhost:2181 --topic wikipedia-stats
-</code></pre></div>
+
+<div class="highlight"><pre><code 
class="bash">deploy/kafka/bin/kafka-console-consumer.sh  --zookeeper 
localhost:2181 --topic wikipedia-stats</code></pre></div>
+
 <p>The messages in the stats topic look like this:</p>
-<div class="highlight"><pre><code class="language-text" 
data-lang="text">{&quot;is-talk&quot;:2,&quot;bytes-added&quot;:5276,&quot;edits&quot;:13,&quot;unique-titles&quot;:13}
-{&quot;is-bot-edit&quot;:1,&quot;is-talk&quot;:3,&quot;bytes-added&quot;:4211,&quot;edits&quot;:30,&quot;unique-titles&quot;:30,&quot;is-unpatrolled&quot;:1,&quot;is-new&quot;:2,&quot;is-minor&quot;:7}
-{&quot;bytes-added&quot;:3180,&quot;edits&quot;:19,&quot;unique-titles&quot;:19,&quot;is-unpatrolled&quot;:1,&quot;is-new&quot;:1,&quot;is-minor&quot;:3}
-{&quot;bytes-added&quot;:2218,&quot;edits&quot;:18,&quot;unique-titles&quot;:18,&quot;is-unpatrolled&quot;:2,&quot;is-new&quot;:2,&quot;is-minor&quot;:3}
-</code></pre></div>
+
+<div class="highlight"><pre><code class="json"><span class="p">{</span><span 
class="nt">&quot;is-talk&quot;</span><span class="p">:</span><span 
class="mi">2</span><span class="p">,</span><span 
class="nt">&quot;bytes-added&quot;</span><span class="p">:</span><span 
class="mi">5276</span><span class="p">,</span><span 
class="nt">&quot;edits&quot;</span><span class="p">:</span><span 
class="mi">13</span><span class="p">,</span><span 
class="nt">&quot;unique-titles&quot;</span><span class="p">:</span><span 
class="mi">13</span><span class="p">}</span>
+<span class="p">{</span><span class="nt">&quot;is-bot-edit&quot;</span><span 
class="p">:</span><span class="mi">1</span><span class="p">,</span><span 
class="nt">&quot;is-talk&quot;</span><span class="p">:</span><span 
class="mi">3</span><span class="p">,</span><span 
class="nt">&quot;bytes-added&quot;</span><span class="p">:</span><span 
class="mi">4211</span><span class="p">,</span><span 
class="nt">&quot;edits&quot;</span><span class="p">:</span><span 
class="mi">30</span><span class="p">,</span><span 
class="nt">&quot;unique-titles&quot;</span><span class="p">:</span><span 
class="mi">30</span><span class="p">,</span><span 
class="nt">&quot;is-unpatrolled&quot;</span><span class="p">:</span><span 
class="mi">1</span><span class="p">,</span><span 
class="nt">&quot;is-new&quot;</span><span class="p">:</span><span 
class="mi">2</span><span class="p">,</span><span 
class="nt">&quot;is-minor&quot;</span><span class="p">:</span><span 
class="mi">7</span><span class="p">}</span>
+<span class="p">{</span><span class="nt">&quot;bytes-added&quot;</span><span 
class="p">:</span><span class="mi">3180</span><span class="p">,</span><span 
class="nt">&quot;edits&quot;</span><span class="p">:</span><span 
class="mi">19</span><span class="p">,</span><span 
class="nt">&quot;unique-titles&quot;</span><span class="p">:</span><span 
class="mi">19</span><span class="p">,</span><span 
class="nt">&quot;is-unpatrolled&quot;</span><span class="p">:</span><span 
class="mi">1</span><span class="p">,</span><span 
class="nt">&quot;is-new&quot;</span><span class="p">:</span><span 
class="mi">1</span><span class="p">,</span><span 
class="nt">&quot;is-minor&quot;</span><span class="p">:</span><span 
class="mi">3</span><span class="p">}</span>
+<span class="p">{</span><span class="nt">&quot;bytes-added&quot;</span><span 
class="p">:</span><span class="mi">2218</span><span class="p">,</span><span 
class="nt">&quot;edits&quot;</span><span class="p">:</span><span 
class="mi">18</span><span class="p">,</span><span 
class="nt">&quot;unique-titles&quot;</span><span class="p">:</span><span 
class="mi">18</span><span class="p">,</span><span 
class="nt">&quot;is-unpatrolled&quot;</span><span class="p">:</span><span 
class="mi">2</span><span class="p">,</span><span 
class="nt">&quot;is-new&quot;</span><span class="p">:</span><span 
class="mi">2</span><span class="p">,</span><span 
class="nt">&quot;is-minor&quot;</span><span class="p">:</span><span 
class="mi">3</span><span class="p">}</span></code></pre></div>
+
 <p>If you check the YARN UI, again, you&rsquo;ll see that all three jobs are 
now listed.</p>
 
 <h3 id="shutdown">Shutdown</h3>
 
 <p>After you&rsquo;re done, you can clean everything up using the same grid 
script.</p>
-<div class="highlight"><pre><code class="language-text" 
data-lang="text">bin/grid stop all
-</code></pre></div>
+
+<div class="highlight"><pre><code class="bash">bin/grid stop 
all</code></pre></div>
+
 <p>Congratulations! You&rsquo;ve now setup a local grid that includes YARN, 
Kafka, and ZooKeeper, and run a Samza job on it. Next up, check out the <a 
href="/learn/documentation/0.7.0/introduction/background.html">Background</a> 
and <a href="/learn/documentation/0.7.0/api/overview.html">API Overview</a> 
pages.</p>
 
 


Reply via email to