Added: helix/site-content/0.9.9-docs/tutorial_propstore.html
URL: 
http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_propstore.html?rev=1883674&view=auto
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_propstore.html (added)
+++ helix/site-content/0.9.9-docs/tutorial_propstore.html Fri Nov 20 21:14:57 
2020
@@ -0,0 +1,253 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-11-20
+ 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 - Application Property 
Store</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_propstore project-099-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.9">Helix 0.9.9 </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.9.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.9" 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.9">Release 
0.9.9 </a></li>
+                               <li class="divider">/</li>
+                               <li>  Tutorial - Application Property Store</li>
+                               <li class="publishDate version-date 
pull-right">Last Published: 2020-11-20</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="Helix_Tutorial:_Application_Property_Store"><a 
href="./Tutorial.html">Helix Tutorial</a>: Application Property Store</h2>
+ </div> 
+ <p>In this chapter, we'll learn how to use the application property 
store.</p> 
+ <div class="section"> 
+  <h3 id="Property_Store">Property Store</h3> 
+  <p>It is common that an application needs support for distributed, shared 
data structures. Helix uses ZooKeeper to store the application data and hence 
provides notifications when the data changes.</p> 
+  <p>While you could use ZooKeeper directly, Helix supports caching the data 
with a write-through cache. This is far more efficient than reading from 
ZooKeeper for every access.</p> 
+  <p>See <a class="externalLink" 
href="http://helix.apache.org/javadocs/0.9.9/reference/org/apache/helix/store/package-summary.html";>HelixManager.getHelixPropertyStore</a>
 for details.</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.9.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.9" 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.9-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.9-docs/tutorial_rebalance.html
URL: 
http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_rebalance.html?rev=1883674&view=auto
==============================================================================
--- helix/site-content/0.9.9-docs/tutorial_rebalance.html (added)
+++ helix/site-content/0.9.9-docs/tutorial_rebalance.html Fri Nov 20 21:14:57 
2020
@@ -0,0 +1,389 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-11-20
+ 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 - Rebalancing 
Algorithms</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_rebalance project-099-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.9">Helix 0.9.9 </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.9.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.9" 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.9">Release 
0.9.9 </a></li>
+                               <li class="divider">/</li>
+                               <li>  Tutorial - Rebalancing Algorithms</li>
+                               <li class="publishDate version-date 
pull-right">Last Published: 2020-11-20</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="Helix_Tutorial:_Rebalancing_Algorithms"><a 
href="./Tutorial.html">Helix Tutorial</a>: Rebalancing Algorithms</h2>
+ </div> 
+ <p>The placement of partitions in a distributed system is essential for the 
reliability and scalability of the system. For example, when a node fails, it 
is important that the partitions hosted on that node are reallocated evenly 
among the remaining nodes. Consistent hashing is one such algorithm that can 
satisfy this guarantee. Helix provides a variant of consistent hashing based on 
the RUSH algorithm, among others.</p> 
+ <p>This means given a number of partitions, replicas and number of nodes, 
Helix does the automatic assignment of partition to nodes such that:</p> 
+ <ul> 
+  <li>Each node has the same number of partitions</li> 
+  <li>Replicas of the same partition do not stay on the same node</li> 
+  <li>When a node fails, the partitions will be equally distributed among the 
remaining nodes</li> 
+  <li>When new nodes are added, the number of partitions moved will be 
minimized along with satisfying the above criteria</li> 
+ </ul> 
+ <p>Helix employs a rebalancing algorithm to compute the <i>ideal state</i> of 
the system. When the <i>current state</i> differs from the <i>ideal state</i>, 
Helix uses it as the target state of the system and computes the appropriate 
transitions needed to bring it to the <i>ideal state</i>.</p> 
+ <p>Helix makes it easy to perform this operation, while giving you control 
over the algorithm. In this section, we'll see how to implement the desired 
behavior.</p> 
+ <p>Helix has four options for rebalancing, in increasing order of 
customization by the system builder:</p> 
+ <ul> 
+  <li>FULL_AUTO</li> 
+  <li>SEMI_AUTO</li> 
+  <li>CUSTOMIZED</li> 
+  <li>USER_DEFINED</li> 
+ </ul> 
+ <div class="source"> 
+  <pre>            |FULL_AUTO     |  SEMI_AUTO | CUSTOMIZED|  USER_DEFINED  |
+            ---------------------------------------------------------|
+   LOCATION | HELIX        |  APP       |  APP      |      APP       |
+            ---------------------------------------------------------|
+      STATE | HELIX        |  HELIX     |  APP      |      APP       |
+            ----------------------------------------------------------
+</pre> 
+ </div> 
+ <div class="section"> 
+  <h3 id="FULL_AUTO">FULL_AUTO</h3> 
+  <p>When the rebalance mode is set to FULL_AUTO, Helix controls both the 
location of the replica along with the state. This option is useful for 
applications where creation of a replica is not expensive.</p> 
+  <p>For example, consider this system that uses a MasterSlave state model, 
with 3 partitions and 2 replicas in the ideal state.</p> 
+  <div class="source"> 
+   <pre>{
+  &quot;id&quot; : &quot;MyResource&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;REBALANCE_MODE&quot; : &quot;FULL_AUTO&quot;,
+    &quot;NUM_PARTITIONS&quot; : &quot;3&quot;,
+    &quot;REPLICAS&quot; : &quot;2&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+  }
+  &quot;listFields&quot; : {
+    &quot;MyResource_0&quot; : [],
+    &quot;MyResource_1&quot; : [],
+    &quot;MyResource_2&quot; : []
+  },
+  &quot;mapFields&quot; : {
+  }
+}
+</pre> 
+  </div> 
+  <p>If there are 3 nodes in the cluster, then Helix will balance the masters 
and slaves equally. The ideal state is therefore:</p> 
+  <div class="source"> 
+   <pre>{
+  &quot;id&quot; : &quot;MyResource&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;NUM_PARTITIONS&quot; : &quot;3&quot;,
+    &quot;REPLICAS&quot; : &quot;2&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+  },
+  &quot;mapFields&quot; : {
+    &quot;MyResource_0&quot; : {
+      &quot;N1&quot; : &quot;MASTER&quot;,
+      &quot;N2&quot; : &quot;SLAVE&quot;,
+    },
+    &quot;MyResource_1&quot; : {
+      &quot;N2&quot; : &quot;MASTER&quot;,
+      &quot;N3&quot; : &quot;SLAVE&quot;,
+    },
+    &quot;MyResource_2&quot; : {
+      &quot;N3&quot; : &quot;MASTER&quot;,
+      &quot;N1&quot; : &quot;SLAVE&quot;,
+    }
+  }
+}
+</pre> 
+  </div> 
+  <p>Another typical example is evenly distributing a group of tasks among the 
currently healthy processes. For example, if there are 60 tasks and 4 nodes, 
Helix assigns 15 tasks to each node. When one node fails, Helix redistributes 
its 15 tasks to the remaining 3 nodes, resulting in a balanced 20 tasks per 
node. Similarly, if a node is added, Helix re-allocates 3 tasks from each of 
the 4 nodes to the 5th node, resulting in a balanced distribution of 12 tasks 
per node..</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="SEMI_AUTO">SEMI_AUTO</h3> 
+  <p>When the application needs to control the placement of the replicas, use 
the SEMI_AUTO rebalance mode.</p> 
+  <p>Example: In the ideal state below, the partition 'MyResource_0' is 
constrained to be placed only on node1 or node2. The choice of <i>state</i> is 
still controlled by Helix. That means MyResource_0.MASTER could be on node1 and 
MyResource_0.SLAVE on node2, or vice-versa but neither would be placed on 
node3.</p> 
+  <div class="source"> 
+   <pre>{
+  &quot;id&quot; : &quot;MyResource&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;REBALANCE_MODE&quot; : &quot;SEMI_AUTO&quot;,
+    &quot;NUM_PARTITIONS&quot; : &quot;3&quot;,
+    &quot;REPLICAS&quot; : &quot;2&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+  }
+  &quot;listFields&quot; : {
+    &quot;MyResource_0&quot; : [node1, node2],
+    &quot;MyResource_1&quot; : [node2, node3],
+    &quot;MyResource_2&quot; : [node3, node1]
+  },
+  &quot;mapFields&quot; : {
+  }
+}
+</pre> 
+  </div> 
+  <p>The MasterSlave state model requires that a partition has exactly one 
MASTER at all times, and the other replicas should be SLAVEs. In this simple 
example with 2 replicas per partition, there would be one MASTER and one SLAVE. 
Upon failover, a SLAVE has to assume mastership, and a new SLAVE will be 
generated.</p> 
+  <p>In this mode when node1 fails, unlike in FULL_AUTO mode the partition is 
<i>not</i> moved from node1 to node3. Instead, Helix will decide to change the 
state of MyResource_0 on node2 from SLAVE to MASTER, based on the system 
constraints.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="CUSTOMIZED">CUSTOMIZED</h3> 
+  <p>Helix offers a third mode called CUSTOMIZED, in which the application 
controls the placement <i>and</i> state of each replica. The application needs 
to implement a callback interface that Helix invokes when the cluster state 
changes. Within this callback, the application can recompute the idealstate. 
Helix will then issue appropriate transitions such that <i>Idealstate</i> and 
<i>Currentstate</i> converges.</p> 
+  <p>Here's an example, again with 3 partitions, 2 replicas per partition, and 
the MasterSlave state model:</p> 
+  <div class="source"> 
+   <pre>{
+  &quot;id&quot; : &quot;MyResource&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;REBALANCE_MODE&quot; : &quot;CUSTOMIZED&quot;,
+    &quot;NUM_PARTITIONS&quot; : &quot;3&quot;,
+    &quot;REPLICAS&quot; : &quot;2&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+  },
+  &quot;mapFields&quot; : {
+    &quot;MyResource_0&quot; : {
+      &quot;N1&quot; : &quot;MASTER&quot;,
+      &quot;N2&quot; : &quot;SLAVE&quot;,
+    },
+    &quot;MyResource_1&quot; : {
+      &quot;N2&quot; : &quot;MASTER&quot;,
+      &quot;N3&quot; : &quot;SLAVE&quot;,
+    },
+    &quot;MyResource_2&quot; : {
+      &quot;N3&quot; : &quot;MASTER&quot;,
+      &quot;N1&quot; : &quot;SLAVE&quot;,
+    }
+  }
+}
+</pre> 
+  </div> 
+  <p>Suppose the current state of the system is ‘MyResource_0’ -&gt; 
{N1:MASTER, N2:SLAVE} and the application changes the ideal state to 
‘MyResource_0’ -&gt; {N1:SLAVE,N2:MASTER}. While the application decides 
which node is MASTER and which is SLAVE, Helix will not blindly issue 
MASTER--&gt;SLAVE to N1 and SLAVE--&gt;MASTER to N2 in parallel, since that 
might result in a transient state where both N1 and N2 are masters, which 
violates the MasterSlave constraint that there is exactly one MASTER at a time. 
Helix will first issue MASTER--&gt;SLAVE to N1 and after it is completed, it 
will issue SLAVE--&gt;MASTER to N2.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="USER_DEFINED">USER_DEFINED</h3> 
+  <p>For maximum flexibility, Helix exposes an interface that can allow 
applications to plug in custom rebalancing logic. By providing the name of a 
class that implements the Rebalancer interface, Helix will automatically call 
the contained method whenever there is a change to the live participants in the 
cluster. For more, see <a 
href="./tutorial_user_def_rebalancer.html">User-Defined Rebalancer</a>.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Backwards_Compatibility">Backwards Compatibility</h3> 
+  <p>In previous versions, FULL_AUTO was called AUTO_REBALANCE and SEMI_AUTO 
was called AUTO. Furthermore, they were presented as the IDEAL_STATE_MODE. 
Helix supports both IDEAL_STATE_MODE and REBALANCE_MODE, but IDEAL_STATE_MODE 
is now deprecated and may be phased out in future versions.</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.9.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.9" 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.9-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


Reply via email to