You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2018/01/02 17:32:51 UTC

svn commit: r1819859 [22/28] - in /helix/site-content: ./ 0.6.1-incubating-docs/ 0.6.1-incubating-docs/recipes/ 0.6.1-incubating-docs/releasenotes/ 0.6.2-incubating-docs/ 0.6.2-incubating-docs/recipes/ 0.6.2-incubating-docs/releasenotes/ 0.6.3-docs/ 0....

Added: helix/site-content/0.8.0-docs/project-reports.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.8.0-docs/project-reports.html?rev=1819859&view=auto
==============================================================================
--- helix/site-content/0.8.0-docs/project-reports.html (added)
+++ helix/site-content/0.8.0-docs/project-reports.html Tue Jan  2 17:32:45 2018
@@ -0,0 +1,248 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2018-01-02
+ Rendered using Maven Reflow Skin 1.0.0 (http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+	<head>
+		<meta charset="UTF-8" />
+		<title>Apache Helix - Generated Reports</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta name="description" content="" />
+		<meta http-equiv="content-language" content="en" />
+
+		<link href="./css/bootstrap.min.css" rel="stylesheet" />
+		<link href="./css/bootstrap-responsive.min.css" rel="stylesheet" />
+		<link href="./css/docs.css" rel="stylesheet" />
+		<link href="./css/reflow-skin.css" rel="stylesheet" />
+		
+		
+		<link href="./css/lightbox.css" rel="stylesheet" />
+		
+		<link href="./css/site.css" rel="stylesheet" />
+		<link href="./css/print.css" rel="stylesheet" media="print" />
+		
+		<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+		<!--[if lt IE 9]>
+			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+		<![endif]-->
+		
+<script type="text/javascript">var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _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 class="page-project-reports project-080-docs" data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="..">Apache Helix</a>
+					<div class="nav-collapse">
+						<ul class="nav pull-right">
+							<li><a href="index.html" title="Helix 0.8.0">Helix 0.8.0 </a></li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="download.html" title="Download">Download </a></li>
+									<li><a href="Building.html" title="Building">Building </a></li>
+									<li><a href="releasenotes/release-0.8.0.html" title="Release Notes">Release Notes </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="Quickstart.html" title="Quick Start">Quick Start </a></li>
+									<li><a href="Tutorial.html" title="Tutorial">Tutorial </a></li>
+									<li><a href="../javadocs/0.8.0" title="Javadocs">Javadocs </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager </a></li>
+									<li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a></li>
+									<li><a href="recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a></li>
+									<li><a href="recipes/service_discovery.html" title="Service discovery">Service discovery </a></li>
+									<li><a href="recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+		
+	<div class="container">
+	
+	<!-- Masthead
+	================================================== -->
+	<header class="jumbotron subhead">
+		<div class="row" id="banner">
+			<div class="span12">
+				<div class="pull-left">
+					<a href="../" id="bannerLeft"><img src="../images/helix-logo.jpg" alt='"''"' /></a>
+					<p class="lead">A cluster management framework for partitioned and replicated distributed resources</p>
+				</div>
+				<div class="pull-right">
+					<a href="http://www.apache.org/" id="bannerRight"><img src="../images/feather_small.gif" alt='"''"' /></a>
+				</div>
+			</div>
+		</div>
+		<div>
+			<ul class="breadcrumb">
+				<li><a href="http://helix.incubator.apache.org/" title="Apache Helix" class="externalLink">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="./" title="Release 0.8.0">Release 0.8.0 </a></li>
+				<li class="divider">/</li>
+				<li>Generated Reports</li>
+				<li class="publishDate version-date pull-right">Last Published: 2018-01-02</li>
+			</ul>
+		</div>
+	</header>
+
+	<div class="main-body">
+	<div class="row">
+		<div class="span12">
+			<div class="body-content">
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Generated_Reports">Generated Reports</h2>
+ </div> 
+ <p>This document provides an overview of the various reports that are automatically generated by <a class="externalLink" href="http://maven.apache.org">Maven</a> . Each report is briefly described below.</p> 
+ <div class="section"> 
+  <h3 id="Overview">Overview</h3> 
+  <table border="0" class="bodyTable table table-striped table-hover"> 
+   <thead> 
+    <tr class="a"> 
+     <th>Document</th> 
+     <th>Description</th> 
+    </tr> 
+   </thead> 
+   <tbody> 
+    <tr class="b"> 
+     <td><a href="sonar.html">Sonar</a></td> 
+     <td>Quality analysis dashboard.</td> 
+    </tr> 
+   </tbody> 
+  </table> 
+ </div> 
+</div>
+			</div>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+	
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Get Helix</li>
+						<li>
+							<a href="download.html" title="Download">Download </a>
+						</li>
+						<li>
+							<a href="Building.html" title="Building">Building </a>
+						</li>
+						<li>
+							<a href="releasenotes/release-0.8.0.html" title="Release Notes">Release Notes </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Hands-On</li>
+						<li>
+							<a href="Quickstart.html" title="Quick Start">Quick Start </a>
+						</li>
+						<li>
+							<a href="Tutorial.html" title="Tutorial">Tutorial </a>
+						</li>
+						<li>
+							<a href="../javadocs/0.8.0" title="Javadocs">Javadocs </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Recipes</li>
+						<li>
+							<a href="recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager </a>
+						</li>
+						<li>
+							<a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
+						</li>
+						<li>
+							<a href="recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a>
+						</li>
+						<li>
+							<a href="recipes/service_discovery.html" title="Service discovery">Service discovery </a>
+						</li>
+						<li>
+							<a href="recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</footer>
+		
+	<div class="container subfooter">
+		<div class="row">
+			<div class="span12">
+				<p class="pull-right"><a href="#">Back to top</a></p>
+				<p class="copyright">Copyright &copy;2018 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
+		
+<div class="row span16">
+  <div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation.
+        All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
+  <a href="http://helix.apache.org/0.8.0-docs/privacy-policy.html">Privacy Policy</a>
+</div>			</div>
+		</div>
+	</div>
+
+	<!-- Le javascript
+	================================================== -->
+	<!-- Placed at the end of the document so the pages load faster -->
+
+	<!-- Fallback jQuery loading from Google CDN:
+	     http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go -->
+	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+	<script type="text/javascript">
+		if (typeof jQuery == 'undefined')
+		{
+			document.write(unescape("%3Cscript src='./js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
+		}
+	</script>
+	
+	<script src="./js/bootstrap.min.js"></script>
+	<script src="./js/lightbox.js"></script>
+	<script src="./js/jquery.smooth-scroll.min.js"></script>
+	<!-- back button support for smooth scroll -->
+	<script src="./js/jquery.ba-bbq.min.js"></script>
+
+	<script src="./js/reflow-skin.js"></script>
+	
+	</body>
+</html>
\ No newline at end of file

Added: helix/site-content/0.8.0-docs/project-summary.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.8.0-docs/project-summary.html?rev=1819859&view=auto
==============================================================================
--- helix/site-content/0.8.0-docs/project-summary.html (added)
+++ helix/site-content/0.8.0-docs/project-summary.html Tue Jan  2 17:32:45 2018
@@ -0,0 +1,313 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2018-01-02
+ Rendered using Maven Reflow Skin 1.0.0 (http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+	<head>
+		<meta charset="UTF-8" />
+		<title>Apache Helix - Project Summary</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta name="description" content="" />
+		<meta http-equiv="content-language" content="en" />
+
+		<link href="./css/bootstrap.min.css" rel="stylesheet" />
+		<link href="./css/bootstrap-responsive.min.css" rel="stylesheet" />
+		<link href="./css/docs.css" rel="stylesheet" />
+		<link href="./css/reflow-skin.css" rel="stylesheet" />
+		
+		
+		<link href="./css/lightbox.css" rel="stylesheet" />
+		
+		<link href="./css/site.css" rel="stylesheet" />
+		<link href="./css/print.css" rel="stylesheet" media="print" />
+		
+		<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+		<!--[if lt IE 9]>
+			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+		<![endif]-->
+		
+<script type="text/javascript">var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _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 class="page-project-summary project-080-docs" data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="..">Apache Helix</a>
+					<div class="nav-collapse">
+						<ul class="nav pull-right">
+							<li><a href="index.html" title="Helix 0.8.0">Helix 0.8.0 </a></li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="download.html" title="Download">Download </a></li>
+									<li><a href="Building.html" title="Building">Building </a></li>
+									<li><a href="releasenotes/release-0.8.0.html" title="Release Notes">Release Notes </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="Quickstart.html" title="Quick Start">Quick Start </a></li>
+									<li><a href="Tutorial.html" title="Tutorial">Tutorial </a></li>
+									<li><a href="../javadocs/0.8.0" title="Javadocs">Javadocs </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager </a></li>
+									<li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a></li>
+									<li><a href="recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a></li>
+									<li><a href="recipes/service_discovery.html" title="Service discovery">Service discovery </a></li>
+									<li><a href="recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+		
+	<div class="container">
+	
+	<!-- Masthead
+	================================================== -->
+	<header class="jumbotron subhead">
+		<div class="row" id="banner">
+			<div class="span12">
+				<div class="pull-left">
+					<a href="../" id="bannerLeft"><img src="../images/helix-logo.jpg" alt='"''"' /></a>
+					<p class="lead">A cluster management framework for partitioned and replicated distributed resources</p>
+				</div>
+				<div class="pull-right">
+					<a href="http://www.apache.org/" id="bannerRight"><img src="../images/feather_small.gif" alt='"''"' /></a>
+				</div>
+			</div>
+		</div>
+		<div>
+			<ul class="breadcrumb">
+				<li><a href="http://helix.incubator.apache.org/" title="Apache Helix" class="externalLink">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="./" title="Release 0.8.0">Release 0.8.0 </a></li>
+				<li class="divider">/</li>
+				<li>Project Summary</li>
+				<li class="publishDate version-date pull-right">Last Published: 2018-01-02</li>
+			</ul>
+		</div>
+	</header>
+
+	<div class="main-body">
+	<div class="row">
+		<div class="span12">
+			<div class="body-content">
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Project_Summary">Project Summary</h2>
+ </div> 
+ <a name="Project_Summary"></a> 
+ <div class="section"> 
+  <h3 id="Project_Information">Project Information</h3> 
+  <a name="Project_Information"></a> 
+  <table border="0" class="bodyTable table table-striped table-hover"> 
+   <thead> 
+    <tr class="a"> 
+     <th>Field</th> 
+     <th>Value</th> 
+    </tr> 
+   </thead> 
+   <tbody> 
+    <tr class="b"> 
+     <td>Name</td> 
+     <td>Apache Helix :: Website :: 0.8.0</td> 
+    </tr> 
+    <tr class="a"> 
+     <td>Description</td> 
+     <td>Helix is a generic cluster management framework used for the automatic management of partitioned, replicated and distributed resources hosted on a cluster of nodes.</td> 
+    </tr> 
+    <tr class="b"> 
+     <td>Homepage</td> 
+     <td><a class="externalLink" href="http://helix.apache.org/0.8.0-docs">http://helix.apache.org/0.8.0-docs</a></td> 
+    </tr> 
+   </tbody> 
+  </table> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Project_Organization">Project Organization</h3> 
+  <a name="Project_Organization"></a> 
+  <table border="0" class="bodyTable table table-striped table-hover"> 
+   <thead> 
+    <tr class="a"> 
+     <th>Field</th> 
+     <th>Value</th> 
+    </tr> 
+   </thead> 
+   <tbody> 
+    <tr class="b"> 
+     <td>Name</td> 
+     <td>The Apache Software Foundation</td> 
+    </tr> 
+    <tr class="a"> 
+     <td>URL</td> 
+     <td><a class="externalLink" href="http://www.apache.org/">http://www.apache.org/</a></td> 
+    </tr> 
+   </tbody> 
+  </table> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Build_Information">Build Information</h3> 
+  <a name="Build_Information"></a> 
+  <table border="0" class="bodyTable table table-striped table-hover"> 
+   <thead> 
+    <tr class="a"> 
+     <th>Field</th> 
+     <th>Value</th> 
+    </tr> 
+   </thead> 
+   <tbody> 
+    <tr class="b"> 
+     <td>GroupId</td> 
+     <td>org.apache.helix</td> 
+    </tr> 
+    <tr class="a"> 
+     <td>ArtifactId</td> 
+     <td>0.8.0-docs</td> 
+    </tr> 
+    <tr class="b"> 
+     <td>Version</td> 
+     <td>0.6.10-SNAPSHOT</td> 
+    </tr> 
+    <tr class="a"> 
+     <td>Type</td> 
+     <td>bundle</td> 
+    </tr> 
+    <tr class="b"> 
+     <td>JDK Rev</td> 
+     <td>1.7</td> 
+    </tr> 
+   </tbody> 
+  </table> 
+ </div> 
+</div>
+			</div>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+	
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Get Helix</li>
+						<li>
+							<a href="download.html" title="Download">Download </a>
+						</li>
+						<li>
+							<a href="Building.html" title="Building">Building </a>
+						</li>
+						<li>
+							<a href="releasenotes/release-0.8.0.html" title="Release Notes">Release Notes </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Hands-On</li>
+						<li>
+							<a href="Quickstart.html" title="Quick Start">Quick Start </a>
+						</li>
+						<li>
+							<a href="Tutorial.html" title="Tutorial">Tutorial </a>
+						</li>
+						<li>
+							<a href="../javadocs/0.8.0" title="Javadocs">Javadocs </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Recipes</li>
+						<li>
+							<a href="recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager </a>
+						</li>
+						<li>
+							<a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
+						</li>
+						<li>
+							<a href="recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a>
+						</li>
+						<li>
+							<a href="recipes/service_discovery.html" title="Service discovery">Service discovery </a>
+						</li>
+						<li>
+							<a href="recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</footer>
+		
+	<div class="container subfooter">
+		<div class="row">
+			<div class="span12">
+				<p class="pull-right"><a href="#">Back to top</a></p>
+				<p class="copyright">Copyright &copy;2018 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
+		
+<div class="row span16">
+  <div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation.
+        All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
+  <a href="http://helix.apache.org/0.8.0-docs/privacy-policy.html">Privacy Policy</a>
+</div>			</div>
+		</div>
+	</div>
+
+	<!-- Le javascript
+	================================================== -->
+	<!-- Placed at the end of the document so the pages load faster -->
+
+	<!-- Fallback jQuery loading from Google CDN:
+	     http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go -->
+	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+	<script type="text/javascript">
+		if (typeof jQuery == 'undefined')
+		{
+			document.write(unescape("%3Cscript src='./js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
+		}
+	</script>
+	
+	<script src="./js/bootstrap.min.js"></script>
+	<script src="./js/lightbox.js"></script>
+	<script src="./js/jquery.smooth-scroll.min.js"></script>
+	<!-- back button support for smooth scroll -->
+	<script src="./js/jquery.ba-bbq.min.js"></script>
+
+	<script src="./js/reflow-skin.js"></script>
+	
+	</body>
+</html>
\ No newline at end of file

Added: helix/site-content/0.8.0-docs/recipes/lock_manager.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.8.0-docs/recipes/lock_manager.html?rev=1819859&view=auto
==============================================================================
--- helix/site-content/0.8.0-docs/recipes/lock_manager.html (added)
+++ helix/site-content/0.8.0-docs/recipes/lock_manager.html Tue Jan  2 17:32:45 2018
@@ -0,0 +1,464 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2018-01-02
+ Rendered using Maven Reflow Skin 1.0.0 (http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+	<head>
+		<meta charset="UTF-8" />
+		<title>Apache Helix - Distributed Lock Manager</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta name="description" content="" />
+		<meta http-equiv="content-language" content="en" />
+
+		<link href="../css/bootstrap.min.css" rel="stylesheet" />
+		<link href="../css/bootstrap-responsive.min.css" rel="stylesheet" />
+		<link href="../css/docs.css" rel="stylesheet" />
+		<link href="../css/reflow-skin.css" rel="stylesheet" />
+		
+		
+		<link href="../css/lightbox.css" rel="stylesheet" />
+		
+		<link href="../css/site.css" rel="stylesheet" />
+		<link href="../css/print.css" rel="stylesheet" media="print" />
+		
+		<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+		<!--[if lt IE 9]>
+			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+		<![endif]-->
+		
+<script type="text/javascript">var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _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 class="page-recipes-lock_manager project-080-docs" data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="../..">Apache Helix</a>
+					<div class="nav-collapse">
+						<ul class="nav pull-right">
+							<li><a href="../index.html" title="Helix 0.8.0">Helix 0.8.0 </a></li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="../download.html" title="Download">Download </a></li>
+									<li><a href="../Building.html" title="Building">Building </a></li>
+									<li><a href="../releasenotes/release-0.8.0.html" title="Release Notes">Release Notes </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="../Quickstart.html" title="Quick Start">Quick Start </a></li>
+									<li><a href="../Tutorial.html" title="Tutorial">Tutorial </a></li>
+									<li><a href="../../javadocs/0.8.0" title="Javadocs">Javadocs </a></li>
+								</ul>
+							</li>
+							<li class="dropdown active">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li class="active"><a href="" title="Distributed lock manager">Distributed lock manager </a></li>
+									<li><a href="rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a></li>
+									<li><a href="rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a></li>
+									<li><a href="service_discovery.html" title="Service discovery">Service discovery </a></li>
+									<li><a href="task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+		
+	<div class="container">
+	
+	<!-- Masthead
+	================================================== -->
+	<header class="jumbotron subhead">
+		<div class="row" id="banner">
+			<div class="span12">
+				<div class="pull-left">
+					<a href="../../" id="bannerLeft"><img src="../../images/helix-logo.jpg" alt='"''"' /></a>
+					<p class="lead">A cluster management framework for partitioned and replicated distributed resources</p>
+				</div>
+				<div class="pull-right">
+					<a href="http://www.apache.org/" id="bannerRight"><img src="../../images/feather_small.gif" alt='"''"' /></a>
+				</div>
+			</div>
+		</div>
+		<div>
+			<ul class="breadcrumb">
+				<li><a href="http://helix.incubator.apache.org/" title="Apache Helix" class="externalLink">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="../../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="../" title="Release 0.8.0">Release 0.8.0 </a></li>
+				<li class="divider">/</li>
+				<li>Distributed Lock Manager</li>
+				<li class="publishDate version-date pull-right">Last Published: 2018-01-02</li>
+			</ul>
+		</div>
+	</header>
+
+	<div class="main-body">
+	<div class="row">
+		<div class="span12">
+			<div class="body-content">
+<!-- -
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. --> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Distributed_Lock_Manager">Distributed Lock Manager</h2>
+ </div> 
+ <p>Distributed locks are used to synchronize accesses shared resources. Most applications today use ZooKeeper to model distributed locks.</p> 
+ <p>The simplest way to model a lock using ZooKeeper is (See ZooKeeper leader recipe for an exact and more advanced solution)</p> 
+ <ul> 
+  <li>Each process tries to create an emphemeral node</li> 
+  <li>If the node is successfully created, the process acquires the lock</li> 
+  <li>Otherwise, it will watch the ZNode and try to acquire the lock again if the current lock holder disappears</li> 
+ </ul> 
+ <p>This is good enough if there is only one lock. But in practice, an application will need many such locks. Distributing and managing the locks among difference process becomes challenging. Extending such a solution to many locks will result in:</p> 
+ <ul> 
+  <li>Uneven distribution of locks among nodes; the node that starts first will acquire all the locks. Nodes that start later will be idle.</li> 
+  <li>When a node fails, how the locks will be distributed among remaining nodes is not predicable.</li> 
+  <li>When new nodes are added the current nodes don't relinquish the locks so that new nodes can acquire some locks</li> 
+ </ul> 
+ <p>In other words we want a system to satisfy the following requirements.</p> 
+ <ul> 
+  <li>Distribute locks evenly among all nodes to get better hardware utilization</li> 
+  <li>If a node fails, the locks that were acquired by that node should be evenly distributed among other nodes</li> 
+  <li>If nodes are added, locks must be evenly re-distributed among nodes.</li> 
+ </ul> 
+ <p>Helix provides a simple and elegant solution to this problem. Simply specify the number of locks and Helix will ensure that above constraints are satisfied.</p> 
+ <p>To quickly see this working run the <tt>lock-manager-demo</tt> script where 12 locks are evenly distributed among three nodes, and when a node fails, the locks get re-distributed among remaining two nodes. Note that Helix does not re-shuffle the locks completely, instead it simply distributes the locks relinquished by dead node among 2 remaining nodes evenly.</p> 
+ <hr /> 
+ <div class="section"> 
+  <h3 id="Short_Version">Short Version</h3> 
+  <p>This version starts multiple threads within the same process to simulate a multi node deployment. Try the long version to get a better idea of how it works.</p> 
+  <div class="source"> 
+   <pre>git clone https://git-wip-us.apache.org/repos/asf/helix.git
+cd helix
+git checkout tags/helix-0.8.0
+mvn clean install package -DskipTests
+cd recipes/distributed-lock-manager/target/distributed-lock-manager-pkg/bin
+chmod +x *
+./lock-manager-demo
+</pre> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Output">Output</h4> 
+   <div class="source"> 
+    <pre>./lock-manager-demo
+STARTING localhost_12000
+STARTING localhost_12002
+STARTING localhost_12001
+STARTED localhost_12000
+STARTED localhost_12002
+STARTED localhost_12001
+localhost_12001 acquired lock:lock-group_3
+localhost_12000 acquired lock:lock-group_8
+localhost_12001 acquired lock:lock-group_2
+localhost_12001 acquired lock:lock-group_4
+localhost_12002 acquired lock:lock-group_1
+localhost_12002 acquired lock:lock-group_10
+localhost_12000 acquired lock:lock-group_7
+localhost_12001 acquired lock:lock-group_5
+localhost_12002 acquired lock:lock-group_11
+localhost_12000 acquired lock:lock-group_6
+localhost_12002 acquired lock:lock-group_0
+localhost_12000 acquired lock:lock-group_9
+lockName    acquired By
+======================================
+lock-group_0    localhost_12002
+lock-group_1    localhost_12002
+lock-group_10    localhost_12002
+lock-group_11    localhost_12002
+lock-group_2    localhost_12001
+lock-group_3    localhost_12001
+lock-group_4    localhost_12001
+lock-group_5    localhost_12001
+lock-group_6    localhost_12000
+lock-group_7    localhost_12000
+lock-group_8    localhost_12000
+lock-group_9    localhost_12000
+Stopping localhost_12000
+localhost_12000 Interrupted
+localhost_12001 acquired lock:lock-group_9
+localhost_12001 acquired lock:lock-group_8
+localhost_12002 acquired lock:lock-group_6
+localhost_12002 acquired lock:lock-group_7
+lockName    acquired By
+======================================
+lock-group_0    localhost_12002
+lock-group_1    localhost_12002
+lock-group_10    localhost_12002
+lock-group_11    localhost_12002
+lock-group_2    localhost_12001
+lock-group_3    localhost_12001
+lock-group_4    localhost_12001
+lock-group_5    localhost_12001
+lock-group_6    localhost_12002
+lock-group_7    localhost_12002
+lock-group_8    localhost_12001
+lock-group_9    localhost_12001
+
+</pre> 
+   </div> 
+   <hr /> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Long_version">Long version</h3> 
+  <p>This provides more details on how to setup the cluster and where to plugin application code.</p> 
+  <div class="section"> 
+   <h4 id="Start_ZooKeeper">Start ZooKeeper</h4> 
+   <div class="source"> 
+    <pre>./start-standalone-zookeeper 2199
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Create_a_Cluster">Create a Cluster</h4> 
+   <div class="source"> 
+    <pre>./helix-admin --zkSvr localhost:2199 --addCluster lock-manager-demo
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Create_a_Lock_Group">Create a Lock Group</h4> 
+   <p>Create a lock group and specify the number of locks in the lock group.</p> 
+   <div class="source"> 
+    <pre>./helix-admin --zkSvr localhost:2199  --addResource lock-manager-demo lock-group 6 OnlineOffline --mode AUTO_REBALANCE
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Start_the_Nodes">Start the Nodes</h4> 
+   <p>Create a Lock class that handles the callbacks.</p> 
+   <div class="source"> 
+    <pre>public class Lock extends StateModel {
+  private String lockName;
+
+  public Lock(String lockName) {
+    this.lockName = lockName;
+  }
+
+  public void lock(Message m, NotificationContext context) {
+    System.out.println(&quot; acquired lock:&quot;+ lockName );
+  }
+
+  public void release(Message m, NotificationContext context) {
+    System.out.println(&quot; releasing lock:&quot;+ lockName );
+  }
+
+}
+</pre> 
+   </div> 
+   <p>and a LockFactory that creates Locks</p> 
+   <div class="source"> 
+    <pre>public class LockFactory extends StateModelFactory&lt;Lock&gt; {
+    /* Instantiates the lock handler, one per lockName */
+    public Lock create(String lockName) {
+        return new Lock(lockName);
+    }
+}
+</pre> 
+   </div> 
+   <p>At node start up, simply join the cluster and Helix will invoke the appropriate callbacks on the appropriate Lock instance. One can start any number of nodes and Helix detects that a new node has joined the cluster and re-distributes the locks automatically.</p> 
+   <div class="source"> 
+    <pre>public class LockProcess {
+  public static void main(String args) {
+    String zkAddress= &quot;localhost:2199&quot;;
+    String clusterName = &quot;lock-manager-demo&quot;;
+    //Give a unique id to each process, most commonly used format hostname_port
+    String instanceName =&quot;localhost_12000&quot;;
+    ZKHelixAdmin helixAdmin = new ZKHelixAdmin(zkAddress);
+    //configure the instance and provide some metadata
+    InstanceConfig config = new InstanceConfig(instanceName);
+    config.setHostName(&quot;localhost&quot;);
+    config.setPort(&quot;12000&quot;);
+    admin.addInstance(clusterName, config);
+    //join the cluster
+    HelixManager manager;
+    manager = HelixManagerFactory.getHelixManager(clusterName,
+                                                  instanceName,
+                                                  InstanceType.PARTICIPANT,
+                                                  zkAddress);
+    manager.getStateMachineEngine().registerStateModelFactory(&quot;OnlineOffline&quot;, modelFactory);
+    manager.connect();
+    Thread.currentThread.join();
+  }
+}
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Start_the_Controller">Start the Controller</h4> 
+   <p>The controller can be started either as a separate process or can be embedded within each node process</p> 
+   <div class="section"> 
+    <h5 id="Separate_Process">Separate Process</h5> 
+    <p>This is recommended when number of nodes in the cluster &gt; 100. For fault tolerance, you can run multiple controllers on different boxes.</p> 
+    <div class="source"> 
+     <pre>./run-helix-controller --zkSvr localhost:2199 --cluster lock-manager-demo 2&gt;&amp;1 &gt; /tmp/controller.log &amp;
+</pre> 
+    </div> 
+   </div> 
+   <div class="section"> 
+    <h5 id="Embedded_Within_the_Node_Process">Embedded Within the Node Process</h5> 
+    <p>This is recommended when the number of nodes in the cluster is less than 100. To start a controller from each process, simply add the following lines to MyClass</p> 
+    <div class="source"> 
+     <pre>public class LockProcess {
+  public static void main(String args) {
+    String zkAddress= &quot;localhost:2199&quot;;
+    String clusterName = &quot;lock-manager-demo&quot;;
+    // .
+    // .
+    manager.connect();
+    HelixManager controller;
+    controller = HelixControllerMain.startHelixController(zkAddress,
+                                                          clusterName,
+                                                          &quot;controller&quot;,
+                                                          HelixControllerMain.STANDALONE);
+    Thread.currentThread.join();
+  }
+}
+</pre> 
+    </div> 
+   </div> 
+  </div> 
+ </div> 
+</div>
+			</div>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+	
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Get Helix</li>
+						<li>
+							<a href="../download.html" title="Download">Download </a>
+						</li>
+						<li>
+							<a href="../Building.html" title="Building">Building </a>
+						</li>
+						<li>
+							<a href="../releasenotes/release-0.8.0.html" title="Release Notes">Release Notes </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Hands-On</li>
+						<li>
+							<a href="../Quickstart.html" title="Quick Start">Quick Start </a>
+						</li>
+						<li>
+							<a href="../Tutorial.html" title="Tutorial">Tutorial </a>
+						</li>
+						<li>
+							<a href="../../javadocs/0.8.0" title="Javadocs">Javadocs </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Recipes</li>
+						<li class="active">
+							<a href="#" title="Distributed lock manager">Distributed lock manager </a>
+						</li>
+						<li>
+							<a href="rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
+						</li>
+						<li>
+							<a href="rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a>
+						</li>
+						<li>
+							<a href="service_discovery.html" title="Service discovery">Service discovery </a>
+						</li>
+						<li>
+							<a href="task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</footer>
+		
+	<div class="container subfooter">
+		<div class="row">
+			<div class="span12">
+				<p class="pull-right"><a href="#">Back to top</a></p>
+				<p class="copyright">Copyright &copy;2018 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
+		
+<div class="row span16">
+  <div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation.
+        All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
+  <a href="http://helix.apache.org/0.8.0-docs/privacy-policy.html">Privacy Policy</a>
+</div>			</div>
+		</div>
+	</div>
+
+	<!-- Le javascript
+	================================================== -->
+	<!-- Placed at the end of the document so the pages load faster -->
+
+	<!-- Fallback jQuery loading from Google CDN:
+	     http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go -->
+	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+	<script type="text/javascript">
+		if (typeof jQuery == 'undefined')
+		{
+			document.write(unescape("%3Cscript src='../js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
+		}
+	</script>
+	
+	<script src="../js/bootstrap.min.js"></script>
+	<script src="../js/lightbox.js"></script>
+	<script src="../js/jquery.smooth-scroll.min.js"></script>
+	<!-- back button support for smooth scroll -->
+	<script src="../js/jquery.ba-bbq.min.js"></script>
+
+	<script src="../js/reflow-skin.js"></script>
+	
+	</body>
+</html>
\ No newline at end of file

Added: helix/site-content/0.8.0-docs/recipes/rabbitmq_consumer_group.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.8.0-docs/recipes/rabbitmq_consumer_group.html?rev=1819859&view=auto
==============================================================================
--- helix/site-content/0.8.0-docs/recipes/rabbitmq_consumer_group.html (added)
+++ helix/site-content/0.8.0-docs/recipes/rabbitmq_consumer_group.html Tue Jan  2 17:32:45 2018
@@ -0,0 +1,419 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2018-01-02
+ Rendered using Maven Reflow Skin 1.0.0 (http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+	<head>
+		<meta charset="UTF-8" />
+		<title>Apache Helix - RabbitMQ Consumer Group</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta name="description" content="" />
+		<meta http-equiv="content-language" content="en" />
+
+		<link href="../css/bootstrap.min.css" rel="stylesheet" />
+		<link href="../css/bootstrap-responsive.min.css" rel="stylesheet" />
+		<link href="../css/docs.css" rel="stylesheet" />
+		<link href="../css/reflow-skin.css" rel="stylesheet" />
+		
+		
+		<link href="../css/lightbox.css" rel="stylesheet" />
+		
+		<link href="../css/site.css" rel="stylesheet" />
+		<link href="../css/print.css" rel="stylesheet" media="print" />
+		
+		<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+		<!--[if lt IE 9]>
+			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+		<![endif]-->
+		
+<script type="text/javascript">var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _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 class="page-recipes-rabbitmq_consumer_group project-080-docs" data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="../..">Apache Helix</a>
+					<div class="nav-collapse">
+						<ul class="nav pull-right">
+							<li><a href="../index.html" title="Helix 0.8.0">Helix 0.8.0 </a></li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="../download.html" title="Download">Download </a></li>
+									<li><a href="../Building.html" title="Building">Building </a></li>
+									<li><a href="../releasenotes/release-0.8.0.html" title="Release Notes">Release Notes </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="../Quickstart.html" title="Quick Start">Quick Start </a></li>
+									<li><a href="../Tutorial.html" title="Tutorial">Tutorial </a></li>
+									<li><a href="../../javadocs/0.8.0" title="Javadocs">Javadocs </a></li>
+								</ul>
+							</li>
+							<li class="dropdown active">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="lock_manager.html" title="Distributed lock manager">Distributed lock manager </a></li>
+									<li class="active"><a href="" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a></li>
+									<li><a href="rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a></li>
+									<li><a href="service_discovery.html" title="Service discovery">Service discovery </a></li>
+									<li><a href="task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+		
+	<div class="container">
+	
+	<!-- Masthead
+	================================================== -->
+	<header class="jumbotron subhead">
+		<div class="row" id="banner">
+			<div class="span12">
+				<div class="pull-left">
+					<a href="../../" id="bannerLeft"><img src="../../images/helix-logo.jpg" alt='"''"' /></a>
+					<p class="lead">A cluster management framework for partitioned and replicated distributed resources</p>
+				</div>
+				<div class="pull-right">
+					<a href="http://www.apache.org/" id="bannerRight"><img src="../../images/feather_small.gif" alt='"''"' /></a>
+				</div>
+			</div>
+		</div>
+		<div>
+			<ul class="breadcrumb">
+				<li><a href="http://helix.incubator.apache.org/" title="Apache Helix" class="externalLink">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="../../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="../" title="Release 0.8.0">Release 0.8.0 </a></li>
+				<li class="divider">/</li>
+				<li>RabbitMQ Consumer Group</li>
+				<li class="publishDate version-date pull-right">Last Published: 2018-01-02</li>
+			</ul>
+		</div>
+	</header>
+
+	<div class="main-body">
+	<div class="row">
+		<div class="span12">
+			<div class="body-content">
+<!-- -
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. --> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="RabbitMQ_Consumer_Group">RabbitMQ Consumer Group</h2>
+ </div> 
+ <p><a class="externalLink" href="http://www.rabbitmq.com/">RabbitMQ</a> is 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 is routed to the queue 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 messages.</p> 
+ <p>While this works, in production systems one needs the following:</p> 
+ <ul> 
+  <li>Ability to handle failures: when a consumer fails, another consumer must be started or the other consumers must start processing these messages that should have been processed by the failed consumer</li> 
+  <li>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</li> 
+ </ul> 
+ <p>In this recipe, we demonstrate handling of consumer failures and new consumer additions using Helix.</p> 
+ <p>Mapping this usecase to Helix is pretty easy as the binding key/routing key is equivalent to a partition.</p> 
+ <p>Let’s take an example. Lets say the queue 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 let’s say that a consumer failed, reducing the number of active consumers to 2. This means each consumer must process 3 queues.</p> 
+ <p>We showcase how such a dynamic application can be developed using Helix. Even though we use RabbitMQ as the pub/sub system one can extend this solution to other pub/sub systems.</p> 
+ <div class="section"> 
+  <h3 id="Try_It">Try It</h3> 
+  <div class="source"> 
+   <pre>git clone https://git-wip-us.apache.org/repos/asf/helix.git
+cd helix
+git checkout tags/helix-0.8.0
+mvn clean install package -DskipTests
+cd recipes/rabbitmq-consumer-group/bin
+chmod +x *
+export HELIX_PKG_ROOT=`pwd`/helix-core/target/helix-core-pkg
+export HELIX_RABBITMQ_ROOT=`pwd`/recipes/rabbitmq-consumer-group/
+chmod +x $HELIX_PKG_ROOT/bin/*
+chmod +x $HELIX_RABBITMQ_ROOT/bin/*
+</pre> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Install_RabbitMQ">Install RabbitMQ</h4> 
+   <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"> 
+   <h4 id="Start_ZK">Start ZK</h4> 
+   <p>Start ZooKeeper at port 2199</p> 
+   <div class="source"> 
+    <pre>$HELIX_PKG_ROOT/bin/start-standalone-zookeeper 2199
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Setup_the_Consumer_Group_Cluster">Setup the Consumer Group Cluster</h4> 
+   <p>This will setup the cluster by creating a “rabbitmq-consumer-group” cluster and adds a “topic” with “6” queues.</p> 
+   <div class="source"> 
+    <pre>$HELIX_RABBITMQ_ROOT/bin/setup-cluster.sh localhost:2199
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Add_Consumers">Add Consumers</h4> 
+   <p>Start 2 consumers in 2 different terminals. Each consumer is given a unique ID.</p> 
+   <div class="source"> 
+    <pre>//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
+
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Start_the_Helix_Controller">Start the Helix Controller</h4> 
+   <p>Now start a Helix controller that starts managing the “rabbitmq-consumer-group” cluster.</p> 
+   <div class="source"> 
+    <pre>$HELIX_RABBITMQ_ROOT/bin/start-cluster-manager.sh localhost:2199
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Send_Messages_to_the_Topic">Send Messages to the Topic</h4> 
+   <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>$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"> 
+   <h4 id="Add_Another_Consumer">Add Another Consumer</h4> 
+   <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.</p> 
+   <div class="source"> 
+    <pre>$HELIX_RABBITMQ_ROOT/bin/start-consumer.sh localhost:2199 2 localhost
+</pre> 
+   </div> 
+   <p>Send messages again to the topic</p> 
+   <div class="source"> 
+    <pre>$HELIX_RABBITMQ_ROOT/bin/send-message.sh localhost 100
+</pre> 
+   </div> 
+   <p>You should see that messages are now received by all 3 consumers.</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Stop_a_Consumer">Stop a Consumer</h4> 
+   <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> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="How_does_this_work">How does this work?</h3> 
+  <p>Find the entire code <a class="externalLink" href="https://git-wip-us.apache.org/repos/asf?p=helix.git;a=tree;f=recipes/rabbitmq-consumer-group/src/main/java/org/apache/helix/recipes/rabbitmq">here</a>.</p> 
+  <div class="section"> 
+   <h4 id="Cluster_Setup">Cluster Setup</h4> 
+   <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. This 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>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> 
+ <div class="section"> 
+  <h3 id="Starting_the_Consumers">Starting the Consumers</h3> 
+  <p>The only thing consumers need to know is the ZooKeeper address, cluster name and consumer ID. It does not need to know anything else.</p> 
+  <div class="source"> 
+   <pre>_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 state model 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>@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>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+	
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Get Helix</li>
+						<li>
+							<a href="../download.html" title="Download">Download </a>
+						</li>
+						<li>
+							<a href="../Building.html" title="Building">Building </a>
+						</li>
+						<li>
+							<a href="../releasenotes/release-0.8.0.html" title="Release Notes">Release Notes </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Hands-On</li>
+						<li>
+							<a href="../Quickstart.html" title="Quick Start">Quick Start </a>
+						</li>
+						<li>
+							<a href="../Tutorial.html" title="Tutorial">Tutorial </a>
+						</li>
+						<li>
+							<a href="../../javadocs/0.8.0" title="Javadocs">Javadocs </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Recipes</li>
+						<li>
+							<a href="lock_manager.html" title="Distributed lock manager">Distributed lock manager </a>
+						</li>
+						<li class="active">
+							<a href="#" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
+						</li>
+						<li>
+							<a href="rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a>
+						</li>
+						<li>
+							<a href="service_discovery.html" title="Service discovery">Service discovery </a>
+						</li>
+						<li>
+							<a href="task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</footer>
+		
+	<div class="container subfooter">
+		<div class="row">
+			<div class="span12">
+				<p class="pull-right"><a href="#">Back to top</a></p>
+				<p class="copyright">Copyright &copy;2018 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
+		
+<div class="row span16">
+  <div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation.
+        All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
+  <a href="http://helix.apache.org/0.8.0-docs/privacy-policy.html">Privacy Policy</a>
+</div>			</div>
+		</div>
+	</div>
+
+	<!-- Le javascript
+	================================================== -->
+	<!-- Placed at the end of the document so the pages load faster -->
+
+	<!-- Fallback jQuery loading from Google CDN:
+	     http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go -->
+	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+	<script type="text/javascript">
+		if (typeof jQuery == 'undefined')
+		{
+			document.write(unescape("%3Cscript src='../js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
+		}
+	</script>
+	
+	<script src="../js/bootstrap.min.js"></script>
+	<script src="../js/lightbox.js"></script>
+	<script src="../js/jquery.smooth-scroll.min.js"></script>
+	<!-- back button support for smooth scroll -->
+	<script src="../js/jquery.ba-bbq.min.js"></script>
+
+	<script src="../js/reflow-skin.js"></script>
+	
+	</body>
+</html>
\ No newline at end of file

Added: helix/site-content/0.8.0-docs/recipes/rsync_replicated_file_store.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.8.0-docs/recipes/rsync_replicated_file_store.html?rev=1819859&view=auto
==============================================================================
--- helix/site-content/0.8.0-docs/recipes/rsync_replicated_file_store.html (added)
+++ helix/site-content/0.8.0-docs/recipes/rsync_replicated_file_store.html Tue Jan  2 17:32:45 2018
@@ -0,0 +1,361 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2018-01-02
+ Rendered using Maven Reflow Skin 1.0.0 (http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+	<head>
+		<meta charset="UTF-8" />
+		<title>Apache Helix - Near-Realtime Rsync Replicated File System</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta name="description" content="" />
+		<meta http-equiv="content-language" content="en" />
+
+		<link href="../css/bootstrap.min.css" rel="stylesheet" />
+		<link href="../css/bootstrap-responsive.min.css" rel="stylesheet" />
+		<link href="../css/docs.css" rel="stylesheet" />
+		<link href="../css/reflow-skin.css" rel="stylesheet" />
+		
+		
+		<link href="../css/lightbox.css" rel="stylesheet" />
+		
+		<link href="../css/site.css" rel="stylesheet" />
+		<link href="../css/print.css" rel="stylesheet" media="print" />
+		
+		<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+		<!--[if lt IE 9]>
+			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+		<![endif]-->
+		
+<script type="text/javascript">var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _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 class="page-recipes-rsync_replicated_file_store project-080-docs" data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="../..">Apache Helix</a>
+					<div class="nav-collapse">
+						<ul class="nav pull-right">
+							<li><a href="../index.html" title="Helix 0.8.0">Helix 0.8.0 </a></li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="../download.html" title="Download">Download </a></li>
+									<li><a href="../Building.html" title="Building">Building </a></li>
+									<li><a href="../releasenotes/release-0.8.0.html" title="Release Notes">Release Notes </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="../Quickstart.html" title="Quick Start">Quick Start </a></li>
+									<li><a href="../Tutorial.html" title="Tutorial">Tutorial </a></li>
+									<li><a href="../../javadocs/0.8.0" title="Javadocs">Javadocs </a></li>
+								</ul>
+							</li>
+							<li class="dropdown active">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="lock_manager.html" title="Distributed lock manager">Distributed lock manager </a></li>
+									<li><a href="rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a></li>
+									<li class="active"><a href="" title="Rsync replicated file store">Rsync replicated file store </a></li>
+									<li><a href="service_discovery.html" title="Service discovery">Service discovery </a></li>
+									<li><a href="task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+		
+	<div class="container">
+	
+	<!-- Masthead
+	================================================== -->
+	<header class="jumbotron subhead">
+		<div class="row" id="banner">
+			<div class="span12">
+				<div class="pull-left">
+					<a href="../../" id="bannerLeft"><img src="../../images/helix-logo.jpg" alt='"''"' /></a>
+					<p class="lead">A cluster management framework for partitioned and replicated distributed resources</p>
+				</div>
+				<div class="pull-right">
+					<a href="http://www.apache.org/" id="bannerRight"><img src="../../images/feather_small.gif" alt='"''"' /></a>
+				</div>
+			</div>
+		</div>
+		<div>
+			<ul class="breadcrumb">
+				<li><a href="http://helix.incubator.apache.org/" title="Apache Helix" class="externalLink">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="../../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="../" title="Release 0.8.0">Release 0.8.0 </a></li>
+				<li class="divider">/</li>
+				<li>Near-Realtime Rsync Replicated File System</li>
+				<li class="publishDate version-date pull-right">Last Published: 2018-01-02</li>
+			</ul>
+		</div>
+	</header>
+
+	<div class="main-body">
+	<div class="row">
+		<div class="span12">
+			<div class="body-content">
+<!-- -
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. --> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Near-Realtime_Rsync_Replicated_File_System">Near-Realtime Rsync Replicated File System</h2>
+ </div> 
+ <div class="section"> 
+  <h3 id="Quick_Demo">Quick Demo</h3> 
+  <ul> 
+   <li>This demo starts 3 instances with id’s as <tt>localhost_12001, localhost_12002, localhost_12003</tt></li> 
+   <li>Each instance stores its files under <tt>/tmp/&lt;id&gt;/filestore</tt></li> 
+   <li><tt>localhost_12001</tt> is designated as the master, and <tt>localhost_12002</tt> and <tt>localhost_12003</tt> are the slaves</li> 
+   <li>Files written to the master are replicated to the slaves automatically. In this demo, a.txt and b.txt are written to <tt>/tmp/localhost_12001/filestore</tt> and they get replicated to other folders.</li> 
+   <li>When the master is stopped, <tt>localhost_12002</tt> is promoted to master.</li> 
+   <li>The other slave <tt>localhost_12003</tt> stops replicating from <tt>localhost_12001</tt> and starts replicating from new master <tt>localhost_12002</tt></li> 
+   <li>Files written to new master <tt>localhost_12002</tt> are replicated to <tt>localhost_12003</tt></li> 
+   <li>In the end state of this quick demo, <tt>localhost_12002</tt> is the master and <tt>localhost_12003</tt> is the slave. Manually create files under <tt>/tmp/localhost_12002/filestore</tt> and see that appear in <tt>/tmp/localhost_12003/filestore</tt></li> 
+   <li>Ignore the interrupted exceptions on the console :-)</li> 
+  </ul> 
+  <div class="source"> 
+   <pre>git clone https://git-wip-us.apache.org/repos/asf/helix.git
+cd helix
+git checkout tags/helix-0.8.0
+cd recipes/rsync-replicated-file-system/
+mvn clean install package -DskipTests
+cd target/rsync-replicated-file-system-pkg/bin
+chmod +x *
+./quickdemo
+
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Overview">Overview</h3> 
+  <p>There are many applications that require storage for storing large number of relatively small data files. Examples include media stores to store small videos, images, mail attachments etc. Each of these objects is typically kilobytes, often no larger than a few megabytes. An additional distinguishing feature of these use cases is that files are typically only added or deleted, rarely updated. When there are updates, they do not have any concurrency requirements.</p> 
+  <p>These are much simpler requirements than what general purpose distributed file system have to satisfy; these would include concurrent access to files, random access for reads and updates, posix compliance, and others. To satisfy those requirements, general DFSs are also pretty complex that are expensive to build and maintain.</p> 
+  <p>A different implementation of a distributed file system includes HDFS which is inspired by Google’s GFS. This is one of the most widely used distributed file system that forms the main data storage platform for Hadoop. HDFS is primary aimed at processing very large data sets and distributes files across a cluster of commodity servers by splitting up files in fixed size chunks. HDFS is not particularly well suited for storing a very large number of relatively tiny files.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="File_Store">File Store</h3> 
+  <p>It’s possible to build a vastly simpler system for the class of applications that have simpler requirements as we have pointed out.</p> 
+  <ul> 
+   <li>Large number of files but each file is relatively small</li> 
+   <li>Access is limited to create, delete and get entire files</li> 
+   <li>No updates to files that are already created (or it’s feasible to delete the old file and create a new one)</li> 
+  </ul> 
+  <p>We call this system a Partitioned File Store (PFS) to distinguish it from other distributed file systems. This system needs to provide the following features:</p> 
+  <ul> 
+   <li>CRD access to large number of small files</li> 
+   <li>Scalability: Files should be distributed across a large number of commodity servers based on the storage requirement</li> 
+   <li>Fault-tolerance: Each file should be replicated on multiple servers so that individual server failures do not reduce availability</li> 
+   <li>Elasticity: It should be possible to add capacity to the cluster easily</li> 
+  </ul> 
+  <p>Apache Helix is a generic cluster management framework that makes it very easy to provide scalability, fault-tolerance and elasticity features. rsync can be easily used as a replication channel between servers so that each file gets replicated on multiple servers.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Design">Design</h3> 
+  <div class="section"> 
+   <h4 id="High_Level">High Level</h4> 
+   <ul> 
+    <li>Partition the file system based on the file name</li> 
+    <li>At any time a single writer can write, we call this a master</li> 
+    <li>For redundancy, we need to have additional replicas called slave. Slaves can optionally serve reads</li> 
+    <li>Slave replicates data from the master</li> 
+    <li>When a master fails, a slave gets promoted to master</li> 
+   </ul> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Transaction_Log">Transaction Log</h4> 
+   <p>Every write on the master will result in creation/deletion of one or more files. In order to maintain timeline consistency slaves need to apply the changes in the same order To facilitate this, the master logs each transaction in a file and each transaction is associated with an 64 bit ID in which the 32 LSB represents a sequence number and MSB represents the generation number The sequence number gets incremented on every transaction and the generation is incremented when a new master is elected</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Replication">Replication</h4> 
+   <p>Replication is required for slaves to keep up with changes on the master. Every time the slave applies a change it checkpoints the last applied transaction ID. During restarts, this allows the slave to pull changes from the last checkpointed ID. Similar to master, the slave logs each transaction to the transaction logs but instead of generating new transaction ID, it uses the same ID generated by the master.</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Failover">Failover</h4> 
+   <p>When a master fails, a new slave will be promoted to master. If the previous master node is reachable, then the new master will flush all the changes from previous the master before taking up mastership. The new master will record the end transaction ID of the current generation and then start a new generation with sequence starting from 1. After this the master will begin accepting writes.</p> 
+   <p><img src="../images/PFS-Generic.png" alt="Partitioned File Store" /></p> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Rsync-based_Solution">Rsync-based Solution</h3> 
+  <p><img src="../images/RSYNC_BASED_PFS.png" alt="Rsync based File Store" /></p> 
+  <p>This application demonstrates a file store that uses rsync as the replication mechanism. One can envision a similar system where instead of using rsync, one can implement a custom solution to notify the slave of the changes and also provide an api to pull the change files.</p> 
+  <div class="section"> 
+   <h4 id="Concepts">Concepts</h4> 
+   <ul> 
+    <li>file_store_dir: Root directory for the actual data files</li> 
+    <li>change_log_dir: The transaction logs are generated under this folder</li> 
+    <li>check_point_dir: The slave stores the check points ( last processed transaction) here</li> 
+   </ul> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Master">Master</h4> 
+   <ul> 
+    <li>File server: This component supports file uploads and downloads and writes the files to <tt>file_store_dir</tt>. This is not included in this application. The idea is that most applications have different ways of implementing this component and have some associated business logic. It is not hard to come up with such a component if needed.</li> 
+    <li>File store watcher: This component watches the <tt>file_store_dir</tt> directory on the local file system for any changes and notifies the registered listeners of the changes</li> 
+    <li>Change log generator: This registers as a listener of the file store watcher and on each notification logs the changes into a file under <tt>change_log_dir</tt></li> 
+   </ul> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Slave">Slave</h4> 
+   <ul> 
+    <li>File server: This component on the slave will only support reads</li> 
+    <li>Cluster state observer: Slave observes the cluster state and is able to know who is the current master</li> 
+    <li>Replicator: This has two subcomponents 
+     <ul> 
+      <li>Periodic rsync of change log: This is a background process that periodically rsyncs the <tt>change_log_dir</tt> of the master to its local directory</li> 
+      <li>Change Log Watcher: This watches the <tt>change_log_dir</tt> for changes and notifies the registered listeners of the change</li> 
+      <li>On demand rsync invoker: This is registered as a listener to change log watcher and on every change invokes rsync to sync only the changed file</li> 
+     </ul></li> 
+   </ul> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Coordination">Coordination</h4> 
+   <p>The coordination between nodes is done by Helix. Helix does the partition management and assigns the partition to multiple nodes based on the replication factor. It elects one the nodes as master and designates others as slaves. It provides notifications to each node in the form of state transitions (Offline to Slave, Slave to Master). It also provides notifications when there is change is cluster state. This allows the slave to stop replicating from current master and start replicating from new master.</p> 
+   <p>In this application, we have only one partition but its very easy to extend it to support multiple partitions. By partitioning the file store, one can add new nodes and Helix will automatically re-distribute partitions among the nodes. To summarize, Helix provides partition management, fault tolerance and facilitates automated cluster expansion.</p> 
+  </div> 
+ </div> 
+</div>
+			</div>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+	
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Get Helix</li>
+						<li>
+							<a href="../download.html" title="Download">Download </a>
+						</li>
+						<li>
+							<a href="../Building.html" title="Building">Building </a>
+						</li>
+						<li>
+							<a href="../releasenotes/release-0.8.0.html" title="Release Notes">Release Notes </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Hands-On</li>
+						<li>
+							<a href="../Quickstart.html" title="Quick Start">Quick Start </a>
+						</li>
+						<li>
+							<a href="../Tutorial.html" title="Tutorial">Tutorial </a>
+						</li>
+						<li>
+							<a href="../../javadocs/0.8.0" title="Javadocs">Javadocs </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Recipes</li>
+						<li>
+							<a href="lock_manager.html" title="Distributed lock manager">Distributed lock manager </a>
+						</li>
+						<li>
+							<a href="rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
+						</li>
+						<li class="active">
+							<a href="#" title="Rsync replicated file store">Rsync replicated file store </a>
+						</li>
+						<li>
+							<a href="service_discovery.html" title="Service discovery">Service discovery </a>
+						</li>
+						<li>
+							<a href="task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</footer>
+		
+	<div class="container subfooter">
+		<div class="row">
+			<div class="span12">
+				<p class="pull-right"><a href="#">Back to top</a></p>
+				<p class="copyright">Copyright &copy;2018 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
+		
+<div class="row span16">
+  <div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation.
+        All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
+  <a href="http://helix.apache.org/0.8.0-docs/privacy-policy.html">Privacy Policy</a>
+</div>			</div>
+		</div>
+	</div>
+
+	<!-- Le javascript
+	================================================== -->
+	<!-- Placed at the end of the document so the pages load faster -->
+
+	<!-- Fallback jQuery loading from Google CDN:
+	     http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go -->
+	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+	<script type="text/javascript">
+		if (typeof jQuery == 'undefined')
+		{
+			document.write(unescape("%3Cscript src='../js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
+		}
+	</script>
+	
+	<script src="../js/bootstrap.min.js"></script>
+	<script src="../js/lightbox.js"></script>
+	<script src="../js/jquery.smooth-scroll.min.js"></script>
+	<!-- back button support for smooth scroll -->
+	<script src="../js/jquery.ba-bbq.min.js"></script>
+
+	<script src="../js/reflow-skin.js"></script>
+	
+	</body>
+</html>
\ No newline at end of file