helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1877599 [16/27] - in /helix/site-content: ./ 0.6.1-incubating-docs/ 0.6.2-incubating-docs/ 0.6.3-docs/ 0.6.4-docs/ 0.6.5-docs/ 0.6.6-docs/ 0.6.7-docs/ 0.6.8-docs/ 0.6.9-docs/ 0.7.0-incubating-docs/ 0.7.1-docs/ 0.8.0-docs/ 0.8.1-docs/ 0.8.2...
Date Mon, 11 May 2020 18:32:13 GMT
Added: helix/site-content/0.9.5-docs/Quickstart.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.9.5-docs/Quickstart.html?rev=1877599&view=auto
==============================================================================
--- helix/site-content/0.9.5-docs/Quickstart.html (added)
+++ helix/site-content/0.9.5-docs/Quickstart.html Mon May 11 18:32:11 2020
@@ -0,0 +1,860 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-05-11
+ 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 -   Quickstart</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-quickstart project-095-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.9.5">Helix 0.9.5 </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.9.5.html" title="Release Notes">Release Notes </a></li>
+								</ul>
+							</li>
+							<li class="dropdown active">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li class="active"><a href="" title="Quick Start">Quick Start </a></li>
+									<li><a href="Tutorial.html" title="Tutorial">Tutorial </a></li>
+									<li><a href="../javadocs/0.9.5" 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="../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="./" title="Release 0.9.5">Release 0.9.5 </a></li>
+				<li class="divider">/</li>
+				<li>  Quickstart</li>
+				<li class="publishDate version-date pull-right">Last Published: 2020-05-11</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. --> 
+<p></p> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Quickstart">Quickstart</h2>
+ </div> 
+</div> 
+<div class="section"> 
+ <h2 id="Get_Helix">Get Helix</h2> 
+ <p>First, let's get Helix. Either build it, or download it.</p> 
+ <div class="section"> 
+  <h3 id="Build">Build</h3> 
+  <div class="source"> 
+   <pre>git clone https://git-wip-us.apache.org/repos/asf/helix.git
+cd helix
+git checkout tags/helix-0.9.5
+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 id="Download">Download</h3> 
+  <p>Download the 0.9.5 release package <a href="./download.html">here</a></p> 
+ </div> 
+</div> 
+<div class="section"> 
+ <h2 id="Overview">Overview</h2> 
+ <p>In this Quickstart, we'll set up a master-slave replicated, partitioned system. Then we'll demonstrate how to add a node, rebalance the partitions, and show how Helix manages failover.</p> 
+</div> 
+<div class="section"> 
+ <h2 id="Lets_Do_It">Let's Do It</h2> 
+ <p>Helix provides command line interfaces to set up the cluster and view the cluster state. The best way to understand how Helix views a cluster is to build a cluster.</p> 
+ <div class="section"> 
+  <h3 id="Get_to_the_Tools_Directory">Get to the Tools Directory</h3> 
+  <p>If you built the code:</p> 
+  <div class="source"> 
+   <pre>cd helix/helix/helix-core/target/helix-core-pkg/bin
+</pre> 
+  </div> 
+  <p>If you downloaded the release package, extract it.</p> 
+ </div> 
+</div> 
+<div class="section"> 
+ <h2 id="Short_Version">Short Version</h2> 
+ <p>You can observe the components working together in this demo, which does the following:</p> 
+ <ul> 
+  <li>Create a cluster</li> 
+  <li>Add 2 nodes (participants) to the cluster</li> 
+  <li>Set up a resource with 6 partitions and 2 replicas: 1 Master, and 1 Slave per partition</li> 
+  <li>Show the cluster state after Helix balances the partitions</li> 
+  <li>Add a third node</li> 
+  <li>Show the cluster state. Note that the third node has taken mastership of 2 partitions.</li> 
+  <li>Kill the third node (Helix takes care of failover)</li> 
+  <li>Show the cluster state. Note that the two surviving nodes take over mastership of the partitions from the failed node</li> 
+ </ul> 
+ <div class="section"> 
+  <h3 id="Run_the_Demo">Run the Demo</h3> 
+  <div class="source"> 
+   <pre>cd helix/helix/helix-core/target/helix-core-pkg/bin
+./quickstart.sh
+</pre> 
+  </div> 
+  <div class="section"> 
+   <h4 id="The_Initial_Setup">The Initial Setup</h4> 
+   <p>2 nodes are set up and the partitions are rebalanced.</p> 
+   <p>The cluster state is as follows:</p> 
+   <div class="source"> 
+    <pre>CLUSTER STATE: After starting 2 nodes
+                localhost_12000    localhost_12001
+MyResource_0           M                  S
+MyResource_1           S                  M
+MyResource_2           M                  S
+MyResource_3           M                  S
+MyResource_4           S                  M
+MyResource_5           S                  M
+</pre> 
+   </div> 
+   <p>Note there is one master and one slave per partition.</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Add_a_Node">Add a Node</h4> 
+   <p>A third node is added and the cluster is rebalanced.</p> 
+   <p>The cluster state changes to:</p> 
+   <div class="source"> 
+    <pre>CLUSTER STATE: After adding a third node
+               localhost_12000    localhost_12001    localhost_12002
+MyResource_0          S                  M                  S
+MyResource_1          S                  S                  M
+MyResource_2          M                  S                  S
+MyResource_3          S                  S                  M
+MyResource_4          M                  S                  S
+MyResource_5          S                  M                  S
+</pre> 
+   </div> 
+   <p>Note there is one master and <i>two</i> slaves per partition. This is expected because there are three nodes.</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Kill_a_Node">Kill a Node</h4> 
+   <p>Finally, a node is killed to simulate a failure</p> 
+   <p>Helix makes sure each partition has a master. The cluster state changes to:</p> 
+   <div class="source"> 
+    <pre>CLUSTER STATE: After the 3rd node stops/crashes
+               localhost_12000    localhost_12001    localhost_12002
+MyResource_0          S                  M                  -
+MyResource_1          S                  M                  -
+MyResource_2          M                  S                  -
+MyResource_3          M                  S                  -
+MyResource_4          M                  S                  -
+MyResource_5          S                  M                  -
+</pre> 
+   </div> 
+  </div> 
+ </div> 
+</div> 
+<div class="section"> 
+ <h2 id="Long_Version">Long Version</h2> 
+ <p>Now you can run the same steps by hand. In this detailed version, we'll do the following:</p> 
+ <ul> 
+  <li>Define a cluster</li> 
+  <li>Add two nodes to the cluster</li> 
+  <li>Add a 6-partition resource with 1 master and 2 slave replicas per partition</li> 
+  <li>Verify that the cluster is healthy and inspect the Helix view</li> 
+  <li>Expand the cluster: add a few nodes and rebalance the partitions</li> 
+  <li>Failover: stop a node and verify the mastership transfer</li> 
+ </ul> 
+ <div class="section"> 
+  <h3 id="Install_and_Start_ZooKeeper">Install and Start ZooKeeper</h3> 
+  <p>Zookeeper can be started in standalone mode or replicated mode.</p> 
+  <p>More information is available at</p> 
+  <ul> 
+   <li><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></li> 
+   <li><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></li> 
+  </ul> 
+  <p>In this example, let's start zookeeper in local mode.</p> 
+  <div class="section"> 
+   <h4 id="Start_ZooKeeper_Locally_on_Port_2199">Start ZooKeeper Locally on Port 2199</h4> 
+   <div class="source"> 
+    <pre>./start-standalone-zookeeper.sh 2199 &amp;
+</pre> 
+   </div> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Define_the_Cluster">Define the Cluster</h3> 
+  <p>The helix-admin tool is used for cluster administration tasks. In the Quickstart, we'll use the 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>Next, we'll set up a cluster MYCLUSTER cluster with these attributes:</p> 
+  <ul> 
+   <li>3 instances running on localhost at ports 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> 
+  <div class="section"> 
+   <h4 id="Create_the_Cluster_MYCLUSTER">Create the Cluster MYCLUSTER</h4> 
+   <div class="source"> 
+    <pre># ./helix-admin.sh --zkSvr &lt;zk_address&gt; --addCluster &lt;clustername&gt;
+./helix-admin.sh --zkSvr localhost:2199 --addCluster MYCLUSTER
+</pre> 
+   </div> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Add_Nodes_to_the_Cluster">Add Nodes to the Cluster</h3> 
+  <p>In this case we'll add three nodes: localhost:12913, localhost:12914, localhost:12915</p> 
+  <div class="source"> 
+   <pre># 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"> 
+  <h3 id="Define_the_Resource_and_Partitioning">Define the Resource and Partitioning</h3> 
+  <p>In this example, the resource is a database, partitioned 6 ways. Note that in a production system, it's common to over-partition for better load balancing. Helix has been used in production to manage hundreds of databases each with 10s or 100s of partitions running on 10s of physical nodes.</p> 
+  <div class="section"> 
+   <h4 id="Create_a_Database_with_6_Partitions_using_the_MasterSlave_State_Model">Create a Database with 6 Partitions using the MasterSlave State Model</h4> 
+   <p>Helix ensures there will be exactly one master for each partition.</p> 
+   <div class="source"> 
+    <pre># helix-admin.sh --zkSvr &lt;zk_address&gt; --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"> 
+   <h4 id="Let_Helix_Assign_Partitions_to_Nodes">Let Helix Assign Partitions to Nodes</h4> 
+   <p>This command will distribute the partitions amongst all the nodes in the cluster. In this example, each partition has 3 replicas.</p> 
+   <div class="source"> 
+    <pre># helix-admin.sh --zkSvr &lt;zk_address&gt; --rebalance &lt;clustername&gt; &lt;resourceName&gt; &lt;replication factor&gt;
+./helix-admin.sh --zkSvr localhost:2199 --rebalance MYCLUSTER myDB 3
+</pre> 
+   </div> 
+   <p>Now the cluster is defined in ZooKeeper. The nodes (localhost:12913, localhost:12914, localhost:12915) and resource (myDB, with 6 partitions using the MasterSlave model) are all properly configured. And the <i>IdealState</i> has been calculated, assuming a replication factor of 3.</p> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Start_the_Helix_Controller">Start the Helix Controller</h3> 
+  <p>Now that the cluster is defined in ZooKeeper, the Helix controller can manage the cluster.</p> 
+  <div class="source"> 
+   <pre># Start the cluster manager, which will manage MYCLUSTER
+./run-helix-controller.sh --zkSvr localhost:2199 --cluster MYCLUSTER 2&gt;&amp;1 &gt; /tmp/controller.log &amp;
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Start_up_the_Cluster_to_be_Managed">Start up the Cluster to be Managed</h3> 
+  <p>We've started up ZooKeeper, defined the cluster, the resources, the partitioning, and started up the Helix controller. Next, we'll start up the nodes of the system to be managed. Each node is a Participant, which is an instance of the system component to be managed. Helix assigns work to Participants, keeps track of their roles and health, and takes action when a node fails.</p> 
+  <div class="source"> 
+   <pre># start up each instance.  These are mock implementations that are actively managed by Helix
+./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 class="section"> 
+  <h3 id="Inspect_the_Cluster">Inspect the Cluster</h3> 
+  <p>Now, let's see the Helix view of our cluster. We'll work our way down as follows:</p> 
+  <div class="source"> 
+   <pre>Clusters -&gt; MYCLUSTER -&gt; instances -&gt; instance detail
+                      -&gt; resources -&gt; resource detail
+                      -&gt; partitions
+</pre> 
+  </div> 
+  <p>A single Helix controller can manage multiple clusters, though so far, we've only defined one cluster. Let's see:</p> 
+  <div class="source"> 
+   <pre># List existing clusters
+./helix-admin.sh --zkSvr localhost:2199 --listClusters
+
+Existing clusters:
+MYCLUSTER
+</pre> 
+  </div> 
+  <p>Now, let's see the Helix view of MYCLUSTER:</p> 
+  <div class="source"> 
+   <pre># helix-admin.sh --zkSvr &lt;zk_address&gt; --listClusterInfo &lt;clusterName&gt;
+./helix-admin.sh --zkSvr localhost:2199 --listClusterInfo MYCLUSTER
+
+Existing resources in cluster MYCLUSTER:
+myDB
+Instances in cluster MYCLUSTER:
+localhost_12915
+localhost_12914
+localhost_12913
+</pre> 
+  </div> 
+  <p>Let's look at the details of an instance:</p> 
+  <div class="source"> 
+   <pre># ./helix-admin.sh --zkSvr &lt;zk_address&gt; --listInstanceInfo &lt;clusterName&gt; &lt;InstanceName&gt;
+./helix-admin.sh --zkSvr localhost:2199 --listInstanceInfo MYCLUSTER localhost_12913
+
+InstanceConfig: {
+  &quot;id&quot; : &quot;localhost_12913&quot;,
+  &quot;mapFields&quot; : {
+  },
+  &quot;listFields&quot; : {
+  },
+  &quot;simpleFields&quot; : {
+    &quot;HELIX_ENABLED&quot; : &quot;true&quot;,
+    &quot;HELIX_HOST&quot; : &quot;localhost&quot;,
+    &quot;HELIX_PORT&quot; : &quot;12913&quot;
+  }
+}
+</pre> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Query_Information_about_a_Resource">Query Information about a Resource</h4> 
+   <div class="source"> 
+    <pre># helix-admin.sh --zkSvr &lt;zk_address&gt; --listResourceInfo &lt;clusterName&gt; &lt;resourceName&gt;
+./helix-admin.sh --zkSvr localhost:2199 --listResourceInfo MYCLUSTER myDB
+
+IdealState for myDB:
+{
+  &quot;id&quot; : &quot;myDB&quot;,
+  &quot;mapFields&quot; : {
+    &quot;myDB_0&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_1&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12915&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_2&quot; : {
+      &quot;localhost_12913&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_3&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12915&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_4&quot; : {
+      &quot;localhost_12913&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_5&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    }
+  },
+  &quot;listFields&quot; : {
+    &quot;myDB_0&quot; : [ &quot;localhost_12914&quot;, &quot;localhost_12913&quot;, &quot;localhost_12915&quot; ],
+    &quot;myDB_1&quot; : [ &quot;localhost_12915&quot;, &quot;localhost_12913&quot;, &quot;localhost_12914&quot; ],
+    &quot;myDB_2&quot; : [ &quot;localhost_12913&quot;, &quot;localhost_12915&quot;, &quot;localhost_12914&quot; ],
+    &quot;myDB_3&quot; : [ &quot;localhost_12915&quot;, &quot;localhost_12913&quot;, &quot;localhost_12914&quot; ],
+    &quot;myDB_4&quot; : [ &quot;localhost_12913&quot;, &quot;localhost_12914&quot;, &quot;localhost_12915&quot; ],
+    &quot;myDB_5&quot; : [ &quot;localhost_12914&quot;, &quot;localhost_12915&quot;, &quot;localhost_12913&quot; ]
+  },
+  &quot;simpleFields&quot; : {
+    &quot;IDEAL_STATE_MODE&quot; : &quot;AUTO&quot;,
+    &quot;REBALANCE_MODE&quot; : &quot;SEMI_AUTO&quot;,
+    &quot;NUM_PARTITIONS&quot; : &quot;6&quot;,
+    &quot;REPLICAS&quot; : &quot;3&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+    &quot;STATE_MODEL_FACTORY_NAME&quot; : &quot;DEFAULT&quot;
+  }
+}
+
+ExternalView for myDB:
+{
+  &quot;id&quot; : &quot;myDB&quot;,
+  &quot;mapFields&quot; : {
+    &quot;myDB_0&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_1&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12915&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_2&quot; : {
+      &quot;localhost_12913&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_3&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12915&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_4&quot; : {
+      &quot;localhost_12913&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_5&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    }
+  },
+  &quot;listFields&quot; : {
+  },
+  &quot;simpleFields&quot; : {
+    &quot;BUCKET_SIZE&quot; : &quot;0&quot;
+  }
+}
+</pre> 
+   </div> 
+   <p>Now, let's look at one of the partitions:</p> 
+   <div class="source"> 
+    <pre># helix-admin.sh --zkSvr &lt;zk_address&gt; --listResourceInfo &lt;clusterName&gt; &lt;partition&gt;
+./helix-admin.sh --zkSvr localhost:2199 --listResourceInfo mycluster myDB_0
+</pre> 
+   </div> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Expand_the_Cluster">Expand the Cluster</h3> 
+  <p>Next, we'll show how Helix does the work that you'd otherwise have to build into your system. When you add capacity to your cluster, you want the work to be evenly distributed. In this example, we started with 3 nodes, with 6 partitions. The partitions were evenly balanced, 2 masters and 4 slaves per node. Let's add 3 more nodes: localhost:12916, localhost:12917, localhost:12918</p> 
+  <div class="source"> 
+   <pre>./helix-admin.sh --zkSvr localhost:2199  --addNode MYCLUSTER localhost:12916
+./helix-admin.sh --zkSvr localhost:2199  --addNode MYCLUSTER localhost:12917
+./helix-admin.sh --zkSvr localhost:2199  --addNode MYCLUSTER localhost:12918
+</pre> 
+  </div> 
+  <p>And start up these instances:</p> 
+  <div class="source"> 
+   <pre># start up each instance.  These are mock implementations that are actively managed by Helix
+./start-helix-participant.sh --zkSvr localhost:2199 --cluster MYCLUSTER --host localhost --port 12916 --stateModelType MasterSlave 2&gt;&amp;1 &gt; /tmp/participant_12916.log
+./start-helix-participant.sh --zkSvr localhost:2199 --cluster MYCLUSTER --host localhost --port 12917 --stateModelType MasterSlave 2&gt;&amp;1 &gt; /tmp/participant_12917.log
+./start-helix-participant.sh --zkSvr localhost:2199 --cluster MYCLUSTER --host localhost --port 12918 --stateModelType MasterSlave 2&gt;&amp;1 &gt; /tmp/participant_12918.log
+</pre> 
+  </div> 
+  <p>And now, let Helix do the work for you. To shift the work, simply rebalance. After the rebalance, each node will have one master and two slaves.</p> 
+  <div class="source"> 
+   <pre>./helix-admin.sh --zkSvr localhost:2199 --rebalance MYCLUSTER myDB 3
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="View_the_Cluster">View the Cluster</h3> 
+  <p>OK, let's see how it looks:</p> 
+  <div class="source"> 
+   <pre>./helix-admin.sh --zkSvr localhost:2199 --listResourceInfo MYCLUSTER myDB
+
+IdealState for myDB:
+{
+  &quot;id&quot; : &quot;myDB&quot;,
+  &quot;mapFields&quot; : {
+    &quot;myDB_0&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12917&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_1&quot; : {
+      &quot;localhost_12916&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_2&quot; : {
+      &quot;localhost_12913&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_3&quot; : {
+      &quot;localhost_12915&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_4&quot; : {
+      &quot;localhost_12916&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_5&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    }
+  },
+  &quot;listFields&quot; : {
+    &quot;myDB_0&quot; : [ &quot;localhost_12917&quot;, &quot;localhost_12913&quot;, &quot;localhost_12914&quot; ],
+    &quot;myDB_1&quot; : [ &quot;localhost_12918&quot;, &quot;localhost_12917&quot;, &quot;localhost_12916&quot; ],
+    &quot;myDB_2&quot; : [ &quot;localhost_12913&quot;, &quot;localhost_12917&quot;, &quot;localhost_12918&quot; ],
+    &quot;myDB_3&quot; : [ &quot;localhost_12915&quot;, &quot;localhost_12917&quot;, &quot;localhost_12918&quot; ],
+    &quot;myDB_4&quot; : [ &quot;localhost_12916&quot;, &quot;localhost_12917&quot;, &quot;localhost_12918&quot; ],
+    &quot;myDB_5&quot; : [ &quot;localhost_12914&quot;, &quot;localhost_12915&quot;, &quot;localhost_12913&quot; ]
+  },
+  &quot;simpleFields&quot; : {
+    &quot;IDEAL_STATE_MODE&quot; : &quot;AUTO&quot;,
+    &quot;REBALANCE_MODE&quot; : &quot;SEMI_AUTO&quot;,
+    &quot;NUM_PARTITIONS&quot; : &quot;6&quot;,
+    &quot;REPLICAS&quot; : &quot;3&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+    &quot;STATE_MODEL_FACTORY_NAME&quot; : &quot;DEFAULT&quot;
+  }
+}
+
+ExternalView for myDB:
+{
+  &quot;id&quot; : &quot;myDB&quot;,
+  &quot;mapFields&quot; : {
+    &quot;myDB_0&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12917&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_1&quot; : {
+      &quot;localhost_12916&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_2&quot; : {
+      &quot;localhost_12913&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_3&quot; : {
+      &quot;localhost_12915&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_4&quot; : {
+      &quot;localhost_12916&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_5&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    }
+  },
+  &quot;listFields&quot; : {
+  },
+  &quot;simpleFields&quot; : {
+    &quot;BUCKET_SIZE&quot; : &quot;0&quot;
+  }
+}
+</pre> 
+  </div> 
+  <p>Mission accomplished. The partitions are nicely balanced.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="How_about_Failover">How about Failover?</h3> 
+  <p>Building a fault tolerant system isn't trivial, but with Helix, it's easy. Helix detects a failed instance, and triggers mastership transfer automatically.</p> 
+  <p>First, let’s fail an instance. In this example, we'll kill localhost:12918 to simulate a failure.</p> 
+  <p>We lost localhost:12918, so myDB_1 lost its MASTER. Helix can fix that, it will transfer mastership to a healthy node that is currently a SLAVE, say localhost:12197. Helix balances the load as best as it can, given there are 6 partitions on 5 nodes. Let's see:</p> 
+  <div class="source"> 
+   <pre>./helix-admin.sh --zkSvr localhost:2199 --listResourceInfo MYCLUSTER myDB
+
+IdealState for myDB:
+{
+  &quot;id&quot; : &quot;myDB&quot;,
+  &quot;mapFields&quot; : {
+    &quot;myDB_0&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12917&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_1&quot; : {
+      &quot;localhost_12916&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_2&quot; : {
+      &quot;localhost_12913&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_3&quot; : {
+      &quot;localhost_12915&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_4&quot; : {
+      &quot;localhost_12916&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12918&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_5&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    }
+  },
+  &quot;listFields&quot; : {
+    &quot;myDB_0&quot; : [ &quot;localhost_12917&quot;, &quot;localhost_12913&quot;, &quot;localhost_12914&quot; ],
+    &quot;myDB_1&quot; : [ &quot;localhost_12918&quot;, &quot;localhost_12917&quot;, &quot;localhost_12916&quot; ],
+    &quot;myDB_2&quot; : [ &quot;localhost_12913&quot;, &quot;localhost_12918&quot;, &quot;localhost_12917&quot; ],
+    &quot;myDB_3&quot; : [ &quot;localhost_12915&quot;, &quot;localhost_12918&quot;, &quot;localhost_12917&quot; ],
+    &quot;myDB_4&quot; : [ &quot;localhost_12916&quot;, &quot;localhost_12917&quot;, &quot;localhost_12918&quot; ],
+    &quot;myDB_5&quot; : [ &quot;localhost_12914&quot;, &quot;localhost_12915&quot;, &quot;localhost_12913&quot; ]
+  },
+  &quot;simpleFields&quot; : {
+    &quot;IDEAL_STATE_MODE&quot; : &quot;AUTO&quot;,
+    &quot;REBALANCE_MODE&quot; : &quot;SEMI_AUTO&quot;,
+    &quot;NUM_PARTITIONS&quot; : &quot;6&quot;,
+    &quot;REPLICAS&quot; : &quot;3&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+    &quot;STATE_MODEL_FACTORY_NAME&quot; : &quot;DEFAULT&quot;
+  }
+}
+
+ExternalView for myDB:
+{
+  &quot;id&quot; : &quot;myDB&quot;,
+  &quot;mapFields&quot; : {
+    &quot;myDB_0&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12917&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_1&quot; : {
+      &quot;localhost_12916&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12917&quot; : &quot;MASTER&quot;
+    },
+    &quot;myDB_2&quot; : {
+      &quot;localhost_12913&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_3&quot; : {
+      &quot;localhost_12915&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_4&quot; : {
+      &quot;localhost_12916&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12917&quot; : &quot;SLAVE&quot;
+    },
+    &quot;myDB_5&quot; : {
+      &quot;localhost_12913&quot; : &quot;SLAVE&quot;,
+      &quot;localhost_12914&quot; : &quot;MASTER&quot;,
+      &quot;localhost_12915&quot; : &quot;SLAVE&quot;
+    }
+  },
+  &quot;listFields&quot; : {
+  },
+  &quot;simpleFields&quot; : {
+    &quot;BUCKET_SIZE&quot; : &quot;0&quot;
+  }
+}
+</pre> 
+  </div> 
+  <p>As we've seen in this Quickstart, Helix takes care of partitioning, load balancing, elasticity, failure detection and recovery.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="ZooInspector">ZooInspector</h3> 
+  <p>You can view all of the underlying data by going direct to zookeeper. Use ZooInspector that comes with zookeeper to browse the data. This is a java applet (make sure you have X windows)</p> 
+  <p>To start zooinspector run the following command from &lt;zk_install_directory&gt;/contrib/ZooInspector</p> 
+  <div class="source"> 
+   <pre>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 class="section"> 
+  <h3 id="Next">Next</h3> 
+  <p>Now that you understand the idea of Helix, read the <a href="./Tutorial.html">tutorial</a> to learn how to choose the right state model and constraints for your system, and how to implement it. In many cases, the built-in features meet your requirements. And best of all, Helix is a customizable framework, so you can plug in your own behavior, while retaining the automation provided by Helix.</p> 
+ </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.9.5.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 class="active">
+							<a href="#" title="Quick Start">Quick Start </a>
+						</li>
+						<li>
+							<a href="Tutorial.html" title="Tutorial">Tutorial </a>
+						</li>
+						<li>
+							<a href="../javadocs/0.9.5" 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;2020 <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.9.5-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.9.5-docs/Tutorial.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.9.5-docs/Tutorial.html?rev=1877599&view=auto
==============================================================================
--- helix/site-content/0.9.5-docs/Tutorial.html (added)
+++ helix/site-content/0.9.5-docs/Tutorial.html Mon May 11 18:32:11 2020
@@ -0,0 +1,419 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-05-11
+ 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 -   Tutorial</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-tutorial project-095-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.9.5">Helix 0.9.5 </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.9.5.html" title="Release Notes">Release Notes </a></li>
+								</ul>
+							</li>
+							<li class="dropdown active">
+								<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 class="active"><a href="" title="Tutorial">Tutorial </a></li>
+									<li><a href="../javadocs/0.9.5" 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="../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="./" title="Release 0.9.5">Release 0.9.5 </a></li>
+				<li class="divider">/</li>
+				<li>  Tutorial</li>
+				<li class="publishDate version-date pull-right">Last Published: 2020-05-11</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. --> 
+<p></p> 
+<div class="page-header">
+ <h1>Helix Tutorial</h1>
+</div> 
+<p>In this tutorial, we will cover the roles of a Helix-managed cluster, and show the code you need to write to integrate with it. In many cases, there is a simple default behavior that is often appropriate, but you can also customize the behavior.</p> 
+<p>Convention: we first cover the <i>basic</i> approach, which is the easiest to implement. Then, we’ll describe <i>advanced</i> options, which give you more control over the system behavior, but require you to write more code.</p> 
+<div class="section"> 
+ <div class="section"> 
+  <h3 id="Prerequisites">Prerequisites</h3> 
+  <ol style="list-style-type: decimal"> 
+   <li>Read <a href="../Concepts.html">Concepts/Terminology</a> and <a href="../Architecture.html">Architecture</a></li> 
+   <li>Read the <a href="./Quickstart.html">Quickstart guide</a> to learn how Helix models and manages a cluster</li> 
+   <li>Install Helix source. See: <a href="./Quickstart.html">Quickstart</a> for the steps.</li> 
+  </ol> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Tutorial_Outline">Tutorial Outline</h3> 
+  <ol style="list-style-type: decimal"> 
+   <li><a href="./tutorial_participant.html">Participant</a></li> 
+   <li><a href="./tutorial_spectator.html">Spectator</a></li> 
+   <li><a href="./tutorial_controller.html">Controller</a></li> 
+   <li><a href="./tutorial_rebalance.html">Rebalancing Algorithms</a></li> 
+   <li><a href="./tutorial_user_def_rebalancer.html">User-Defined Rebalancing</a></li> 
+   <li><a href="./tutorial_state.html">State Machines</a></li> 
+   <li><a href="./tutorial_messaging.html">Messaging</a></li> 
+   <li><a href="./tutorial_health.html">Customized health check</a></li> 
+   <li><a href="./tutorial_throttling.html">Throttling</a></li> 
+   <li><a href="./tutorial_propstore.html">Application Property Store</a></li> 
+   <li><a href="./tutorial_admin.html">Admin Interface</a></li> 
+   <li><a href="./tutorial_yaml.html">YAML Cluster Setup</a></li> 
+   <li><a href="./tutorial_agent.html">Helix Agent (for non-JVM systems)</a></li> 
+   <li><a href="./tutorial_task_framework.html">Task Framework</a> 
+    <ol style="list-style-type: decimal"> 
+     <li><a href="./tutorial_user_content_store.html">Task with User Defined Content Store</a></li> 
+     <li><a href="./tutorial_task_throttling.html">Task Throttling</a></li> 
+     <li><a href="./quota_scheduling.html">Quota-based Scheduling</a></li> 
+    </ol></li> 
+   <li><a href="./tutorial_rest_service.html">Helix REST Service 2.0</a></li> 
+   <li><a href="./tutorial_ui.html">Helix UI Setup</a></li> 
+  </ol> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Preliminaries">Preliminaries</h3> 
+  <p>First, we need to set up the system. Let's walk through the steps in building a distributed system using Helix.</p> 
+  <div class="section"> 
+   <h4 id="Start_ZooKeeper">Start ZooKeeper</h4> 
+   <p>This starts a zookeeper in standalone mode. For production deployment, see <a class="externalLink" href="http://zookeeper.apache.org">Apache ZooKeeper</a> for instructions.</p> 
+   <div class="source"> 
+    <pre>./start-standalone-zookeeper.sh 2199 &amp;
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Create_a_Cluster">Create a Cluster</h4> 
+   <p>Creating a cluster will define the cluster in appropriate znodes on ZooKeeper.</p> 
+   <p>Using the Java API:</p> 
+   <div class="source"> 
+    <pre>// Create setup tool instance
+// Note: ZK_ADDRESS is the host:port of Zookeeper
+String ZK_ADDRESS = &quot;localhost:2199&quot;;
+admin = new ZKHelixAdmin(ZK_ADDRESS);
+
+String CLUSTER_NAME = &quot;helix-demo&quot;;
+//Create cluster namespace in zookeeper
+admin.addCluster(CLUSTER_NAME);
+</pre> 
+   </div> 
+   <p>OR</p> 
+   <p>Using the command-line interface:</p> 
+   <div class="source"> 
+    <pre>./helix-admin.sh --zkSvr localhost:2199 --addCluster helix-demo
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Configure_the_Nodes_of_the_Cluster">Configure the Nodes of the Cluster</h4> 
+   <p>First we'll add new nodes to the cluster, then configure the nodes in the cluster. Each node in the cluster must be uniquely identifiable. The most commonly used convention is hostname:port.</p> 
+   <div class="source"> 
+    <pre>String CLUSTER_NAME = &quot;helix-demo&quot;;
+int NUM_NODES = 2;
+String hosts[] = new String[]{&quot;localhost&quot;,&quot;localhost&quot;};
+String ports[] = new String[]{7000,7001};
+for (int i = 0; i &lt; NUM_NODES; i++)
+{
+  InstanceConfig instanceConfig = new InstanceConfig(hosts[i]+ &quot;_&quot; + ports[i]);
+  instanceConfig.setHostName(hosts[i]);
+  instanceConfig.setPort(ports[i]);
+  instanceConfig.setInstanceEnabled(true);
+
+  //Add additional system specific configuration if needed. These can be accessed during the node start up.
+  instanceConfig.getRecord().setSimpleField(&quot;key&quot;, &quot;value&quot;);
+  admin.addInstance(CLUSTER_NAME, instanceConfig);
+}
+</pre> 
+   </div> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Configure_the_Resource">Configure the Resource</h4> 
+   <p>A <b>resource</b> represents the actual task performed by the nodes. It can be a database, index, topic, queue or any other processing entity. A resource can be divided into many sub-parts known as <b>partitions</b>.</p> 
+   <div class="section"> 
+    <h5 id="Define_the_State_Model_and_Constraints">Define the State Model and Constraints</h5> 
+    <p>For scalability and fault tolerance, each partition can have one or more replicas. The <b>state model</b> allows one to declare the system behavior by first enumerating the various STATES, and the TRANSITIONS between them. A simple model is ONLINE-OFFLINE where ONLINE means the task is active and OFFLINE means it's not active. You can also specify how many replicas must be in each state, these are known as <b>constraints</b>. For example, in a search system, one might need more than one node serving the same index to handle the load.</p> 
+    <p>The allowed states:</p> 
+    <ul> 
+     <li>MASTER</li> 
+     <li>SLAVE</li> 
+     <li>OFFLINE</li> 
+    </ul> 
+    <p>The allowed transitions:</p> 
+    <ul> 
+     <li>OFFLINE to SLAVE</li> 
+     <li>SLAVE to OFFLINE</li> 
+     <li>SLAVE to MASTER</li> 
+     <li>MASTER to SLAVE</li> 
+    </ul> 
+    <p>The constraints:</p> 
+    <ul> 
+     <li>no more than 1 MASTER per partition</li> 
+     <li>the rest of the replicas should be slaves</li> 
+    </ul> 
+    <p>The following snippet shows how to declare the state model and constraints for the MASTER-SLAVE model.</p> 
+    <div class="source"> 
+     <pre>StateModelDefinition.Builder builder = new StateModelDefinition.Builder(STATE_MODEL_NAME);
+
+// Add states and their rank to indicate priority. A lower rank corresponds to a higher priority
+builder.addState(MASTER, 1);
+builder.addState(SLAVE, 2);
+builder.addState(OFFLINE);
+
+// Set the initial state when the node starts
+builder.initialState(OFFLINE);
+
+// Add transitions between the states.
+builder.addTransition(OFFLINE, SLAVE);
+builder.addTransition(SLAVE, OFFLINE);
+builder.addTransition(SLAVE, MASTER);
+builder.addTransition(MASTER, SLAVE);
+
+// set constraints on states
+
+// static constraint: upper bound of 1 MASTER
+builder.upperBound(MASTER, 1);
+
+// dynamic constraint: R means it should be derived based on the replication factor for the cluster
+// this allows a different replication factor for each resource without
+// having to define a new state model
+
+builder.dynamicUpperBound(SLAVE, &quot;R&quot;);
+
+StateModelDefinition statemodelDefinition = builder.build();
+admin.addStateModelDef(CLUSTER_NAME, STATE_MODEL_NAME, myStateModel);
+</pre> 
+    </div> 
+   </div> 
+   <div class="section"> 
+    <h5 id="Assigning_Partitions_to_Nodes">Assigning Partitions to Nodes</h5> 
+    <p>The final goal of Helix is to ensure that the constraints on the state model are satisfied. Helix does this by assigning a <b>state</b> to a partition (such as MASTER, SLAVE), and placing it on a particular node.</p> 
+    <p>There are 3 assignment modes Helix can operate in:</p> 
+    <ul> 
+     <li>FULL_AUTO: Helix decides the placement and state of a partition.</li> 
+     <li>SEMI_AUTO: Application decides the placement but Helix decides the state of a partition.</li> 
+     <li>CUSTOMIZED: Application controls the placement and state of a partition.</li> 
+    </ul> 
+    <p>For more information on the assignment modes, see the <a href="./tutorial_rebalance.html">Rebalancing Algorithms</a> section of this tutorial.</p> 
+    <div class="source"> 
+     <pre>String RESOURCE_NAME = &quot;MyDB&quot;;
+int NUM_PARTITIONS = 6;
+STATE_MODEL_NAME = &quot;MasterSlave&quot;;
+String MODE = &quot;SEMI_AUTO&quot;;
+int NUM_REPLICAS = 2;
+
+admin.addResource(CLUSTER_NAME, RESOURCE_NAME, NUM_PARTITIONS, STATE_MODEL_NAME, MODE);
+admin.rebalance(CLUSTER_NAME, RESOURCE_NAME, NUM_REPLICAS);
+</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.9.5.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 class="active">
+							<a href="#" title="Tutorial">Tutorial </a>
+						</li>
+						<li>
+							<a href="../javadocs/0.9.5" 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;2020 <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.9.5-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.9.5-docs/WorkflowExample.json
URL: http://svn.apache.org/viewvc/helix/site-content/0.9.5-docs/WorkflowExample.json?rev=1877599&view=auto
==============================================================================
--- helix/site-content/0.9.5-docs/WorkflowExample.json (added)
+++ helix/site-content/0.9.5-docs/WorkflowExample.json Mon May 11 18:32:11 2020
@@ -0,0 +1,46 @@
+{"id":"Workflow1",
+ "WorkflowConfig":{
+    "id":"Workflow1",
+    "Expiry":"43200000",
+    "FailureThreshold":"0",
+    "IsJobQueue":"true",
+    "TargetState":"START",
+    "Terminable":"false",
+    "capacity":"500"
+ },
+ "Jobs":[
+         {
+	   "id" : "Job1",
+  	   "simpleFields": {
+	       "JobID":"Job1",
+  	       "WorkflowID" : "Workflow1"
+  	   },
+  	   "mapFields":{
+	       "Task1" : {
+                   "TASK_ID" : "Task1",
+                   "TASK_COMMAND" : "Backup",
+                   "TASK_TARGET_PARTITION" : "p1"
+               },
+               "Task2" : {
+                   "TASK_ID" : "Task2",
+                   "TASK_COMMAND" : "ReIndex"
+               }
+           },
+           "listFields":{}
+         },
+         {
+           "id":"Job2",
+           "Command":"Cleanup",
+           "TargetResource":"DB2"
+         },
+         {
+           "id":"Job3",
+           "Command":"Backup",
+           "TargetResource":"DB3"
+        }
+  ],
+  "ParentJobs":{
+      "Job1":["Job2","Job3],
+      "Job2":["Job3"]
+  }
+}
\ No newline at end of file

Added: helix/site-content/0.9.5-docs/auto_exit_maintenance.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.9.5-docs/auto_exit_maintenance.html?rev=1877599&view=auto
==============================================================================
--- helix/site-content/0.9.5-docs/auto_exit_maintenance.html (added)
+++ helix/site-content/0.9.5-docs/auto_exit_maintenance.html Mon May 11 18:32:11 2020
@@ -0,0 +1,388 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-05-11
+ 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 - Auto-exit of Maintenance Mode</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-auto_exit_maintenance project-095-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.9.5">Helix 0.9.5 </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.9.5.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.9.5" 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="../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="./" title="Release 0.9.5">Release 0.9.5 </a></li>
+				<li class="divider">/</li>
+				<li>Auto-exit of Maintenance Mode</li>
+				<li class="publishDate version-date pull-right">Last Published: 2020-05-11</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="page-header">
+ <h1>Auto-exit of Maintenance Mode</h1>
+</div> 
+<div class="section"> 
+ <h2 id="Introduction">Introduction</h2> 
+ <p>Auto-exit of maintenance mode is a feature addition to Helix. It concerns a feature that allows clusters to switch out of maintenance mode automatically to save operational costs and to improve availability.</p> 
+</div> 
+<div class="section"> 
+ <h2 id="Background">Background</h2> 
+ <div class="section"> 
+  <h3 id="Maintenance_Mode">Maintenance Mode</h3> 
+  <p>The maintenance mode in Helix refers to a Helix cluster state where the Helix Controller will not trigger any type of rebalance. In short, if a cluster is in maintenance, the Controller will not bootstrap any new partitions. However, this does not mean that there won’t be any (upward) state transitions. For example, partitions missing a top-state (e.g. <b>MASTER/LEADER</b>) replica will get a state transition in order to fill in the void for a top-state replica.</p> 
+  <div class="section"> 
+   <h4 id="Possible_Scenarios">Possible Scenarios</h4> 
+   <p>There are two possible conditions under which a cluster will go into maintenance mode automatically.</p> 
+   <ol style="list-style-type: decimal"> 
+    <li>There are more offline/disabled instances than ClusterConfig’s <b>MAX_OFFLINE_INSTANCES_ALLOWED</b>.</li> 
+    <li>There exist instances that have more partitions than ClusterConfig’s <b>MAX_PARTITIONS_PER_INSTANCE</b>.</li> 
+   </ol> 
+   <p>Difficulty in Manually Exiting Maintenance Mode </p> 
+   <p>Although maintenance mode has been designed to prevent a large-scale reshuffling of replicas when there are intermittent, transient Participant connection issues. When in maintenance, no new partitions will be bootstrapped, which will block many native operations such as creation of stores/DBs. Currently, in order to unblock, an operator must manually disable maintenance mode via Helix REST API. Since it’s difficult to predict when temporary disconnects will happen, it has been a challenge to address them in a prompt manner.</p> 
+  </div> 
+ </div> 
+</div> 
+<div class="section"> 
+ <h2 id="Problem_Statement">Problem Statement</h2> 
+ <p>Currently, once clusters enter maintenance mode automatically, exiting must be done manually. This is an added human effort. We want a feature to automate this to reduce downtime and increase availability.</p> 
+</div> 
+<div class="section"> 
+ <h2 id="ArchitectureImplementation">Architecture/Implementation</h2> 
+ <div class="section"> 
+  <h3 id="Maintenance_Recovery_Threshold">Maintenance Recovery Threshold</h3> 
+  <p>Recall that there are two cases in which a cluster may enter maintenance mode automatically:</p> 
+  <blockquote> 
+   <ol style="list-style-type: decimal"> 
+    <li>There are more offline/disabled instances than ClusterConfig’s MAX_OFFLINE_INSTANCES_ALLOWED.</li> 
+    <li>There exist instances that have more partitions than ClusterConfig’s MAX_PARTITIONS_PER_INSTANCE.</li> 
+   </ol> 
+  </blockquote> 
+  <p>It is important to note that we are mainly concerned with Case 1. Case 2 is meant to be a sanity check against Helix’s CRUSH-ed rebalance algorithm, and this has little to do with the original motivation behind cluster maintenance mode. So, although we will <i>still</i> check against Case 2 when determining whether it is safe to exit maintenance mode, we will only address Case 1 in this section.</p> 
+  <p>With that said, it is not hard to imagine a cluster in production experiencing a flip-flop behavior around the exact value of <b>ClusterConfig’s MAX_OFFLINE_INSTANCES_ALLOWED</b> field. Such behavior is undesirable and may defeat the purpose of using this feature. To mitigate it in design is to have a separate, <i>more strict</i> threshold for recovering out of maintenance mode. We therefore propose to add a new field, <b>MAINTENANCE_RECOVERY_THRESHOLD</b>. <b>MAINTENANCE_RECOVERY_THRESHOLD</b> will be defined by the user and hold a more conservative value than **MAX_OFFLINE<i>INSTANCES<i>ALLOWED** to allow for some wiggle room in deciding what value is enough to call a cluster “<i>sufficiently recovered</i>”. Additionally, we will also give users the flexibility to </i>“opt-out”</i> of the auto-exit feature by treating a <b>MAINTENANCE_RECOVERY_THRESHOLD</b> value of -1 as a disable signal.</p> 
+  <p>In short,</p> 
+  <ul> 
+   <li>If NumOfflineDisabledInstances &lt; NUM_OFFLINE_INSTANCES_FOR_AUTO_EXIT, exit maintenance mode</li> 
+   <li>NUM_OFFLINE_INSTANCES_FOR_AUTO_EXIT &lt;= MAX_OFFLINE_INSTANCES_ALLOWED</li> 
+   <li>NUM_OFFLINE_INSTANCES_FOR_AUTO_EXIT &lt; 0 or not set → Opt-out of auto-exiting of maintenance mode</li> 
+  </ul> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Additional_Fields_in_MaintenanceSignal">Additional Fields in MaintenanceSignal</h3> 
+  <p>Currently, Helix stores the maintenance signal in /{CLUSTER_NAME}/CONTROLLER/MAINTENANCE. A sample maintenance signal ZNode will look like the following:</p> 
+  <div class="source"> 
+   <pre>{
+  &quot;id&quot; : &quot;maintenance&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;REASON&quot; : &quot;Offline Instances count 5 greater than allowed count 4. Stop rebalance and put the cluster CLUSTER_TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit into maintenance mode.&quot;,
+    &quot;TRIGGERED_BY&quot; : &quot;CONTROLLER&quot;,
+    &quot;TIMESTAMP&quot; : &quot;12312838831***&quot;,
+    // The following are sample user-defined fields from the REST call payload //
+    &quot;id&quot; : &quot;hulee&quot;,
+    &quot;jira&quot; : &quot;HELIX-123&quot;,
+    &quot;cluster&quot; : &quot;testCluster&quot;
+  },
+  &quot;listFields&quot; : {
+  },
+  &quot;mapFields&quot; : {
+  }
+}
+</pre> 
+  </div> 
+  <p>A simpleField will be newly added (notice the “<b>TRIGGERED_BY</b>” field) to denote whether the current maintenance signal has been generated automatically by the Controller. There will initially be <b>two</b> possible entries for this field:</p> 
+  <ul> 
+   <li><b>CONTROLLER</b></li> 
+   <li><b>USER</b></li> 
+  </ul> 
+  <p>Also, the TIMESTAMP field will be added so that the value could be retrieved via REST.</p> 
+  <p>In addition, we will allow addition of custom fields in simpleFields. See the example above. Users will be able to add these fields by using the REST endpoints that will be provided when <b>enabling</b> the maintenance mode. Note that when disabling maintenance mode, these fields will no longer be available because disabling maintenance mode will remove the maintenance signal altogether.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Recording_Maintenance_History">Recording Maintenance History</h3> 
+  <p>Currently, Helix maintains the controller history in the /{clusterName}/CONTROLLER/HISTORY ZNode. We plan to add a history for maintenance mode. This way, users will be able to access the history in ZooKeeper directly, or utilize the REST endpoint for viewing. The format will be in a human-readable format like the following (this is how Helix maintains the Controller leader history):</p> 
+  <div class="source"> 
+   <pre>long currentTime = System.currentTimeMillis();
+DateFormat df = new SimpleDateFormat(&quot;yyyy-MM-dd-HH:mm:ss&quot;);
+df.setTimeZone(TimeZone.getTimeZone(&quot;UTC&quot;));
+String dateTime = df.format(new Date(currentTime));
+</pre> 
+  </div> 
+  <p>Note that Helix only records <i>10 most recent</i> changes in the HISTORY ZNode. We will follow a similar protocol for persisting maintenance mode-related history. Note that <b>all changes around maintenance mode will be recorded</b> (both entering and exiting of the mode).</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Backward_Compatibility">Backward Compatibility</h3> 
+  <p>Old versions of Helix Controllers will not refer to the newly-added fields, in which case they will simply lack the auto-exit functionality.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Asynchronous_Processing">Asynchronous Processing</h3> 
+  <p>Note that in order for a cluster to exit maintenance mode, the Controller must check against <i>all conditions</i> that are outlined above. That is, it needs to make sure <b>1) the total count of offline/disabled instances is less than the threshold and that 2) there are no instances with more partitions than the threshold</b>. Checking against Condition 2 requires traversing all resources’ states, which could be costly in clusters of large scale. From this, we potentially risk adding a significant latency to the pipeline, which is undesirable because it could cause problems regarding availability (for example, longer pipeline runs may exacerbate the rate at which ZooKeeper Event Callbacks accumulate. Helix currently deals with a large number of ZK Event Callbacks by re-booting the Controller, which could nick Helix’s as well as applications’ availability numbers).</p> 
+  <p>For this reason, we will make the checks happen asynchronously. Additional tweak may be required to ensure that the maintenance signal is cached appropriately through each run of the pipeline to avoid the race condition.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Periodic_Check_on_Cluster_Recovery_Status">Periodic Check on Cluster Recovery Status</h3> 
+  <p>Auto-exit is inherently triggered as part of Helix’s rebalance pipeline; that is, if there is no rebalance triggered, there wouldn’t be any auto-exits triggered either. In theory, this is a non-issue because whether a cluster goes into or recovers out of maintenance mode is determined by changes around LiveInstances, and a LiveInstance change is an event that triggers Helix’s rebalance pipeline.</p> 
+  <p>Regardless, there has been anecdotal reports where such events seemed to have been “swallowed” or “disappeared” - if that is true for any reason (mostly a ZK callback queue issue), one way to mitigate it is to enable periodically-triggered rebalances. Note that this is actually a feature <i>already supported</i> by Helix.</p> 
+ </div> 
+</div> 
+<div class="section"> 
+ <h2 id="How_to_Use_the_Auto-Exit_Feature">How to Use the Auto-Exit Feature</h2> 
+ <div class="section"> 
+  <h3 id="Why_Use_Auto-Exit">Why Use Auto-Exit</h3> 
+  <p>Helix is used to manage resources in distributed clusters; therefore, it inevitably gets to have hundreds of instances. With so many clusters and traffic to the ZooKeeper, Helix’s metadata store, there are cases in which some Participants in the cluster experience transient connection failure, which may cause Helix to respond to each little change that happens to the cluster. For users of stateful systems, this may be undesirable, so they opt to set a config for entering maintenance mode automatically. Maintenance mode is a temporary mode that the cluster can enter in order to ensure that there are no bootstrapping state transitions on instances.</p> 
+  <p>However, no bootstrapping state transitions could mean that some operations such as addition of resources would be halted, which causes periods of unavailability. It was the cluster operator’s responsibility to determine whether the given cluster has sufficiently recovered enough to exit maintenance mode. The auto-exit feature removes such overhead.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Guide">Guide</h3> 
+  <p>First, we encourage all users of this feature to understand Helix’s workflow below:</p> 
+  <p><img src="./images/auto-exit-maintenance.jpg" alt="Intro" /></p> 
+  <p>In order to use this feature, you’d need to set the following config parameters in your cluster’s ClusterConfig.</p> 
+  <div class="section"> 
+   <h4 id="Auto-enter_maintenance_mode">Auto-enter maintenance mode</h4> 
+   <p><b>MAX_OFFLINE_INSTANCES_ALLOWED</b>: the number of offline and disabled instances allowed before the cluster automatically enters maintenance mode.</p> 
+   <p><b>MAX_PARTITIONS_PER_INSTANCE</b>: the number of partitions on any given instance, where, if any instance in the cluster happens to have more partitions than this number, the cluster automatically enters maintenance mode</p> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Auto-exit_maintenance_mode">Auto-exit maintenance mode</h4> 
+   <p><b>NUM_OFFLINE_INSTANCES_FOR_AUTO_EXIT</b>: set this value to allow your cluster to auto-exit when the number of offline and disabled instances are at this value. Note that this value must be less than MAX_OFFLINE_INSTANCES_ALLOWED (Read the design above on why). Note that the appropriate value for this is dependent on the characteristics of the cluster. In general, start with 1, meaning that the cluster will only auto-exit maintenance mode when it is down to 1 offline or disable instance, and increase the value as you increase tolerance.</p> 
+   <p>Note that the cluster will auto-exit only if it has <i>automatically</i> entered maintenance mode previously.</p> 
+  </div> 
+ </div> 
+</div> 
+<div class="section"> 
+ <h2 id="FAQ">FAQ</h2> 
+ <div class="section"> 
+  <div class="section"> 
+   <h4 id="How_is_this_related_to_DelayedAutoRebalancer">How is this related to <b>DelayedAutoRebalancer</b>?</h4> 
+   <ul> 
+    <li>If you are using DelayedAutoRebalancer for your clusters, this auto-exit feature would still work as expected. Fundamentally, DelayedAutoRebalancer and maintenance mode are mutually independent. That is, under maintenance mode, Helix uses a different rebalancing strategy. Once the cluster auto-exits maintenance mode, it will go back to whichever rebalancing mode it was on previously.</li> 
+    <li>Delayed Partition Movement is a feature in Helix’s FULL-AUTO rebalancer.</li> 
+    <li>The rebalance delay will work at the instance level and entering/exiting maintenance mode will not affect the time at which the delay-counting started.</li> 
+   </ul> 
+  </div> 
+  <div class="section"> 
+   <h4 id="How_do_I_know_what_the_appropriate_value_is_for_MAINTENANCE_RECOVERY_THRESHOLD">How do I know what the appropriate value is for ****MAINTENANCE_RECOVERY_THRESHOLD****?</h4> 
+   <ul> 
+    <li>As a framework, we cannot provide the right value for this threshold. It should depend on the nature of the application and the risk tolerance thereof. Familiarize yourself with the rules outlined above and start with a low value (for example, 0) and increase your tolerance.</li> 
+   </ul> 
+  </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.9.5.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.9.5" 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;2020 <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.9.5-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



Mime
View raw message