You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by ki...@apache.org on 2013/01/10 09:06:55 UTC

svn commit: r1431202 [1/16] - in /incubator/helix/site-content: ./ apidocs/reference/org/apache/helix/tools/ helix-admin-webapp/ helix-core/ involved/ mockservice/ recipes/ recipes/distributed-lock-manager/ recipes/rabbitmq-consumer-group/ recipes/rsyn...

Author: kishoreg
Date: Thu Jan 10 08:06:51 2013
New Revision: 1431202

URL: http://svn.apache.org/viewvc?rev=1431202&view=rev
Log:
Site checkin for project Apache Helix

Added:
    incubator/helix/site-content/Sample_App.html
    incubator/helix/site-content/apidocs/reference/org/apache/helix/tools/IdealStateCalculatorForStorageNode.html
    incubator/helix/site-content/involved/release.html
    incubator/helix/site-content/xref/org/apache/helix/tools/IdealStateCalculatorForStorageNode.html
Modified:
    incubator/helix/site-content/ApiUsage.html
    incubator/helix/site-content/Architecture.html
    incubator/helix/site-content/Features.html
    incubator/helix/site-content/Quickstart.html
    incubator/helix/site-content/UseCases.html
    incubator/helix/site-content/checkstyle-aggregate.html
    incubator/helix/site-content/checkstyle.rss
    incubator/helix/site-content/dependencies.html
    incubator/helix/site-content/dependency-convergence.html
    incubator/helix/site-content/dependency-info.html
    incubator/helix/site-content/dependency-management.html
    incubator/helix/site-content/distribution-management.html
    incubator/helix/site-content/helix-admin-webapp/dependencies.html
    incubator/helix/site-content/helix-admin-webapp/dependency-convergence.html
    incubator/helix/site-content/helix-admin-webapp/dependency-info.html
    incubator/helix/site-content/helix-admin-webapp/dependency-management.html
    incubator/helix/site-content/helix-admin-webapp/distribution-management.html
    incubator/helix/site-content/helix-admin-webapp/index.html
    incubator/helix/site-content/helix-admin-webapp/integration.html
    incubator/helix/site-content/helix-admin-webapp/issue-tracking.html
    incubator/helix/site-content/helix-admin-webapp/license.html
    incubator/helix/site-content/helix-admin-webapp/mail-lists.html
    incubator/helix/site-content/helix-admin-webapp/plugin-management.html
    incubator/helix/site-content/helix-admin-webapp/plugins.html
    incubator/helix/site-content/helix-admin-webapp/project-info.html
    incubator/helix/site-content/helix-admin-webapp/project-reports.html
    incubator/helix/site-content/helix-admin-webapp/project-summary.html
    incubator/helix/site-content/helix-admin-webapp/sonar.html
    incubator/helix/site-content/helix-admin-webapp/source-repository.html
    incubator/helix/site-content/helix-admin-webapp/team-list.html
    incubator/helix/site-content/helix-core/dependencies.html
    incubator/helix/site-content/helix-core/dependency-convergence.html
    incubator/helix/site-content/helix-core/dependency-info.html
    incubator/helix/site-content/helix-core/dependency-management.html
    incubator/helix/site-content/helix-core/distribution-management.html
    incubator/helix/site-content/helix-core/index.html
    incubator/helix/site-content/helix-core/integration.html
    incubator/helix/site-content/helix-core/issue-tracking.html
    incubator/helix/site-content/helix-core/license.html
    incubator/helix/site-content/helix-core/mail-lists.html
    incubator/helix/site-content/helix-core/plugin-management.html
    incubator/helix/site-content/helix-core/plugins.html
    incubator/helix/site-content/helix-core/project-info.html
    incubator/helix/site-content/helix-core/project-reports.html
    incubator/helix/site-content/helix-core/project-summary.html
    incubator/helix/site-content/helix-core/sonar.html
    incubator/helix/site-content/helix-core/source-repository.html
    incubator/helix/site-content/helix-core/team-list.html
    incubator/helix/site-content/index.html
    incubator/helix/site-content/integration.html
    incubator/helix/site-content/involved/building.html
    incubator/helix/site-content/issue-tracking.html
    incubator/helix/site-content/jira-report.html
    incubator/helix/site-content/license.html
    incubator/helix/site-content/mail-lists.html
    incubator/helix/site-content/mockservice/dependencies.html
    incubator/helix/site-content/mockservice/dependency-convergence.html
    incubator/helix/site-content/mockservice/dependency-info.html
    incubator/helix/site-content/mockservice/dependency-management.html
    incubator/helix/site-content/mockservice/distribution-management.html
    incubator/helix/site-content/mockservice/index.html
    incubator/helix/site-content/mockservice/integration.html
    incubator/helix/site-content/mockservice/issue-tracking.html
    incubator/helix/site-content/mockservice/license.html
    incubator/helix/site-content/mockservice/mail-lists.html
    incubator/helix/site-content/mockservice/plugin-management.html
    incubator/helix/site-content/mockservice/plugins.html
    incubator/helix/site-content/mockservice/project-info.html
    incubator/helix/site-content/mockservice/project-reports.html
    incubator/helix/site-content/mockservice/project-summary.html
    incubator/helix/site-content/mockservice/sonar.html
    incubator/helix/site-content/mockservice/source-repository.html
    incubator/helix/site-content/mockservice/team-list.html
    incubator/helix/site-content/modules.html
    incubator/helix/site-content/plugin-management.html
    incubator/helix/site-content/plugins.html
    incubator/helix/site-content/project-info.html
    incubator/helix/site-content/project-reports.html
    incubator/helix/site-content/project-summary.html
    incubator/helix/site-content/recipes/dependencies.html
    incubator/helix/site-content/recipes/dependency-convergence.html
    incubator/helix/site-content/recipes/dependency-info.html
    incubator/helix/site-content/recipes/dependency-management.html
    incubator/helix/site-content/recipes/distributed-lock-manager/dependencies.html
    incubator/helix/site-content/recipes/distributed-lock-manager/dependency-convergence.html
    incubator/helix/site-content/recipes/distributed-lock-manager/dependency-info.html
    incubator/helix/site-content/recipes/distributed-lock-manager/dependency-management.html
    incubator/helix/site-content/recipes/distributed-lock-manager/distribution-management.html
    incubator/helix/site-content/recipes/distributed-lock-manager/index.html
    incubator/helix/site-content/recipes/distributed-lock-manager/integration.html
    incubator/helix/site-content/recipes/distributed-lock-manager/issue-tracking.html
    incubator/helix/site-content/recipes/distributed-lock-manager/license.html
    incubator/helix/site-content/recipes/distributed-lock-manager/mail-lists.html
    incubator/helix/site-content/recipes/distributed-lock-manager/plugin-management.html
    incubator/helix/site-content/recipes/distributed-lock-manager/plugins.html
    incubator/helix/site-content/recipes/distributed-lock-manager/project-info.html
    incubator/helix/site-content/recipes/distributed-lock-manager/project-reports.html
    incubator/helix/site-content/recipes/distributed-lock-manager/project-summary.html
    incubator/helix/site-content/recipes/distributed-lock-manager/sonar.html
    incubator/helix/site-content/recipes/distributed-lock-manager/source-repository.html
    incubator/helix/site-content/recipes/distributed-lock-manager/team-list.html
    incubator/helix/site-content/recipes/distribution-management.html
    incubator/helix/site-content/recipes/index.html
    incubator/helix/site-content/recipes/integration.html
    incubator/helix/site-content/recipes/issue-tracking.html
    incubator/helix/site-content/recipes/license.html
    incubator/helix/site-content/recipes/lock_manager.html
    incubator/helix/site-content/recipes/mail-lists.html
    incubator/helix/site-content/recipes/modules.html
    incubator/helix/site-content/recipes/plugin-management.html
    incubator/helix/site-content/recipes/plugins.html
    incubator/helix/site-content/recipes/project-info.html
    incubator/helix/site-content/recipes/project-reports.html
    incubator/helix/site-content/recipes/project-summary.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/dependencies.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/dependency-convergence.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/dependency-info.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/dependency-management.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/distribution-management.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/index.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/integration.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/issue-tracking.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/license.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/mail-lists.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/plugin-management.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/plugins.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/project-info.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/project-reports.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/project-summary.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/sonar.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/source-repository.html
    incubator/helix/site-content/recipes/rabbitmq-consumer-group/team-list.html
    incubator/helix/site-content/recipes/rabbitmq_consumer_group.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/dependencies.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/dependency-convergence.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/dependency-info.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/dependency-management.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/distribution-management.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/index.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/integration.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/issue-tracking.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/license.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/mail-lists.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/plugin-management.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/plugins.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/project-info.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/project-reports.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/project-summary.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/sonar.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/source-repository.html
    incubator/helix/site-content/recipes/rsync-replicated-file-system/team-list.html
    incubator/helix/site-content/recipes/rsync_replicated_file_store.html
    incubator/helix/site-content/recipes/sonar.html
    incubator/helix/site-content/recipes/source-repository.html
    incubator/helix/site-content/recipes/team-list.html
    incubator/helix/site-content/releasenotes/release-0.6.0-incubating.html
    incubator/helix/site-content/releasing.html
    incubator/helix/site-content/sonar.html
    incubator/helix/site-content/source-repository.html
    incubator/helix/site-content/team-list.html
    incubator/helix/site-content/xref/allclasses-frame.html
    incubator/helix/site-content/xref/org/apache/helix/NotificationContext.html
    incubator/helix/site-content/xref/org/apache/helix/PropertyType.html
    incubator/helix/site-content/xref/org/apache/helix/package-frame.html
    incubator/helix/site-content/xref/org/apache/helix/package-summary.html

Modified: incubator/helix/site-content/ApiUsage.html
URL: http://svn.apache.org/viewvc/incubator/helix/site-content/ApiUsage.html?rev=1431202&r1=1431201&r2=1431202&view=diff
==============================================================================
--- incubator/helix/site-content/ApiUsage.html (original)
+++ incubator/helix/site-content/ApiUsage.html Thu Jan 10 08:06:51 2013
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at Jan 9, 2013
+ | Generated by Apache Maven Doxia at Jan 10, 2013
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20130109" />
+    <meta name="Date-Revision-yyyymmdd" content="20130110" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache Helix - </title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -211,7 +211,7 @@
         
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2013-01-09</li> <li class="divider pull-right">|</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2013-01-10</li> <li class="divider pull-right">|</li>
               <li id="projectVersion" class="pull-right">Version: 0.6.1-incubating-SNAPSHOT</li>
             
                             </ul>

Modified: incubator/helix/site-content/Architecture.html
URL: http://svn.apache.org/viewvc/incubator/helix/site-content/Architecture.html?rev=1431202&r1=1431201&r2=1431202&view=diff
==============================================================================
--- incubator/helix/site-content/Architecture.html (original)
+++ incubator/helix/site-content/Architecture.html Thu Jan 10 08:06:51 2013
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at Jan 9, 2013
+ | Generated by Apache Maven Doxia at Jan 10, 2013
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20130109" />
+    <meta name="Date-Revision-yyyymmdd" content="20130110" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache Helix - </title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -211,7 +211,7 @@
         
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2013-01-09</li> <li class="divider pull-right">|</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2013-01-10</li> <li class="divider pull-right">|</li>
               <li id="projectVersion" class="pull-right">Version: 0.6.1-incubating-SNAPSHOT</li>
             
                             </ul>

Modified: incubator/helix/site-content/Features.html
URL: http://svn.apache.org/viewvc/incubator/helix/site-content/Features.html?rev=1431202&r1=1431201&r2=1431202&view=diff
==============================================================================
--- incubator/helix/site-content/Features.html (original)
+++ incubator/helix/site-content/Features.html Thu Jan 10 08:06:51 2013
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at Jan 9, 2013
+ | Generated by Apache Maven Doxia at Jan 10, 2013
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20130109" />
+    <meta name="Date-Revision-yyyymmdd" content="20130110" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache Helix - </title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -211,7 +211,7 @@
         
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2013-01-09</li> <li class="divider pull-right">|</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2013-01-10</li> <li class="divider pull-right">|</li>
               <li id="projectVersion" class="pull-right">Version: 0.6.1-incubating-SNAPSHOT</li>
             
                             </ul>

Modified: incubator/helix/site-content/Quickstart.html
URL: http://svn.apache.org/viewvc/incubator/helix/site-content/Quickstart.html?rev=1431202&r1=1431201&r2=1431202&view=diff
==============================================================================
--- incubator/helix/site-content/Quickstart.html (original)
+++ incubator/helix/site-content/Quickstart.html Thu Jan 10 08:06:51 2013
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at Jan 9, 2013
+ | Generated by Apache Maven Doxia at Jan 10, 2013
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20130109" />
+    <meta name="Date-Revision-yyyymmdd" content="20130110" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache Helix - </title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -211,7 +211,7 @@
         
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2013-01-09</li> <li class="divider pull-right">|</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2013-01-10</li> <li class="divider pull-right">|</li>
               <li id="projectVersion" class="pull-right">Version: 0.6.1-incubating-SNAPSHOT</li>
             
                             </ul>
@@ -243,10 +243,10 @@ cd incubator-helix
 mvn install package -DskipTests 
 cd helix-core/target/helix-core-pkg/bin //This folder contains all the scripts used in following sections
 chmod \+x *
-</pre></div></div><div class="section"><h3>Download Helix<a name="Download_Helix"></a></h3><p>Instead of building the package from the code, you can download the 0.5.28 release package from <a class="externalLink" href="http://linkedin.github.com/helix/download/release-0.5.28/helix-core-pkg-0.5.28.tar.gz">here</a> </p></div></div><div class="section"><h2>Short Version<a name="Short_Version"></a></h2>
+</pre></div></div><div class="section"><h3>Download Helix<a name="Download_Helix"></a></h3><p>Instead of building the package from the code, you can download the 0.6.0-incubating release package from <a class="externalLink" href="https://dist.apache.org/repos/dist/dev/incubator/helix/0.6.0-incubating/binaries/helix-core-0.6.0-incubating-pkg.tar">here</a> </p></div></div><div class="section"><h2>Short Version<a name="Short_Version"></a></h2>
 <div class="source"><pre class="prettyprint">cd helix-core/target/helix-core-pkg/bin
 chmod +x *
-./quickstart
+./quickstart.sh
 </pre></div><p>This gives an overview of Helix Apis and how it facilitates Automatic Partition Management, Failure Handling and Cluster Expansion. </p><p>The quick start does the following</p>
 <ul>
   <li>Add a cluster</li>
@@ -257,65 +257,75 @@ chmod +x *
   <li>Shows cluster state after the rebalance</li>
   <li>Stop a node and see that master ship transfer occurs.</li>
   <li>Shows cluster state after node is stopped.</li>
-</ul></div><div class="section"><h2>Long Version<a name="Long_Version"></a></h2><p>Helix provides command line interfaces to setup the cluster and also view the cluster state. Follow the steps below to get a better understanding of the steps involved to setup a distributed system.</p><div class="section"><h3>Install/Start zookeeper<a name="InstallStart_zookeeper"></a></h3><p>Zookeeper can be started in standalone mode or replicated mode.</p><p>More info is available at <a class="externalLink" href="http://zookeeper.apache.org/doc/r3.3.3/zookeeperStarted.html">http://zookeeper.apache.org/doc/r3.3.3/zookeeperStarted.html</a> and <a class="externalLink" href="http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_zkMulitServerSetup">http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_zkMulitServerSetup</a></p><p>In this example, we will start zookeeper in local mode.</p></div><div class="section"><h3>Cluster setup<a name="Cluster_setup"></a></h3><p>cluster-admin 
 tool is used for cluster administration tasks. Apart from a command line interface Helix supports a REST interface as well.</p><p>zookeeper_address is of the format host:port e.g localhost:2199 for standalone or host1:port,host2:port for multi node.</p><p>In the following section we will see how one can set up a mock mycluster cluster with </p>
+</ul></div><div class="section"><h2>Long Version<a name="Long_Version"></a></h2><p>Helix provides command line interfaces to setup the cluster and also view the cluster state. Follow the steps below to get a better understanding of the steps involved to setup a distributed system.</p><div class="section"><h3>Install/Start zookeeper<a name="InstallStart_zookeeper"></a></h3><p>Zookeeper can be started in standalone mode or replicated mode.</p><p>More info is available at  * <a class="externalLink" href="http://zookeeper.apache.org/doc/r3.3.3/zookeeperStarted.html">http://zookeeper.apache.org/doc/r3.3.3/zookeeperStarted.html</a>  * <a class="externalLink" href="http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_zkMulitServerSetup">http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_zkMulitServerSetup</a></p><p>In this example, we will start zookeeper in local mode.</p></div><div class="section"><h3>Cluster setup<a name="Cluster_setup"></a></h3><p>helix-admin 
 tool is used for cluster administration tasks. Apart from a command line interface Helix supports a REST interface as well.</p><p>zookeeper_address is of the format host:port e.g localhost:2199 for standalone or host1:port,host2:port for multi node.</p><p>In the following section we will see how one can set up a mock mycluster cluster with </p>
 <ul>
-  <li>3 node instances running on localhost at 12913, 12914,12915</li>
+  <li>3 instances running on localhost at 12913, 12914,12915</li>
   <li>One database named MyDB with 6 partitions</li>
   <li>Each partition will have 3 replicas with 1 master, 2 slaves</li>
   <li>zookeeper running locally at localhost:2199</li>
-</ul><p>Note that this mock cluster does not have any functionality apart from handling Helix callbacks.</p></div><div class="section"><h3>Steps<a name="Steps"></a></h3><p>If you build the code cd helix/helix-core/target/helix-core-pkg If you download the release package, extract it. cd helix-core-pkg</p><div class="section"><div class="section"><h5>start zookeeper locally at port 2199<a name="start_zookeeper_locally_at_port_2199"></a></h5>
+</ul><p>Note that this mock cluster does not have any functionality apart from handling Helix callbacks.</p></div><div class="section"><h3>Steps<a name="Steps"></a></h3>
+<ul>
+  <li>If you built the code</li>
+</ul>
+<div class="source"><pre class="prettyprint">cd helix/helix-core/target/helix-core-pkg
+</pre></div>
+<ul>
+  <li>If you downloaded the release package, extract it.</li>
+</ul>
+<div class="source"><pre class="prettyprint">cd helix-core-pkg
+</pre></div><div class="section"><div class="section"><h5>start zookeeper locally at port 2199<a name="start_zookeeper_locally_at_port_2199"></a></h5>
 <div class="source"><pre class="prettyprint">./start-standalone-zookeeper 2199 &amp;
 </pre></div></div><div class="section"><h5>create the cluster mycluster<a name="create_the_cluster_mycluster"></a></h5>
-<div class="source"><pre class="prettyprint">## helix-admin --zkSvr localhost:2199 --addCluster &lt;clustername&gt; 
-./helix-admin --zkSvr localhost:2199 --addCluster mycluster 
+<div class="source"><pre class="prettyprint">## helix-admin.sh --zkSvr localhost:2199 --addCluster &lt;clustername&gt; 
+./helix-admin.sh --zkSvr localhost:2199 --addCluster mycluster 
 </pre></div></div><div class="section"><h5>Create a database with 6 partitions using MasterSlave state model. This ensures there will be one master for each partition<a name="Create_a_database_with_6_partitions_using_MasterSlave_state_model._This_ensures_there_will_be_one_master_for_each_partition"></a></h5>
-<div class="source"><pre class="prettyprint">### helix-admin --zkSvr localhost:2199  --addResource &lt;clustername&gt; &lt;resourceName&gt; &lt;numPartitions&gt; &lt;StateModelName&gt;
-./helix-admin --zkSvr localhost:2199  --addResource mycluster myDB 6 MasterSlave
+<div class="source"><pre class="prettyprint">### helix-admin.sh --zkSvr localhost:2199  --addResource &lt;clustername&gt; &lt;resourceName&gt; &lt;numPartitions&gt; &lt;StateModelName&gt;
+./helix-admin.sh --zkSvr localhost:2199  --addResource mycluster myDB 6 MasterSlave
 </pre></div></div><div class="section"><h5>Add nodes to the cluster, in this case we add three nodes, hostname:port is host and port on which the service will start<a name="Add_nodes_to_the_cluster_in_this_case_we_add_three_nodes_hostname:port_is_host_and_port_on_which_the_service_will_start"></a></h5>
-<div class="source"><pre class="prettyprint">## helix-admin --zkSvr &lt;zk_address&gt;  --addNode &lt;clustername&gt; &lt;host:port&gt;
-./helix-admin --zkSvr localhost:2199  --addNode mycluster localhost:12913
-./helix-admin --zkSvr localhost:2199  --addNode mycluster localhost:12914
-./helix-admin --zkSvr localhost:2199  --addNode mycluster localhost:12915
+<div class="source"><pre class="prettyprint">## helix-admin.sh --zkSvr &lt;zk_address&gt;  --addNode &lt;clustername&gt; &lt;host:port&gt;
+./helix-admin.sh --zkSvr localhost:2199  --addNode mycluster localhost:12913
+./helix-admin.sh --zkSvr localhost:2199  --addNode mycluster localhost:12914
+./helix-admin.sh --zkSvr localhost:2199  --addNode mycluster localhost:12915
 </pre></div></div><div class="section"><h5>After adding nodes assign partitions to nodes. This command will distribute the partitions amongst all the nodes in the cluster. Each partition will have 3 replicas<a name="After_adding_nodes_assign_partitions_to_nodes._This_command_will_distribute_the_partitions_amongst_all_the_nodes_in_the_cluster._Each_partition_will_have_3_replicas"></a></h5>
-<div class="source"><pre class="prettyprint"> helix-admin --rebalance &lt;clustername&gt; &lt;resourceName&gt; &lt;replication factor&gt;
-./helix-admin --zkSvr localhost:2199 --rebalance mycluster myDB 3
+<div class="source"><pre class="prettyprint"> helix-admin.sh --rebalance &lt;clustername&gt; &lt;resourceName&gt; &lt;replication factor&gt;
+./helix-admin.sh --zkSvr localhost:2199 --rebalance mycluster myDB 3
 </pre></div></div><div class="section"><h5>Start Helix Controller<a name="Start_Helix_Controller"></a></h5>
 <div class="source"><pre class="prettyprint">#This will start the cluster manager which will manage &lt;mycluster&gt;
 ./run-helix-controller --zkSvr localhost:2199 --cluster mycluster 2&gt;&amp;1 &gt; /tmp/controller.log &amp;
 </pre></div></div><div class="section"><h5>Start Example Participant, This is a dummy participant where the transitions are no-ops.<a name="Start_Example_Participant_This_is_a_dummy_participant_where_the_transitions_are_no-ops."></a></h5>
-<div class="source"><pre class="prettyprint">./start-helix-participant --help
+<div class="source"><pre class="prettyprint">./start-helix-participant.sh --help
 # start process 1 process corresponding to every host port added during cluster setup
-./start-helix-participant --zkSvr localhost:2199 --cluster mycluster --host localhost --port 12913 --stateModelType MasterSlave 2&gt;&amp;1 &gt; /tmp/participant_12913.log 
-./start-helix-participant --zkSvr localhost:2199 --cluster mycluster --host localhost --port 12914 --stateModelType MasterSlave 2&gt;&amp;1 &gt; /tmp/participant_12914.log
-./start-helix-participant --zkSvr localhost:2199 --cluster mycluster --host localhost --port 12915 --stateModelType MasterSlave 2&gt;&amp;1 &gt; /tmp/participant_12915.log
+./start-helix-participant.sh --zkSvr localhost:2199 --cluster mycluster --host localhost --port 12913 --stateModelType MasterSlave 2&gt;&amp;1 &gt; /tmp/participant_12913.log 
+./start-helix-participant.sh --zkSvr localhost:2199 --cluster mycluster --host localhost --port 12914 --stateModelType MasterSlave 2&gt;&amp;1 &gt; /tmp/participant_12914.log
+./start-helix-participant.sh --zkSvr localhost:2199 --cluster mycluster --host localhost --port 12915 --stateModelType MasterSlave 2&gt;&amp;1 &gt; /tmp/participant_12915.log
 </pre></div></div></div></div><div class="section"><h3>Inspect Cluster Data<a name="Inspect_Cluster_Data"></a></h3><p>At any time, we can get the cluster status on zookeeper and view the partition assignment and current state of each partition.</p><p>Command line tool</p><div class="section"><div class="section"><h5>List existing clusters<a name="List_existing_clusters"></a></h5>
-<div class="source"><pre class="prettyprint">./helix-admin --zkSvr localhost:2199 --listClusters        
+<div class="source"><pre class="prettyprint">./helix-admin.sh --zkSvr localhost:2199 --listClusters        
 </pre></div></div><div class="section"><h5>Query info of a cluster<a name="Query_info_of_a_cluster"></a></h5>
-<div class="source"><pre class="prettyprint">#helix-admin --zkSvr localhost:2199 --listClusterInfo &lt;clusterName&gt; 
-./helix-admin --zkSvr localhost:2199 --listClusterInfo mycluster
+<div class="source"><pre class="prettyprint">#helix-admin.sh --zkSvr localhost:2199 --listClusterInfo &lt;clusterName&gt; 
+./helix-admin.sh --zkSvr localhost:2199 --listClusterInfo mycluster
 </pre></div></div><div class="section"><h5>List Instances in a cluster<a name="List_Instances_in_a_cluster"></a></h5>
-<div class="source"><pre class="prettyprint">## helix-admin --zkSvr localhost:2199 --listInstances &lt;clusterName&gt;
- ./helix-admin --zkSvr localhost:2199 --listInstances mycluster
+<div class="source"><pre class="prettyprint">## helix-admin.sh --zkSvr localhost:2199 --listInstances &lt;clusterName&gt;
+ ./helix-admin.sh --zkSvr localhost:2199 --listInstances mycluster
 </pre></div></div><div class="section"><h5>Query info of a Instance in a cluster<a name="Query_info_of_a_Instance_in_a_cluster"></a></h5>
-<div class="source"><pre class="prettyprint">#./helix-admin --zkSvr localhost:2199 --listInstanceInfo &lt;clusterName InstanceName&gt;    
- ./helix-admin --zkSvr localhost:2199 --listInstanceInfo mycluster localhost_12913
- ./helix-admin --zkSvr localhost:2199 --listInstanceInfo mycluster localhost_12914
- ./helix-admin --zkSvr localhost:2199 --listInstanceInfo mycluster localhost_12915
+<div class="source"><pre class="prettyprint">#./helix-admin.sh --zkSvr localhost:2199 --listInstanceInfo &lt;clusterName InstanceName&gt;    
+ ./helix-admin.sh --zkSvr localhost:2199 --listInstanceInfo mycluster localhost_12913
+ ./helix-admin.sh --zkSvr localhost:2199 --listInstanceInfo mycluster localhost_12914
+ ./helix-admin.sh --zkSvr localhost:2199 --listInstanceInfo mycluster localhost_12915
 </pre></div></div><div class="section"><h5>List resourceGroups hosted in a cluster<a name="List_resourceGroups_hosted_in_a_cluster"></a></h5>
-<div class="source"><pre class="prettyprint">## helix-admin --zkSvr localhost:2199 --listResources &lt;clusterName&gt;
-./helix-admin --zkSvr localhost:2199 --listResources mycluster
+<div class="source"><pre class="prettyprint">## helix-admin.sh --zkSvr localhost:2199 --listResources &lt;clusterName&gt;
+./helix-admin.sh --zkSvr localhost:2199 --listResources mycluster
 </pre></div></div><div class="section"><h5>Query info of a resource<a name="Query_info_of_a_resource"></a></h5>
-<div class="source"><pre class="prettyprint">## helix-admin --zkSvr localhost:2199 --listResourceInfo &lt;clusterName resourceName&gt;
-./helix-admin --zkSvr localhost:2199 --listResourceInfo mycluster myDB
+<div class="source"><pre class="prettyprint">## helix-admin.sh --zkSvr localhost:2199 --listResourceInfo &lt;clusterName resourceName&gt;
+./helix-admin.sh --zkSvr localhost:2199 --listResourceInfo mycluster myDB
 </pre></div></div><div class="section"><h5>Query info about a partition<a name="Query_info_about_a_partition"></a></h5>
-<div class="source"><pre class="prettyprint">## helix-admin --zkSvr localhost:2199 --listResourceInfo &lt;clusterName partition&gt; 
-./helix-admin --zkSvr localhost:2199 --listResourceInfo mycluster myDB_0
+<div class="source"><pre class="prettyprint">## helix-admin.sh --zkSvr localhost:2199 --listResourceInfo &lt;clusterName partition&gt; 
+./helix-admin.sh --zkSvr localhost:2199 --listResourceInfo mycluster myDB_0
 </pre></div></div><div class="section"><h5>List all state models in the cluster<a name="List_all_state_models_in_the_cluster"></a></h5>
-<div class="source"><pre class="prettyprint"># helix-admin --zkSvr localhost:2199 --listStateModels &lt;clusterName&gt;
-./helix-admin --zkSvr localhost:2199 --listStateModels mycluster
+<div class="source"><pre class="prettyprint"># helix-admin.sh --zkSvr localhost:2199 --listStateModels &lt;clusterName&gt;
+./helix-admin.sh --zkSvr localhost:2199 --listStateModels mycluster
 </pre></div></div><div class="section"><h5>Query info about a state model in a cluster<a name="Query_info_about_a_state_model_in_a_cluster"></a></h5>
-<div class="source"><pre class="prettyprint">## helix-admin --zkSvr localhost:2199 --listStateModel &lt;clusterName stateModelName&gt;
-./helix-admin --zkSvr localhost:2199 --listStateModel mycluster MasterSlave
+<div class="source"><pre class="prettyprint">## helix-admin.sh --zkSvr localhost:2199 --listStateModel &lt;clusterName stateModelName&gt;
+./helix-admin.sh --zkSvr localhost:2199 --listStateModel mycluster MasterSlave
 </pre></div></div><div class="section"><h5>ZOOINSPECTOR<a name="ZOOINSPECTOR"></a></h5><p>Use ZooInspector that comes with zookeeper to browse the data. This is a java applet ( make sure you have X windows) To start zooinspector run the following command from &lt;zk_install_directory&gt;/contrib/ZooInspector</p>
 <div class="source"><pre class="prettyprint">java -cp zookeeper-3.3.3-ZooInspector.jar:lib/jtoaster-1.0.4.jar:../../lib/log4j-1.2.15.jar:../../zookeeper-3.3.3.jar org.apache.zookeeper.inspector.ZooInspector
 </pre></div></div></div></div></div>

Added: incubator/helix/site-content/Sample_App.html
URL: http://svn.apache.org/viewvc/incubator/helix/site-content/Sample_App.html?rev=1431202&view=auto
==============================================================================
--- incubator/helix/site-content/Sample_App.html (added)
+++ incubator/helix/site-content/Sample_App.html Thu Jan 10 08:06:51 2013
@@ -0,0 +1,369 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at Dec 11, 2012
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20121211" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Helix - </title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
+
+    
+            </head>
+        <body class="topBarEnabled">
+          
+                        
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                                  <div class="container"><div class="nav-collapse">
+            
+                
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Helix <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="index.html"  title="About">About</a>
+</li>
+                  
+                      <li>      <a href="Quickstart.html"  title="Quick Start">Quick Start</a>
+</li>
+                  
+                      <li>      <a href="ApiUsage.html"  title="Api Usage">Api Usage</a>
+</li>
+                  
+                      <li>      <a href="Architecture.html"  title="Architecture">Architecture</a>
+</li>
+                  
+                      <li>      <a href="Features.html"  title="Features">Features</a>
+</li>
+                  
+                      <li>      <a href="Sample_App.html"  title="Sample App">Sample App</a>
+</li>
+                  
+                      <li>      <a href="UseCases.html"  title="Use Cases">Use Cases</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Involved <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="mail-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="issue-tracking.html"  title="Issues">Issues</a>
+</li>
+                  
+                      <li>      <a href="team-list.html"  title="Team">Team</a>
+</li>
+                  
+                      <li>      <a href="source-repository.html"  title="Sources">Sources</a>
+</li>
+                  
+                      <li>      <a href="integration.html"  title="Continuous Integration">Continuous Integration</a>
+</li>
+                  
+                      <li>      <a href="involved/building.html"  title="Building Guide">Building Guide</a>
+</li>
+                  
+                      <li>      <a href="involved/release.html"  title="Release Guide">Release Guide</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Project Documentation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li class="dropdown-submenu">
+                                      <a href="project-info.html"  title="Project Information">Project Information</a>
+              <ul class="dropdown-menu">
+                                  <li>      <a href="index.html"  title="About">About</a>
+</li>
+                                  <li>      <a href="project-summary.html"  title="Project Summary">Project Summary</a>
+</li>
+                                  <li>      <a href="dependency-info.html"  title="Dependency Information">Dependency Information</a>
+</li>
+                                  <li>      <a href="modules.html"  title="Project Modules">Project Modules</a>
+</li>
+                                  <li>      <a href="license.html"  title="Project License">Project License</a>
+</li>
+                                  <li>      <a href="team-list.html"  title="Project Team">Project Team</a>
+</li>
+                                  <li>      <a href="source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                                  <li>      <a href="issue-tracking.html"  title="Issue Tracking">Issue Tracking</a>
+</li>
+                                  <li>      <a href="mail-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                                  <li>      <a href="dependency-management.html"  title="Dependency Management">Dependency Management</a>
+</li>
+                                  <li>      <a href="dependencies.html"  title="Dependencies">Dependencies</a>
+</li>
+                                  <li>      <a href="dependency-convergence.html"  title="Dependency Convergence">Dependency Convergence</a>
+</li>
+                                  <li>      <a href="integration.html"  title="Continuous Integration">Continuous Integration</a>
+</li>
+                                  <li>      <a href="plugin-management.html"  title="Plugin Management">Plugin Management</a>
+</li>
+                                  <li>      <a href="plugins.html"  title="Project Plugins">Project Plugins</a>
+</li>
+                                  <li>      <a href="distribution-management.html"  title="Distribution Management">Distribution Management</a>
+</li>
+                              </ul>
+            </li>
+                  
+                      <li class="dropdown-submenu">
+                                      <a href="project-reports.html"  title="Project Reports">Project Reports</a>
+              <ul class="dropdown-menu">
+                                  <li>      <a href="xref/index.html"  title="Source Xref">Source Xref</a>
+</li>
+                                  <li>      <a href="xref-test/index.html"  title="Test Source Xref">Test Source Xref</a>
+</li>
+                                  <li>      <a href="apidocs/index.html"  title="JavaDocs">JavaDocs</a>
+</li>
+                                  <li>      <a href="checkstyle-aggregate.html"  title="Checkstyle">Checkstyle</a>
+</li>
+                                  <li>      <a href="sonar.html"  title="Sonar">Sonar</a>
+</li>
+                              </ul>
+            </li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Modules <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="helix-core/index.html"  title="Apache Helix :: Core">Apache Helix :: Core</a>
+</li>
+                  
+                      <li>      <a href="helix-admin-webapp/index.html"  title="Apache Helix :: Admin Webapp">Apache Helix :: Admin Webapp</a>
+</li>
+                  
+                      <li>      <a href="mockservice/index.html"  title="Helix :: Mockservice">Helix :: Mockservice</a>
+</li>
+                  
+                      <li>      <a href="recipes/index.html"  title="Helix :: Recipes">Helix :: Recipes</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">ASF <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/foundation/how-it-works.html"  title="How Apache Works">How Apache Works</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/"  title="Foundation">Foundation</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/sponsorship.html"  title="Sponsoring Apache">Sponsoring Apache</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/thanks.html"  title="Thanks">Thanks</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+                      <form id="search-form" action="http://www.google.com/search" method="get"  class="navbar-search pull-right" >
+    
+  <input value="helix.incubator.apache.org" name="sitesearch" type="hidden"/>
+  <input class="search-query" name="q" id="query" type="text" />
+</form>
+<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=search-form"></script>
+          
+                                                              
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Apache Helix</h2>
+                </div>
+                      </div>
+        <div class="pull-right">                  <a href="http://incubator.apache.org/" id="bannerRight">
+                                                                                        <img src="http://incubator.apache.org/images/egg-logo.png" />
+                </a>
+      </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                              <li class="">
+                    <a href="./" title="Apache Helix">
+        Apache Helix</a>
+        </li>
+      <li class="divider ">/</li>
+        <li class=""></li>
+        
+                
+                    
+                  <li id="publishDate" class="pull-right">Last Published: 2012-12-11</li> <li class="divider pull-right">|</li>
+              <li id="projectVersion" class="pull-right">Version: 0.6-incubating-SNAPSHOT</li>
+            
+                            </ul>
+      </div>
+
+      
+                
+        <div id="bodyColumn" >
+                                  
+            <!-- -
+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. --><h1>RabbitMQ Consumer Group</h1><p><a class="externalLink" href="http://www.rabbitmq.com/">RabbitMQ</a> is a well known Open source software the provides robust messaging for applications.</p><p>One of the commonly implemented recipes using this software is a work queue. <a class="externalLink" href="http://www.rabbitmq.com/tutorials/tutorial-four-java.html">http://www.rabbitmq.com/tutorials/tutorial-four-java.html</a> describes the use case where</p>
+<ul>
+  <li>A producer sends a message with a routing key.</li>
+  <li>The message goes to the queues whose binding key exactly matches the routing key of the message.</li>
+  <li>There are multiple consumers and each consumer is interested in processing only a subset of the messages by binding to the interested keys</li>
+</ul><p>The example provided <a class="externalLink" href="http://www.rabbitmq.com/tutorials/tutorial-four-java.html">here</a> describes how multiple consumers can be started to process all the tasks.</p><p>While this works, in production systems one needs the following * Ability to handle failures: when a consumers fails another consumer must be started or the other consumers must start processing these messages that should have been processed by the failed consumer. * When the existing consumers cannot keep up with the task generation rate, new consumers will be added. The tasks must be redistributed among all the consumers. </p><p>In this sample app, we explain how these set of consumers can be grouped together and handle consumer failures and expansion automatically.</p><p>Mapping this usecase to Helix is pretty easy as the binding key/routing key is equivalent to a partition. </p><p>Lets take a real example. Lets say a topic has 6 partitions, and we have 2 consumers to 
 process all the queues. What we want is all 6 queues to be evenly divided among 2 consumers. Eventually when the system scales, we add more consumers to keep up. This will make each consumer process tasks from 2 queues. Now lets say that a consumer fails and that the number of active consumers is now reduced to 2. This means each consumer must process 3 queues.</p><p>We showcase how such a dynamic App can be developed using Helix. </p><h1>Try it</h1><p>Before getting into the details on how to develop such an App using Helix, you can try the following steps to get a feel of it.</p>
+<div class="source"><pre class="prettyprint">git clone git@github.com:linkedin/helix.git
+cd helix
+./build
+export HELIX_PKG_ROOT=`pwd`/helix-core/target/helix-core-pkg
+</pre></div><p>OR Download the latest 0.5.28 release tar ball from <a class="externalLink" href="http://linkedin.github.com/helix/download/release-0.5.28//helix-core-pkg-0.5.28.tar.gz">here</a> <tt>
+tar -xzvf helix-core-pkg-0.5.28.tar.gz
+export HELIX_PKG_ROOT=`pwd`/helix-core-pkg
+</tt></p><p>Download the rabbitmq-consumer-group recipe from <a class="externalLink" href="http://linkedin.github.com/helix/download/release-0.5.28/rabbitmq-consumer-group-0.5.28.tar.gz">here</a> <tt>
+tar -xzvf rabbitmq-consumer-group-0.5.28.tar.gz
+export HELIX_RABBITMQ_ROOT=`pwd`/rabbitmq-consumer-group/
+</tt> <tt>
+chmod +x $HELIX_PKG_ROOT/bin/*
+chmod +x $HELIX_RABBITMQ_ROOT/bin/*
+</tt></p><div class="section"><h2>Install Rabbit MQ<a name="Install_Rabbit_MQ"></a></h2><p>Setting up RabbitMQ on a local box is straightforward. You can find the instructions here <a class="externalLink" href="http://www.rabbitmq.com/download.html">http://www.rabbitmq.com/download.html</a></p></div><div class="section"><h2>Start ZK<a name="Start_ZK"></a></h2><p>Start zookeeper at port 2199 <tt>
+$HELIX_PKG_ROOT/bin/start-standalone-zookeeper 2199
+</tt></p></div><div class="section"><h2>Setup the consumer group cluster<a name="Setup_the_consumer_group_cluster"></a></h2><p>This will setup the cluster by creating a rabbitmq-consumer-group cluster and adds a topic resource with 6 queues. <tt>
+$HELIX_RABBITMQ_ROOT/bin/setup-cluster.sh localhost:2199 
+</tt></p></div><div class="section"><h2>Add consumers<a name="Add_consumers"></a></h2><p>Start 2 consumers in 2 different terminals. Each consumer is given a unique id. ``` //start-consumer.sh zookeeperAddress (e.g. localhost:2181) consumerId , rabbitmqServer (e.g. localhost) $HELIX_RABBITMQ_ROOT/bin/start-consumer.sh localhost:2199 0 localhost $HELIX_RABBITMQ_ROOT/bin/start-consumer.sh localhost:2199 1 localhost </p>
+<div class="source"><pre class="prettyprint">Start HelixController
+--------------------
+Now start a Helix controller that starts managing the &quot;rabbitmq-consumer-group&quot; cluster.
+</pre></div><p>$HELIX_RABBITMQ_ROOT/bin/start-cluster-manager.sh localhost:2199 ```</p></div><div class="section"><h2>Send messages to the Topic<a name="Send_messages_to_the_Topic"></a></h2><p>Start sending messages to the topic. This script randomly selects a routing key (1-6) and sends the message to topic. Based on the key, messages gets routed to the appropriate queue.</p>
+<div class="source"><pre class="prettyprint">$HELIX_RABBITMQ_ROOT/bin/send-message.sh localhost 20
+</pre></div><p>After running this, you should see all 20 messages being processed by 2 consumers. </p></div><div class="section"><h2>Add another consumer<a name="Add_another_consumer"></a></h2><p>Once a new consumer is started, helix detects it. In order to balance the load between 3 consumers, it deallocates 1 partition from the existing consumers and allocates it to the new consumer. We see that each consumer is now processing only 2 queues. Helix makes sure that old nodes are asked to stop consuming before the new consumer is asked to start consuming for a given partition. But the transitions for each partition can happen in parallel. <tt>
+$HELIX_RABBITMQ_ROOT/bin/start-consumer.sh localhost:2199 2 localhost
+</tt></p><p>Send messages again to the topic. <tt>
+$HELIX_RABBITMQ_ROOT/bin/send-message.sh localhost 100
+</tt> You should see that messages are now received by all 3 consumers.</p></div><div class="section"><h2>Stop a consumer<a name="Stop_a_consumer"></a></h2><p>In any terminal press CTRL^C and notice that Helix detects the consumer failure and distributes the 2 partitions that were processed by failed consumer to the remaining 2 active consumers.</p><h1>How does it work</h1><p>Find the entire code <a class="externalLink" href="https://github.com/linkedin/helix/tree/master/recipes/rabbitmq-consumer-group/src/main/java/com/linkedin/helix/recipes/rabbitmq">here</a>. </p></div><div class="section"><h2>Cluster setup<a name="Cluster_setup"></a></h2><p>This step creates znode on zookeeper for the cluster and adds the state model. We use online offline state model since there is no need for other states. The consumer is either processing a queue or it is not.</p><p>It creates a resource called rabbitmq-consumer-group with 6 partitions. The execution mode is set to AUTO_REBALANCE. Thi
 s means that the Helix controls the assignment of partition to consumers and automatically distributes the partitions evenly among the active consumers. When a consumer is added or removed, it ensures that a minimum number of partitions are shuffled.</p>
+<div class="source"><pre class="prettyprint">      zkclient = new ZkClient(zkAddr, ZkClient.DEFAULT_SESSION_TIMEOUT,
+          ZkClient.DEFAULT_CONNECTION_TIMEOUT, new ZNRecordSerializer());
+      ZKHelixAdmin admin = new ZKHelixAdmin(zkclient);
+      
+      // add cluster
+      admin.addCluster(clusterName, true);
+
+      // add state model definition
+      StateModelConfigGenerator generator = new StateModelConfigGenerator();
+      admin.addStateModelDef(clusterName, &quot;OnlineOffline&quot;,
+          new StateModelDefinition(generator.generateConfigForOnlineOffline()));
+
+      // add resource &quot;topic&quot; which has 6 partitions
+      String resourceName = &quot;rabbitmq-consumer-group&quot;;
+      admin.addResource(clusterName, resourceName, 6, &quot;OnlineOffline&quot;, &quot;AUTO_REBALANCE&quot;);
+</pre></div></div><div class="section"><h2>Starting the consumers<a name="Starting_the_consumers"></a></h2><p>The only thing consumers need to know is the zkaddress, cluster name and consumer id. It does not need to know anything else.</p>
+<div class="source"><pre class="prettyprint">   _manager =
+          HelixManagerFactory.getZKHelixManager(_clusterName,
+                                                _consumerId,
+                                                InstanceType.PARTICIPANT,
+                                                _zkAddr);
+
+      StateMachineEngine stateMach = _manager.getStateMachineEngine();
+      ConsumerStateModelFactory modelFactory =
+          new ConsumerStateModelFactory(_consumerId, _mqServer);
+      stateMach.registerStateModelFactory(&quot;OnlineOffline&quot;, modelFactory);
+
+      _manager.connect();
+
+</pre></div><p>Once the consumer has registered the statemodel and the controller is started, the consumer starts getting callbacks (onBecomeOnlineFromOffline) for the partition it needs to host. All it needs to do as part of the callback is to start consuming messages from the appropriate queue. Similarly, when the controller deallocates a partitions from a consumer, it fires onBecomeOfflineFromOnline for the same partition. As a part of this transition, the consumer will stop consuming from a that queue.</p>
+<div class="source"><pre class="prettyprint"> @Transition(to = &quot;ONLINE&quot;, from = &quot;OFFLINE&quot;)
+  public void onBecomeOnlineFromOffline(Message message, NotificationContext context)
+  {
+    LOG.debug(_consumerId + &quot; becomes ONLINE from OFFLINE for &quot; + _partition);
+
+    if (_thread == null)
+    {
+      LOG.debug(&quot;Starting ConsumerThread for &quot; + _partition + &quot;...&quot;);
+      _thread = new ConsumerThread(_partition, _mqServer, _consumerId);
+      _thread.start();
+      LOG.debug(&quot;Starting ConsumerThread for &quot; + _partition + &quot; done&quot;);
+
+    }
+  }
+
+  @Transition(to = &quot;OFFLINE&quot;, from = &quot;ONLINE&quot;)
+  public void onBecomeOfflineFromOnline(Message message, NotificationContext context)
+      throws InterruptedException
+  {
+    LOG.debug(_consumerId + &quot; becomes OFFLINE from ONLINE for &quot; + _partition);
+
+    if (_thread != null)
+    {
+      LOG.debug(&quot;Stopping &quot; + _consumerId + &quot; for &quot; + _partition + &quot;...&quot;);
+
+      _thread.interrupt();
+      _thread.join(2000);
+      _thread = null;
+      LOG.debug(&quot;Stopping &quot; +  _consumerId + &quot; for &quot; + _partition + &quot; done&quot;);
+
+    }
+  }
+</pre></div></div>
+                  </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container">
+              <div class="row span12">Copyright &copy;                    2012
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+        
+                <p id="poweredBy" class="pull-right">
+                          <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
+      </a>
+              </p>
+        
+                </div>
+    </footer>
+  </body>
+</html>
\ No newline at end of file

Modified: incubator/helix/site-content/UseCases.html
URL: http://svn.apache.org/viewvc/incubator/helix/site-content/UseCases.html?rev=1431202&r1=1431201&r2=1431202&view=diff
==============================================================================
--- incubator/helix/site-content/UseCases.html (original)
+++ incubator/helix/site-content/UseCases.html Thu Jan 10 08:06:51 2013
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at Jan 9, 2013
+ | Generated by Apache Maven Doxia at Jan 10, 2013
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20130109" />
+    <meta name="Date-Revision-yyyymmdd" content="20130110" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache Helix - </title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -211,7 +211,7 @@
         
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2013-01-09</li> <li class="divider pull-right">|</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2013-01-10</li> <li class="divider pull-right">|</li>
               <li id="projectVersion" class="pull-right">Version: 0.6.1-incubating-SNAPSHOT</li>
             
                             </ul>