Modified: helix/site-content/1.0.2-docs/tutorial_user_content_store.html URL: http://svn.apache.org/viewvc/helix/site-content/1.0.2-docs/tutorial_user_content_store.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/1.0.2-docs/tutorial_user_content_store.html (original) +++ helix/site-content/1.0.2-docs/tutorial_user_content_store.html Mon Apr 25 08:18:23 2022 @@ -1,7 +1,13 @@ <!DOCTYPE html> + + + + + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 Rendered using Reflow Maven Skin 2.0.0-SNAPSHOT (https://andriusvelykis.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2022-04-25 Rendered using Reflow Maven Skin 2.0.0 (https://olamy.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> @@ -29,24 +35,31 @@ <![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> + +<!-- Matomo --> +<script> + var _paq = window._paq = window._paq || []; + _paq.push(['disableCookies']); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + + (function() { + var u="https://analytics.apache.org"; + _paq.push(['setTrackerUrl', u+'/matomo.php']); + _paq.push(['setSiteId', '15']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Matomo Code --> + </head> <body class="page-tutorial_user_content_store project-102-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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 1.0.2">Release 1.0.2</a></li> <li class="divider">/</li> <li>Tutorial - User Defined Content Store for Tasks</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -179,14 +192,14 @@ under the License. <pre><code> private static class ContentStoreTask extends UserContentStore implements Task { @Override public TaskResult run() { // put values into the store - putUserContent("ContentTest", "Value1", Scope.JOB); - putUserContent("ContentTest", "Value2", Scope.WORKFLOW); - putUserContent("ContentTest", "Value3", Scope.TASK); + putUserContent("ContentTest", "Value1", Scope.JOB); + putUserContent("ContentTest", "Value2", Scope.WORKFLOW); + putUserContent("ContentTest", "Value3", Scope.TASK); // get the values with the same key in the different scopes - if (!getUserContent("ContentTest", Scope.JOB).equals("Value1") || - !getUserContent("ContentTest", Scope.WORKFLOW).equals("Value2") || - !getUserContent("ContentTest", Scope.TASK).equals("Value3")) { + if (!getUserContent("ContentTest", Scope.JOB).equals("Value1") || + !getUserContent("ContentTest", Scope.WORKFLOW).equals("Value2") || + !getUserContent("ContentTest", Scope.TASK).equals("Value3")) { return new TaskResult(TaskResult.Status.FAILED, null); } @@ -266,7 +279,7 @@ under the License. <div class="span12"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="copyright">Copyright ©2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> - <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="https://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p> + <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> maintained by <a href="https://twitter.com/olamy" target="_blank" title="Olivier Lamy">Olivier Lamy</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="https://helix.apache.org/1.0.2-docs/privacy-policy.html">Privacy Policy</a>
Modified: helix/site-content/1.0.2-docs/tutorial_user_def_rebalancer.html URL: http://svn.apache.org/viewvc/helix/site-content/1.0.2-docs/tutorial_user_def_rebalancer.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/1.0.2-docs/tutorial_user_def_rebalancer.html (original) +++ helix/site-content/1.0.2-docs/tutorial_user_def_rebalancer.html Mon Apr 25 08:18:23 2022 @@ -1,7 +1,13 @@ <!DOCTYPE html> + + + + + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 Rendered using Reflow Maven Skin 2.0.0-SNAPSHOT (https://andriusvelykis.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2022-04-25 Rendered using Reflow Maven Skin 2.0.0 (https://olamy.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> @@ -29,24 +35,31 @@ <![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> + +<!-- Matomo --> +<script> + var _paq = window._paq = window._paq || []; + _paq.push(['disableCookies']); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + + (function() { + var u="https://analytics.apache.org"; + _paq.push(['setTrackerUrl', u+'/matomo.php']); + _paq.push(['setSiteId', '15']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Matomo Code --> + </head> <body class="page-tutorial_user_def_rebalancer project-102-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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 1.0.2">Release 1.0.2</a></li> <li class="divider">/</li> <li>Tutorial - User-Defined Rebalancing</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -216,12 +229,12 @@ IdealState computeNewIdealState(String r </ul> <div class="source"> <pre><code>{ - "lock_0": ["Participant_A"], - "lock_1": ["Participant_A"], - "lock_2": ["Participant_A"], - "lock_3": ["Participant_A"], - "lock_4": ["Participant_A"], - "lock_5": ["Participant_A"], + "lock_0": ["Participant_A"], + "lock_1": ["Participant_A"], + "lock_2": ["Participant_A"], + "lock_3": ["Participant_A"], + "lock_4": ["Participant_A"], + "lock_5": ["Participant_A"], } </code></pre> </div> @@ -231,12 +244,12 @@ IdealState computeNewIdealState(String r </ul> <div class="source"> <pre><code>{ - "lock_0": ["Participant_A"], - "lock_1": ["Participant_B"], - "lock_2": ["Participant_A"], - "lock_3": ["Participant_B"], - "lock_4": ["Participant_A"], - "lock_5": ["Participant_B"], + "lock_0": ["Participant_A"], + "lock_1": ["Participant_B"], + "lock_2": ["Participant_A"], + "lock_3": ["Participant_B"], + "lock_4": ["Participant_A"], + "lock_5": ["Participant_B"], } </code></pre> </div> @@ -246,27 +259,27 @@ IdealState computeNewIdealState(String r </ul> <div class="source"> <pre><code>{ - "lock_0": ["Participant_A"], - "lock_1": ["Participant_B"], - "lock_2": ["Participant_C"], - "lock_3": ["Participant_A"], - "lock_4": ["Participant_B"], - "lock_5": ["Participant_C"], + "lock_0": ["Participant_A"], + "lock_1": ["Participant_B"], + "lock_2": ["Participant_C"], + "lock_3": ["Participant_A"], + "lock_4": ["Participant_B"], + "lock_5": ["Participant_C"], } </code></pre> </div> - <p>This is the steady state of the system. Notice that four of the six locks now have a different owner. That is because of the naïve modulus-based assignmemt approach used by the user-defined rebalancer. However, the interface is flexible enough to allow you to employ consistent hashing or any other scheme if minimal movement is a system requirement.</p> + <p>This is the steady state of the system. Notice that four of the six locks now have a different owner. That is because of the naïve modulus-based assignmemt approach used by the user-defined rebalancer. However, the interface is flexible enough to allow you to employ consistent hashing or any other scheme if minimal movement is a system requirement.</p> <ul> <li>Participant_B fails</li> </ul> <div class="source"> <pre><code>{ - "lock_0": ["Participant_A"], - "lock_1": ["Participant_C"], - "lock_2": ["Participant_A"], - "lock_3": ["Participant_C"], - "lock_4": ["Participant_A"], - "lock_5": ["Participant_C"], + "lock_0": ["Participant_A"], + "lock_1": ["Participant_C"], + "lock_2": ["Participant_A"], + "lock_3": ["Participant_C"], + "lock_4": ["Participant_A"], + "lock_5": ["Participant_C"], } </code></pre> </div> @@ -276,12 +289,12 @@ IdealState computeNewIdealState(String r </ul> <div class="source"> <pre><code>{ - "lock_0": ["Participant_A"], - "lock_1": ["Participant_B"], - "lock_2": ["Participant_C"], - "lock_3": ["Participant_A"], - "lock_4": ["Participant_B"], - "lock_5": ["Participant_C"], + "lock_0": ["Participant_A"], + "lock_1": ["Participant_B"], + "lock_2": ["Participant_C"], + "lock_3": ["Participant_A"], + "lock_4": ["Participant_B"], + "lock_5": ["Participant_C"], } </code></pre> </div> @@ -365,7 +378,7 @@ IdealState computeNewIdealState(String r <div class="span12"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="copyright">Copyright ©2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> - <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="https://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p> + <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> maintained by <a href="https://twitter.com/olamy" target="_blank" title="Olivier Lamy">Olivier Lamy</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="https://helix.apache.org/1.0.2-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/1.0.2-docs/tutorial_yaml.html URL: http://svn.apache.org/viewvc/helix/site-content/1.0.2-docs/tutorial_yaml.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/1.0.2-docs/tutorial_yaml.html (original) +++ helix/site-content/1.0.2-docs/tutorial_yaml.html Mon Apr 25 08:18:23 2022 @@ -1,7 +1,13 @@ <!DOCTYPE html> + + + + + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 Rendered using Reflow Maven Skin 2.0.0-SNAPSHOT (https://andriusvelykis.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2022-04-25 Rendered using Reflow Maven Skin 2.0.0 (https://olamy.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> @@ -29,24 +35,31 @@ <![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> + +<!-- Matomo --> +<script> + var _paq = window._paq = window._paq || []; + _paq.push(['disableCookies']); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + + (function() { + var u="https://analytics.apache.org"; + _paq.push(['setTrackerUrl', u+'/matomo.php']); + _paq.push(['setSiteId', '15']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Matomo Code --> + </head> <body class="page-tutorial_yaml project-102-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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 1.0.2">Release 1.0.2</a></li> <li class="divider">/</li> <li>Tutorial - YAML Cluster Setup</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -185,11 +198,11 @@ resources: state: counts: # maximum number of replicas of a partition that can be in each state (required if model not built-in) - name: LOCKED - count: "1" + count: "1" - name: RELEASED - count: "-1" + count: "-1" - name: DROPPED - count: "-1" + count: "-1" priorityList: [LOCKED, RELEASED, DROPPED] # states in order of priority (all priorities equal if not specified) transition: # transitions priority to enforce order that transitions occur priorityList: [Unlock, Lock, Undrop, DropUnlock, DropLock] # all priorities equal if not specified @@ -215,7 +228,7 @@ participants: # list of nodes that can s <pre><code>YAMLClusterSetup setup = new YAMLClusterSetup(zkAddress); InputStream input = Thread.currentThread().getContextClassLoader() - .getResourceAsStream("lock-manager-config.yaml"); + .getResourceAsStream("lock-manager-config.yaml"); YAMLClusterSetup.YAMLClusterConfig config = setup.setupCluster(input); </code></pre> </div> @@ -294,7 +307,7 @@ YAMLClusterSetup.YAMLClusterConfig confi <div class="span12"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="copyright">Copyright ©2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> - <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="https://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p> + <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> maintained by <a href="https://twitter.com/olamy" target="_blank" title="Olivier Lamy">Olivier Lamy</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="https://helix.apache.org/1.0.2-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/1.0.3-docs/Building.html URL: http://svn.apache.org/viewvc/helix/site-content/1.0.3-docs/Building.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/1.0.3-docs/Building.html (original) +++ helix/site-content/1.0.3-docs/Building.html Mon Apr 25 08:18:23 2022 @@ -1,7 +1,13 @@ <!DOCTYPE html> + + + + + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 Rendered using Reflow Maven Skin 2.0.0-SNAPSHOT (https://andriusvelykis.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2022-04-25 Rendered using Reflow Maven Skin 2.0.0 (https://olamy.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> @@ -29,24 +35,31 @@ <![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> + +<!-- Matomo --> +<script> + var _paq = window._paq = window._paq || []; + _paq.push(['disableCookies']); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + + (function() { + var u="https://analytics.apache.org"; + _paq.push(['setTrackerUrl', u+'/matomo.php']); + _paq.push(['setSiteId', '15']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Matomo Code --> + </head> <body class="page-building project-103-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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 1.0.3">Release 1.0.3</a></li> <li class="divider">/</li> <li>Build Instructions</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -242,7 +255,7 @@ mvn install package -DskipTests <div class="span12"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="copyright">Copyright ©2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> - <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="https://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p> + <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> maintained by <a href="https://twitter.com/olamy" target="_blank" title="Olivier Lamy">Olivier Lamy</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="https://helix.apache.org/1.0.3-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/1.0.3-docs/Features.html URL: http://svn.apache.org/viewvc/helix/site-content/1.0.3-docs/Features.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/1.0.3-docs/Features.html (original) +++ helix/site-content/1.0.3-docs/Features.html Mon Apr 25 08:18:23 2022 @@ -1,7 +1,13 @@ <!DOCTYPE html> + + + + + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 Rendered using Reflow Maven Skin 2.0.0-SNAPSHOT (https://andriusvelykis.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2022-04-25 Rendered using Reflow Maven Skin 2.0.0 (https://olamy.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> @@ -29,24 +35,31 @@ <![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> + +<!-- Matomo --> +<script> + var _paq = window._paq = window._paq || []; + _paq.push(['disableCookies']); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + + (function() { + var u="https://analytics.apache.org"; + _paq.push(['setTrackerUrl', u+'/matomo.php']); + _paq.push(['setSiteId', '15']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Matomo Code --> + </head> <body class="page-features project-103-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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 1.0.3">Release 1.0.3</a></li> <li class="divider">/</li> <li>Features</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -180,19 +193,19 @@ under the License. <p>When the idealstate mode is set to AUTO_REBALANCE, 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. Example</p> <div class="source"> <pre><code>{ - "id" : "MyResource", - "simpleFields" : { - "IDEAL_STATE_MODE" : "AUTO_REBALANCE", - "NUM_PARTITIONS" : "3", - "REPLICAS" : "2", - "STATE_MODEL_DEF_REF" : "MasterSlave", + "id" : "MyResource", + "simpleFields" : { + "IDEAL_STATE_MODE" : "AUTO_REBALANCE", + "NUM_PARTITIONS" : "3", + "REPLICAS" : "2", + "STATE_MODEL_DEF_REF" : "MasterSlave", } - "listFields" : { - "MyResource_0" : [], - "MyResource_1" : [], - "MyResource_2" : [] + "listFields" : { + "MyResource_0" : [], + "MyResource_1" : [], + "MyResource_2" : [] }, - "mapFields" : { + "mapFields" : { } } </code></pre> @@ -200,24 +213,24 @@ under the License. <p>If there are 3 nodes in the cluster, then Helix will internally compute the ideal state as</p> <div class="source"> <pre><code>{ - "id" : "MyResource", - "simpleFields" : { - "NUM_PARTITIONS" : "3", - "REPLICAS" : "2", - "STATE_MODEL_DEF_REF" : "MasterSlave", + "id" : "MyResource", + "simpleFields" : { + "NUM_PARTITIONS" : "3", + "REPLICAS" : "2", + "STATE_MODEL_DEF_REF" : "MasterSlave", }, - "mapFields" : { - "MyResource_0" : { - "N1" : "MASTER", - "N2" : "SLAVE", + "mapFields" : { + "MyResource_0" : { + "N1" : "MASTER", + "N2" : "SLAVE", }, - "MyResource_1" : { - "N2" : "MASTER", - "N3" : "SLAVE", + "MyResource_1" : { + "N2" : "MASTER", + "N3" : "SLAVE", }, - "MyResource_2" : { - "N3" : "MASTER", - "N1" : "SLAVE", + "MyResource_2" : { + "N3" : "MASTER", + "N1" : "SLAVE", } } } @@ -231,19 +244,19 @@ under the License. <p>When the idealstate mode is set to AUTO, Helix only controls STATE of the replicas where as the location of the partition is controlled by application. Example: The below idealstate indicates thats âMyResource_0â must be only on node1 and node2. But gives the control of assigning the STATE to Helix.</p> <div class="source"> <pre><code>{ - "id" : "MyResource", - "simpleFields" : { - "IDEAL_STATE_MODE" : "AUTO", - "NUM_PARTITIONS" : "3", - "REPLICAS" : "2", - "STATE_MODEL_DEF_REF" : "MasterSlave", + "id" : "MyResource", + "simpleFields" : { + "IDEAL_STATE_MODE" : "AUTO", + "NUM_PARTITIONS" : "3", + "REPLICAS" : "2", + "STATE_MODEL_DEF_REF" : "MasterSlave", } - "listFields" : { - "MyResource_0" : [node1, node2], - "MyResource_1" : [node2, node3], - "MyResource_2" : [node3, node1] + "listFields" : { + "MyResource_0" : [node1, node2], + "MyResource_1" : [node2, node3], + "MyResource_2" : [node3, node1] }, - "mapFields" : { + "mapFields" : { } } </code></pre> @@ -255,25 +268,25 @@ under the License. <p>Helix offers a third mode called CUSTOM, in which application can completely control the placement and state of each replica. Applications will have to implement an interface that Helix will invoke when the cluster state changes. Within this callback, the application can recompute the idealstate. Helix will then issue appropriate transitions such that Idealstate and Currentstate converges.</p> <div class="source"> <pre><code>{ - "id" : "MyResource", - "simpleFields" : { - "IDEAL_STATE_MODE" : "CUSTOM", - "NUM_PARTITIONS" : "3", - "REPLICAS" : "2", - "STATE_MODEL_DEF_REF" : "MasterSlave", + "id" : "MyResource", + "simpleFields" : { + "IDEAL_STATE_MODE" : "CUSTOM", + "NUM_PARTITIONS" : "3", + "REPLICAS" : "2", + "STATE_MODEL_DEF_REF" : "MasterSlave", }, - "mapFields" : { - "MyResource_0" : { - "N1" : "MASTER", - "N2" : "SLAVE", + "mapFields" : { + "MyResource_0" : { + "N1" : "MASTER", + "N2" : "SLAVE", }, - "MyResource_1" : { - "N2" : "MASTER", - "N3" : "SLAVE", + "MyResource_1" : { + "N2" : "MASTER", + "N3" : "SLAVE", }, - "MyResource_2" : { - "N3" : "MASTER", - "N1" : "SLAVE", + "MyResource_2" : { + "N3" : "MASTER", + "N1" : "SLAVE", } } } @@ -322,10 +335,10 @@ under the License. requestBackupUriRequest.setMsgState(MessageState.NEW); //SET THE RECIPIENT CRITERIA, All nodes that satisfy the criteria will receive the message Criteria recipientCriteria = new Criteria(); - recipientCriteria.setInstanceName("%"); + recipientCriteria.setInstanceName("%"); recipientCriteria.setRecipientInstanceType(InstanceType.PARTICIPANT); - recipientCriteria.setResource("MyDB"); - recipientCriteria.setPartition(""); + recipientCriteria.setResource("MyDB"); + recipientCriteria.setPartition(""); //Should be processed only the process that is active at the time of sending the message. //This means if the recipient is restarted after message is sent, it will not be processed. recipientCriteria.setSessionSpecific(true); @@ -450,7 +463,7 @@ under the License. <div class="span12"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="copyright">Copyright ©2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> - <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="https://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p> + <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> maintained by <a href="https://twitter.com/olamy" target="_blank" title="Olivier Lamy">Olivier Lamy</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="https://helix.apache.org/1.0.3-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/1.0.3-docs/Metrics.html URL: http://svn.apache.org/viewvc/helix/site-content/1.0.3-docs/Metrics.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/1.0.3-docs/Metrics.html (original) +++ helix/site-content/1.0.3-docs/Metrics.html Mon Apr 25 08:18:23 2022 @@ -1,7 +1,13 @@ <!DOCTYPE html> + + + + + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 Rendered using Reflow Maven Skin 2.0.0-SNAPSHOT (https://andriusvelykis.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2022-04-25 Rendered using Reflow Maven Skin 2.0.0 (https://olamy.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> @@ -29,24 +35,31 @@ <![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> + +<!-- Matomo --> +<script> + var _paq = window._paq = window._paq || []; + _paq.push(['disableCookies']); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + + (function() { + var u="https://analytics.apache.org"; + _paq.push(['setTrackerUrl', u+'/matomo.php']); + _paq.push(['setSiteId', '15']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Matomo Code --> + </head> <body class="page-metrics project-103-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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 1.0.3">Release 1.0.3</a></li> <li class="divider">/</li> <li>Helix Monitoring Metrics</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -820,7 +833,7 @@ under the License. <div class="span12"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="copyright">Copyright ©2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> - <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="https://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p> + <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> maintained by <a href="https://twitter.com/olamy" target="_blank" title="Olivier Lamy">Olivier Lamy</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="https://helix.apache.org/1.0.3-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/1.0.3-docs/Quickstart.html URL: http://svn.apache.org/viewvc/helix/site-content/1.0.3-docs/Quickstart.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/1.0.3-docs/Quickstart.html (original) +++ helix/site-content/1.0.3-docs/Quickstart.html Mon Apr 25 08:18:23 2022 @@ -1,7 +1,13 @@ <!DOCTYPE html> + + + + + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 Rendered using Reflow Maven Skin 2.0.0-SNAPSHOT (https://andriusvelykis.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2022-04-25 Rendered using Reflow Maven Skin 2.0.0 (https://olamy.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> @@ -29,24 +35,31 @@ <![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> + +<!-- Matomo --> +<script> + var _paq = window._paq = window._paq || []; + _paq.push(['disableCookies']); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + + (function() { + var u="https://analytics.apache.org"; + _paq.push(['setTrackerUrl', u+'/matomo.php']); + _paq.push(['setSiteId', '15']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Matomo Code --> + </head> <body class="page-quickstart project-103-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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 1.0.3">Release 1.0.3</a></li> <li class="divider">/</li> <li>Quickstart</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -399,15 +412,15 @@ localhost_12913 ./helix-admin.sh --zkSvr localhost:2199 --listInstanceInfo MYCLUSTER localhost_12913 InstanceConfig: { - "id" : "localhost_12913", - "mapFields" : { + "id" : "localhost_12913", + "mapFields" : { }, - "listFields" : { + "listFields" : { }, - "simpleFields" : { - "HELIX_ENABLED" : "true", - "HELIX_HOST" : "localhost", - "HELIX_PORT" : "12913" + "simpleFields" : { + "HELIX_ENABLED" : "true", + "HELIX_HOST" : "localhost", + "HELIX_PORT" : "12913" } } </code></pre> @@ -420,96 +433,96 @@ InstanceConfig: { IdealState for myDB: { - "id" : "myDB", - "mapFields" : { - "myDB_0" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "LEADER", - "localhost_12915" : "STANDBY" - }, - "myDB_1" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "STANDBY", - "localhost_12915" : "LEADER" - }, - "myDB_2" : { - "localhost_12913" : "LEADER", - "localhost_12914" : "STANDBY", - "localhost_12915" : "STANDBY" - }, - "myDB_3" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "STANDBY", - "localhost_12915" : "LEADER" - }, - "myDB_4" : { - "localhost_12913" : "LEADER", - "localhost_12914" : "STANDBY", - "localhost_12915" : "STANDBY" - }, - "myDB_5" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "LEADER", - "localhost_12915" : "STANDBY" + "id" : "myDB", + "mapFields" : { + "myDB_0" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "LEADER", + "localhost_12915" : "STANDBY" + }, + "myDB_1" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "STANDBY", + "localhost_12915" : "LEADER" + }, + "myDB_2" : { + "localhost_12913" : "LEADER", + "localhost_12914" : "STANDBY", + "localhost_12915" : "STANDBY" + }, + "myDB_3" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "STANDBY", + "localhost_12915" : "LEADER" + }, + "myDB_4" : { + "localhost_12913" : "LEADER", + "localhost_12914" : "STANDBY", + "localhost_12915" : "STANDBY" + }, + "myDB_5" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "LEADER", + "localhost_12915" : "STANDBY" } }, - "listFields" : { - "myDB_0" : [ "localhost_12914", "localhost_12913", "localhost_12915" ], - "myDB_1" : [ "localhost_12915", "localhost_12913", "localhost_12914" ], - "myDB_2" : [ "localhost_12913", "localhost_12915", "localhost_12914" ], - "myDB_3" : [ "localhost_12915", "localhost_12913", "localhost_12914" ], - "myDB_4" : [ "localhost_12913", "localhost_12914", "localhost_12915" ], - "myDB_5" : [ "localhost_12914", "localhost_12915", "localhost_12913" ] - }, - "simpleFields" : { - "IDEAL_STATE_MODE" : "AUTO", - "REBALANCE_MODE" : "SEMI_AUTO", - "NUM_PARTITIONS" : "6", - "REPLICAS" : "3", - "STATE_MODEL_DEF_REF" : "LeaderStandby", - "STATE_MODEL_FACTORY_NAME" : "DEFAULT" + "listFields" : { + "myDB_0" : [ "localhost_12914", "localhost_12913", "localhost_12915" ], + "myDB_1" : [ "localhost_12915", "localhost_12913", "localhost_12914" ], + "myDB_2" : [ "localhost_12913", "localhost_12915", "localhost_12914" ], + "myDB_3" : [ "localhost_12915", "localhost_12913", "localhost_12914" ], + "myDB_4" : [ "localhost_12913", "localhost_12914", "localhost_12915" ], + "myDB_5" : [ "localhost_12914", "localhost_12915", "localhost_12913" ] + }, + "simpleFields" : { + "IDEAL_STATE_MODE" : "AUTO", + "REBALANCE_MODE" : "SEMI_AUTO", + "NUM_PARTITIONS" : "6", + "REPLICAS" : "3", + "STATE_MODEL_DEF_REF" : "LeaderStandby", + "STATE_MODEL_FACTORY_NAME" : "DEFAULT" } } ExternalView for myDB: { - "id" : "myDB", - "mapFields" : { - "myDB_0" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "LEADER", - "localhost_12915" : "STANDBY" - }, - "myDB_1" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "STANDBY", - "localhost_12915" : "LEADER" - }, - "myDB_2" : { - "localhost_12913" : "LEADER", - "localhost_12914" : "STANDBY", - "localhost_12915" : "STANDBY" - }, - "myDB_3" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "STANDBY", - "localhost_12915" : "LEADER" - }, - "myDB_4" : { - "localhost_12913" : "LEADER", - "localhost_12914" : "STANDBY", - "localhost_12915" : "STANDBY" - }, - "myDB_5" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "LEADER", - "localhost_12915" : "STANDBY" + "id" : "myDB", + "mapFields" : { + "myDB_0" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "LEADER", + "localhost_12915" : "STANDBY" + }, + "myDB_1" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "STANDBY", + "localhost_12915" : "LEADER" + }, + "myDB_2" : { + "localhost_12913" : "LEADER", + "localhost_12914" : "STANDBY", + "localhost_12915" : "STANDBY" + }, + "myDB_3" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "STANDBY", + "localhost_12915" : "LEADER" + }, + "myDB_4" : { + "localhost_12913" : "LEADER", + "localhost_12914" : "STANDBY", + "localhost_12915" : "STANDBY" + }, + "myDB_5" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "LEADER", + "localhost_12915" : "STANDBY" } }, - "listFields" : { + "listFields" : { }, - "simpleFields" : { - "BUCKET_SIZE" : "0" + "simpleFields" : { + "BUCKET_SIZE" : "0" } } </code></pre> @@ -553,96 +566,96 @@ ExternalView for myDB: IdealState for myDB: { - "id" : "myDB", - "mapFields" : { - "myDB_0" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "STANDBY", - "localhost_12917" : "LEADER" - }, - "myDB_1" : { - "localhost_12916" : "STANDBY", - "localhost_12917" : "STANDBY", - "localhost_12918" : "LEADER" - }, - "myDB_2" : { - "localhost_12913" : "LEADER", - "localhost_12917" : "STANDBY", - "localhost_12918" : "STANDBY" - }, - "myDB_3" : { - "localhost_12915" : "LEADER", - "localhost_12917" : "STANDBY", - "localhost_12918" : "STANDBY" - }, - "myDB_4" : { - "localhost_12916" : "LEADER", - "localhost_12917" : "STANDBY", - "localhost_12918" : "STANDBY" - }, - "myDB_5" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "LEADER", - "localhost_12915" : "STANDBY" + "id" : "myDB", + "mapFields" : { + "myDB_0" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "STANDBY", + "localhost_12917" : "LEADER" + }, + "myDB_1" : { + "localhost_12916" : "STANDBY", + "localhost_12917" : "STANDBY", + "localhost_12918" : "LEADER" + }, + "myDB_2" : { + "localhost_12913" : "LEADER", + "localhost_12917" : "STANDBY", + "localhost_12918" : "STANDBY" + }, + "myDB_3" : { + "localhost_12915" : "LEADER", + "localhost_12917" : "STANDBY", + "localhost_12918" : "STANDBY" + }, + "myDB_4" : { + "localhost_12916" : "LEADER", + "localhost_12917" : "STANDBY", + "localhost_12918" : "STANDBY" + }, + "myDB_5" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "LEADER", + "localhost_12915" : "STANDBY" } }, - "listFields" : { - "myDB_0" : [ "localhost_12917", "localhost_12913", "localhost_12914" ], - "myDB_1" : [ "localhost_12918", "localhost_12917", "localhost_12916" ], - "myDB_2" : [ "localhost_12913", "localhost_12917", "localhost_12918" ], - "myDB_3" : [ "localhost_12915", "localhost_12917", "localhost_12918" ], - "myDB_4" : [ "localhost_12916", "localhost_12917", "localhost_12918" ], - "myDB_5" : [ "localhost_12914", "localhost_12915", "localhost_12913" ] - }, - "simpleFields" : { - "IDEAL_STATE_MODE" : "AUTO", - "REBALANCE_MODE" : "SEMI_AUTO", - "NUM_PARTITIONS" : "6", - "REPLICAS" : "3", - "STATE_MODEL_DEF_REF" : "LeaderStandby", - "STATE_MODEL_FACTORY_NAME" : "DEFAULT" + "listFields" : { + "myDB_0" : [ "localhost_12917", "localhost_12913", "localhost_12914" ], + "myDB_1" : [ "localhost_12918", "localhost_12917", "localhost_12916" ], + "myDB_2" : [ "localhost_12913", "localhost_12917", "localhost_12918" ], + "myDB_3" : [ "localhost_12915", "localhost_12917", "localhost_12918" ], + "myDB_4" : [ "localhost_12916", "localhost_12917", "localhost_12918" ], + "myDB_5" : [ "localhost_12914", "localhost_12915", "localhost_12913" ] + }, + "simpleFields" : { + "IDEAL_STATE_MODE" : "AUTO", + "REBALANCE_MODE" : "SEMI_AUTO", + "NUM_PARTITIONS" : "6", + "REPLICAS" : "3", + "STATE_MODEL_DEF_REF" : "LeaderStandby", + "STATE_MODEL_FACTORY_NAME" : "DEFAULT" } } ExternalView for myDB: { - "id" : "myDB", - "mapFields" : { - "myDB_0" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "STANDBY", - "localhost_12917" : "LEADER" - }, - "myDB_1" : { - "localhost_12916" : "STANDBY", - "localhost_12917" : "STANDBY", - "localhost_12918" : "LEADER" - }, - "myDB_2" : { - "localhost_12913" : "LEADER", - "localhost_12917" : "STANDBY", - "localhost_12918" : "STANDBY" - }, - "myDB_3" : { - "localhost_12915" : "LEADER", - "localhost_12917" : "STANDBY", - "localhost_12918" : "STANDBY" - }, - "myDB_4" : { - "localhost_12916" : "LEADER", - "localhost_12917" : "STANDBY", - "localhost_12918" : "STANDBY" - }, - "myDB_5" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "LEADER", - "localhost_12915" : "STANDBY" + "id" : "myDB", + "mapFields" : { + "myDB_0" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "STANDBY", + "localhost_12917" : "LEADER" + }, + "myDB_1" : { + "localhost_12916" : "STANDBY", + "localhost_12917" : "STANDBY", + "localhost_12918" : "LEADER" + }, + "myDB_2" : { + "localhost_12913" : "LEADER", + "localhost_12917" : "STANDBY", + "localhost_12918" : "STANDBY" + }, + "myDB_3" : { + "localhost_12915" : "LEADER", + "localhost_12917" : "STANDBY", + "localhost_12918" : "STANDBY" + }, + "myDB_4" : { + "localhost_12916" : "LEADER", + "localhost_12917" : "STANDBY", + "localhost_12918" : "STANDBY" + }, + "myDB_5" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "LEADER", + "localhost_12915" : "STANDBY" } }, - "listFields" : { + "listFields" : { }, - "simpleFields" : { - "BUCKET_SIZE" : "0" + "simpleFields" : { + "BUCKET_SIZE" : "0" } } </code></pre> @@ -659,92 +672,92 @@ ExternalView for myDB: IdealState for myDB: { - "id" : "myDB", - "mapFields" : { - "myDB_0" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "STANDBY", - "localhost_12917" : "LEADER" - }, - "myDB_1" : { - "localhost_12916" : "STANDBY", - "localhost_12917" : "STANDBY", - "localhost_12918" : "LEADER" - }, - "myDB_2" : { - "localhost_12913" : "LEADER", - "localhost_12917" : "STANDBY", - "localhost_12918" : "STANDBY" - }, - "myDB_3" : { - "localhost_12915" : "LEADER", - "localhost_12917" : "STANDBY", - "localhost_12918" : "STANDBY" - }, - "myDB_4" : { - "localhost_12916" : "LEADER", - "localhost_12917" : "STANDBY", - "localhost_12918" : "STANDBY" - }, - "myDB_5" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "LEADER", - "localhost_12915" : "STANDBY" + "id" : "myDB", + "mapFields" : { + "myDB_0" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "STANDBY", + "localhost_12917" : "LEADER" + }, + "myDB_1" : { + "localhost_12916" : "STANDBY", + "localhost_12917" : "STANDBY", + "localhost_12918" : "LEADER" + }, + "myDB_2" : { + "localhost_12913" : "LEADER", + "localhost_12917" : "STANDBY", + "localhost_12918" : "STANDBY" + }, + "myDB_3" : { + "localhost_12915" : "LEADER", + "localhost_12917" : "STANDBY", + "localhost_12918" : "STANDBY" + }, + "myDB_4" : { + "localhost_12916" : "LEADER", + "localhost_12917" : "STANDBY", + "localhost_12918" : "STANDBY" + }, + "myDB_5" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "LEADER", + "localhost_12915" : "STANDBY" } }, - "listFields" : { - "myDB_0" : [ "localhost_12917", "localhost_12913", "localhost_12914" ], - "myDB_1" : [ "localhost_12918", "localhost_12917", "localhost_12916" ], - "myDB_2" : [ "localhost_12913", "localhost_12918", "localhost_12917" ], - "myDB_3" : [ "localhost_12915", "localhost_12918", "localhost_12917" ], - "myDB_4" : [ "localhost_12916", "localhost_12917", "localhost_12918" ], - "myDB_5" : [ "localhost_12914", "localhost_12915", "localhost_12913" ] - }, - "simpleFields" : { - "IDEAL_STATE_MODE" : "AUTO", - "REBALANCE_MODE" : "SEMI_AUTO", - "NUM_PARTITIONS" : "6", - "REPLICAS" : "3", - "STATE_MODEL_DEF_REF" : "LeaderStandby", - "STATE_MODEL_FACTORY_NAME" : "DEFAULT" + "listFields" : { + "myDB_0" : [ "localhost_12917", "localhost_12913", "localhost_12914" ], + "myDB_1" : [ "localhost_12918", "localhost_12917", "localhost_12916" ], + "myDB_2" : [ "localhost_12913", "localhost_12918", "localhost_12917" ], + "myDB_3" : [ "localhost_12915", "localhost_12918", "localhost_12917" ], + "myDB_4" : [ "localhost_12916", "localhost_12917", "localhost_12918" ], + "myDB_5" : [ "localhost_12914", "localhost_12915", "localhost_12913" ] + }, + "simpleFields" : { + "IDEAL_STATE_MODE" : "AUTO", + "REBALANCE_MODE" : "SEMI_AUTO", + "NUM_PARTITIONS" : "6", + "REPLICAS" : "3", + "STATE_MODEL_DEF_REF" : "LeaderStandby", + "STATE_MODEL_FACTORY_NAME" : "DEFAULT" } } ExternalView for myDB: { - "id" : "myDB", - "mapFields" : { - "myDB_0" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "STANDBY", - "localhost_12917" : "LEADER" - }, - "myDB_1" : { - "localhost_12916" : "STANDBY", - "localhost_12917" : "LEADER" - }, - "myDB_2" : { - "localhost_12913" : "LEADER", - "localhost_12917" : "STANDBY" - }, - "myDB_3" : { - "localhost_12915" : "LEADER", - "localhost_12917" : "STANDBY" - }, - "myDB_4" : { - "localhost_12916" : "LEADER", - "localhost_12917" : "STANDBY" - }, - "myDB_5" : { - "localhost_12913" : "STANDBY", - "localhost_12914" : "LEADER", - "localhost_12915" : "STANDBY" + "id" : "myDB", + "mapFields" : { + "myDB_0" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "STANDBY", + "localhost_12917" : "LEADER" + }, + "myDB_1" : { + "localhost_12916" : "STANDBY", + "localhost_12917" : "LEADER" + }, + "myDB_2" : { + "localhost_12913" : "LEADER", + "localhost_12917" : "STANDBY" + }, + "myDB_3" : { + "localhost_12915" : "LEADER", + "localhost_12917" : "STANDBY" + }, + "myDB_4" : { + "localhost_12916" : "LEADER", + "localhost_12917" : "STANDBY" + }, + "myDB_5" : { + "localhost_12913" : "STANDBY", + "localhost_12914" : "LEADER", + "localhost_12915" : "STANDBY" } }, - "listFields" : { + "listFields" : { }, - "simpleFields" : { - "BUCKET_SIZE" : "0" + "simpleFields" : { + "BUCKET_SIZE" : "0" } } </code></pre> @@ -834,7 +847,7 @@ ExternalView for myDB: <div class="span12"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="copyright">Copyright ©2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> - <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="https://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p> + <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> maintained by <a href="https://twitter.com/olamy" target="_blank" title="Olivier Lamy">Olivier Lamy</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="https://helix.apache.org/1.0.3-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/1.0.3-docs/Tutorial.html URL: http://svn.apache.org/viewvc/helix/site-content/1.0.3-docs/Tutorial.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/1.0.3-docs/Tutorial.html (original) +++ helix/site-content/1.0.3-docs/Tutorial.html Mon Apr 25 08:18:23 2022 @@ -1,7 +1,13 @@ <!DOCTYPE html> + + + + + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 Rendered using Reflow Maven Skin 2.0.0-SNAPSHOT (https://andriusvelykis.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2022-04-25 Rendered using Reflow Maven Skin 2.0.0 (https://olamy.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> @@ -29,24 +35,31 @@ <![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> + +<!-- Matomo --> +<script> + var _paq = window._paq = window._paq || []; + _paq.push(['disableCookies']); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + + (function() { + var u="https://analytics.apache.org"; + _paq.push(['setTrackerUrl', u+'/matomo.php']); + _paq.push(['setSiteId', '15']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Matomo Code --> + </head> <body class="page-tutorial project-103-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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 1.0.3">Release 1.0.3</a></li> <li class="divider">/</li> <li>Tutorial</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -207,10 +220,10 @@ under the License. <div class="source"> <pre><code>// Create setup tool instance // Note: ZK_ADDRESS is the host:port of Zookeeper -String ZK_ADDRESS = "localhost:2199"; +String ZK_ADDRESS = "localhost:2199"; admin = new ZKHelixAdmin(ZK_ADDRESS); -String CLUSTER_NAME = "helix-demo"; +String CLUSTER_NAME = "helix-demo"; //Create cluster namespace in zookeeper admin.addCluster(CLUSTER_NAME); </code></pre> @@ -226,19 +239,19 @@ admin.addCluster(CLUSTER_NAME); <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><code>String CLUSTER_NAME = "helix-demo"; + <pre><code>String CLUSTER_NAME = "helix-demo"; int NUM_NODES = 2; -String hosts[] = new String[]{"localhost","localhost"}; -String ports[] = new String[]{"7000","7001"}; +String hosts[] = new String[]{"localhost","localhost"}; +String ports[] = new String[]{"7000","7001"}; for (int i = 0; i < NUM_NODES; i++) { - InstanceConfig instanceConfig = new InstanceConfig(hosts[i]+ "_" + ports[i]); + InstanceConfig instanceConfig = new InstanceConfig(hosts[i]+ "_" + 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("key", "value"); + instanceConfig.getRecord().setSimpleField("key", "value"); admin.addInstance(CLUSTER_NAME, instanceConfig); } </code></pre> @@ -270,13 +283,13 @@ for (int i = 0; i < NUM_NODES; i++) </ul> <p>The following snippet shows how to declare the state model and constraints for the LEADER-STANDBY model.</p> <div class="source"> - <pre><code>String STATE_MODEL_NAME = "LeaderStandby"; + <pre><code>String STATE_MODEL_NAME = "LeaderStandby"; StateModelDefinition.Builder builder = new StateModelDefinition.Builder(STATE_MODEL_NAME); // Define your own states: those are opaque strings to Helix // Only the topology of the state machine (initial state, transitions, priorities, final DROPPED state) is meaningful to Helix -String LEADER = "LEADER"; -String STANDBY = "STANDBY"; -String OFFLINE = "OFFLINE"; +String LEADER = "LEADER"; +String STANDBY = "STANDBY"; +String OFFLINE = "OFFLINE"; // Add states and their rank to indicate priority. A lower rank corresponds to a higher priority builder.addState(LEADER, 1); @@ -306,7 +319,7 @@ builder.upperBound(LEADER, 1); // this allows a different replication factor for each resource without // having to define a new state model -builder.dynamicUpperBound(STANDBY, "R"); +builder.dynamicUpperBound(STANDBY, "R"); StateModelDefinition myStateModel = builder.build(); admin.addStateModelDef(CLUSTER_NAME, STATE_MODEL_NAME, myStateModel); @@ -324,10 +337,10 @@ admin.addStateModelDef(CLUSTER_NAME, STA </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><code>String RESOURCE_NAME = "MyDB"; + <pre><code>String RESOURCE_NAME = "MyDB"; int NUM_PARTITIONS = 6; -String STATE_MODEL_NAME = "LeaderStandby"; -String MODE = "SEMI_AUTO"; +String STATE_MODEL_NAME = "LeaderStandby"; +String MODE = "SEMI_AUTO"; int NUM_REPLICAS = 2; admin.addResource(CLUSTER_NAME, RESOURCE_NAME, NUM_PARTITIONS, STATE_MODEL_NAME, MODE); @@ -407,7 +420,7 @@ admin.rebalance(CLUSTER_NAME, RESOURCE_N <div class="span12"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="copyright">Copyright ©2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> - <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="https://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p> + <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> maintained by <a href="https://twitter.com/olamy" target="_blank" title="Olivier Lamy">Olivier Lamy</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="https://helix.apache.org/1.0.3-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/1.0.3-docs/auto_exit_maintenance.html URL: http://svn.apache.org/viewvc/helix/site-content/1.0.3-docs/auto_exit_maintenance.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/1.0.3-docs/auto_exit_maintenance.html (original) +++ helix/site-content/1.0.3-docs/auto_exit_maintenance.html Mon Apr 25 08:18:23 2022 @@ -1,7 +1,13 @@ <!DOCTYPE html> + + + + + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 Rendered using Reflow Maven Skin 2.0.0-SNAPSHOT (https://andriusvelykis.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2022-04-25 Rendered using Reflow Maven Skin 2.0.0 (https://olamy.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> @@ -29,24 +35,31 @@ <![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> + +<!-- Matomo --> +<script> + var _paq = window._paq = window._paq || []; + _paq.push(['disableCookies']); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + + (function() { + var u="https://analytics.apache.org"; + _paq.push(['setTrackerUrl', u+'/matomo.php']); + _paq.push(['setSiteId', '15']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Matomo Code --> + </head> <body class="page-auto_exit_maintenance project-103-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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 1.0.3">Release 1.0.3</a></li> <li class="divider">/</li> <li>Auto-exit of Maintenance Mode</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -199,19 +212,19 @@ under the License. <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><code class="language-json">{ - "id" : "maintenance", - "simpleFields" : { - "REASON" : "Offline Instances count 5 greater than allowed count 4. Stop rebalance and put the cluster CLUSTER_TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit into maintenance mode.", - "TRIGGERED_BY" : "CONTROLLER", - "TIMESTAMP" : "12312838831***", + "id" : "maintenance", + "simpleFields" : { + "REASON" : "Offline Instances count 5 greater than allowed count 4. Stop rebalance and put the cluster CLUSTER_TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit into maintenance mode.", + "TRIGGERED_BY" : "CONTROLLER", + "TIMESTAMP" : "12312838831***", // The following are sample user-defined fields from the REST call payload // - "id" : "hulee", - "jira" : "HELIX-123", - "cluster" : "testCluster" + "id" : "hulee", + "jira" : "HELIX-123", + "cluster" : "testCluster" }, - "listFields" : { + "listFields" : { }, - "mapFields" : { + "mapFields" : { } } </code></pre> @@ -229,8 +242,8 @@ under the License. <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><code class="language-java">long currentTime = System.currentTimeMillis(); -DateFormat df = new SimpleDateFormat("yyyy-MM-dd-HH:mm:ss"); -df.setTimeZone(TimeZone.getTimeZone("UTC")); +DateFormat df = new SimpleDateFormat("yyyy-MM-dd-HH:mm:ss"); +df.setTimeZone(TimeZone.getTimeZone("UTC")); String dateTime = df.format(new Date(currentTime)); </code></pre> </div> @@ -261,7 +274,7 @@ String dateTime = df.format(new Date(cur <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><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> <section> <h4 id="Auto-enter_maintenance_mode">Auto-enter maintenance mode</h4> @@ -363,7 +376,7 @@ String dateTime = df.format(new Date(cur <div class="span12"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="copyright">Copyright ©2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> - <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="https://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p> + <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> maintained by <a href="https://twitter.com/olamy" target="_blank" title="Olivier Lamy">Olivier Lamy</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="https://helix.apache.org/1.0.3-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/1.0.3-docs/design_crushed.html URL: http://svn.apache.org/viewvc/helix/site-content/1.0.3-docs/design_crushed.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/1.0.3-docs/design_crushed.html (original) +++ helix/site-content/1.0.3-docs/design_crushed.html Mon Apr 25 08:18:23 2022 @@ -1,7 +1,13 @@ <!DOCTYPE html> + + + + + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 Rendered using Reflow Maven Skin 2.0.0-SNAPSHOT (https://andriusvelykis.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2022-04-25 Rendered using Reflow Maven Skin 2.0.0 (https://olamy.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> @@ -29,24 +35,31 @@ <![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> + +<!-- Matomo --> +<script> + var _paq = window._paq = window._paq || []; + _paq.push(['disableCookies']); + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + + (function() { + var u="https://analytics.apache.org"; + _paq.push(['setTrackerUrl', u+'/matomo.php']); + _paq.push(['setSiteId', '15']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<!-- End Matomo Code --> + </head> <body class="page-design_crushed project-103-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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 1.0.3">Release 1.0.3</a></li> <li class="divider">/</li> <li>CrushED (Crush-based rebalancer with Even Distribution)</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -147,20 +160,20 @@ <p>CrushRebalanceStrategy has very small movement count, but the distribution is not optimal. MultiRoundCrushRebalanceStrategy was designed to solve this problem by running CRUSH multiple times on partition assignments that contribute to uneven mapping. However, due to potentially high number of rounds, computation cost is high, we observed significantly more partition movements when the cluster topology is changed.</p> <p>Since we have a good base strategy, CrushRebalanceStrategy, we built CrushEDRebalanceStrategy on top of it. Sample mapping of both strategies are as following. Note that blue parts remain unchanged before and after.</p> <p>Before (CRUSH)</p> - <p><img src="images/design/crushed/before-using-crush.png" alt="Before (CRUSH)" /></p> + <p><img src="images/design/crushed/before-using-crush.png" alt="Before (CRUSH)"></p> <p>After (new strategy)</p> - <p><img src="images/design/crushed/after-using-crushed.png" alt="After (new strategy)" /></p> - <p>Since the problem is NP-hard. We are not expecting the best assignment. A greedy algorithm works good enough.<br /> After we tried different designs, we found it's hard to achieve both goals (even distribution and fewer movements) using a single strategy. So we decided to apply a hybrid algorithm that finishes the work step by step.</p> - <p><b>Step 1, run CRUSH to get a base assignment.</b><br /> The base assignment usually contains a certain number of uneven partitions(i.e. extra partitions above perfect distribution), so we need the following steps to re-distribute them.</p> - <p><b>Step 2, run a card dealing algorithm on the uneven parts.</b><br /> Assign extra partitions to under-loaded nodes, using card dealing strategy. This algorithm is conceptually simple. The result ensures that all partitions are assigned to instances with minimum difference. When gauranteeing fault-zone safe assignment, our greedy algorithm may not be able to calculate possible results because of fault-zone conflict.</p> + <p><img src="images/design/crushed/after-using-crushed.png" alt="After (new strategy)"></p> + <p>Since the problem is NP-hard. We are not expecting the best assignment. A greedy algorithm works good enough.<br> After we tried different designs, we found it's hard to achieve both goals (even distribution and fewer movements) using a single strategy. So we decided to apply a hybrid algorithm that finishes the work step by step.</p> + <p><b>Step 1, run CRUSH to get a base assignment.</b><br> The base assignment usually contains a certain number of uneven partitions(i.e. extra partitions above perfect distribution), so we need the following steps to re-distribute them.</p> + <p><b>Step 2, run a card dealing algorithm on the uneven parts.</b><br> Assign extra partitions to under-loaded nodes, using card dealing strategy. This algorithm is conceptually simple. The result ensures that all partitions are assigned to instances with minimum difference. When gauranteeing fault-zone safe assignment, our greedy algorithm may not be able to calculate possible results because of fault-zone conflict.</p> <p>Example of assignments after step 2,</p> - <p><img src="images/design/crushed/example-cluster-partition-dist.png" alt="Example" /></p> - <p><b>Step 3, Shuffle partitions' preference lists.</b><br /> State assignments (i.e. Master, Slave, Online, Offline, etc) are made according to preflist, ordered node. When using randomly ordered lists, State assignment is also random, and it may result in uneven state distribution. To resolve this issue, CrushED assigns scores to nodes as it computes pref list, to give all nodes equal chances in appearing at the top of the pref list. This operation results in a much more even state distribution.</p> + <p><img src="images/design/crushed/example-cluster-partition-dist.png" alt="Example"></p> + <p><b>Step 3, Shuffle partitions' preference lists.</b><br> State assignments (i.e. Master, Slave, Online, Offline, etc) are made according to preflist, ordered node. When using randomly ordered lists, State assignment is also random, and it may result in uneven state distribution. To resolve this issue, CrushED assigns scores to nodes as it computes pref list, to give all nodes equal chances in appearing at the top of the pref list. This operation results in a much more even state distribution.</p> <p>Example of master distribution before step 3,</p> - <p><img src="images/design/crushed/example-cluster-master-dist.png" alt="Example" /></p> + <p><img src="images/design/crushed/example-cluster-master-dist.png" alt="Example"></p> <p>Example of master distribution after step 3,</p> - <p><img src="images/design/crushed/example-cluster-master-dist-after.png" alt="Example" /></p> - <p><b>Step 4, re-calculate the assignment for the partitions on temporarily disabled nodes using a consistent hashing algorithm.</b><br /> Consistent hashing ensures minimize partition movement.<br /> Note that the first 3 steps are using full node list, regardless of disabled or offline nodes. So the assignment will be stable even the algorithm contains random factors such hashCode. Then step 4 ensures all the disabled nodes are handled correctly without causing huge partition movements.</p> + <p><img src="images/design/crushed/example-cluster-master-dist-after.png" alt="Example"></p> + <p><b>Step 4, re-calculate the assignment for the partitions on temporarily disabled nodes using a consistent hashing algorithm.</b><br> Consistent hashing ensures minimize partition movement.<br> Note that the first 3 steps are using full node list, regardless of disabled or offline nodes. So the assignment will be stable even the algorithm contains random factors such hashCode. Then step 4 ensures all the disabled nodes are handled correctly without causing huge partition movements.</p> <p>Pseudocode of above algorithm is as follows :</p> <p><b>Pseudo Code</b></p> <div class="source"> @@ -207,23 +220,23 @@ if (!nodeToPartitionMap.isEmpty()) { <li>Adding hosts to simulate expansion.</li> <li>Rolling upgrade.</li> </ul> - <p>All results show that CrushED generates more uniform global distribution compared with CRUSH.<br /> Moreover, partition movements in most scenarios are minimized. When topology changes (i.e. cluster expansion), there can be significantly more partition movements, but we can control the impact by using State Transition Throttling feature.</p> + <p>All results show that CrushED generates more uniform global distribution compared with CRUSH.<br> Moreover, partition movements in most scenarios are minimized. When topology changes (i.e. cluster expansion), there can be significantly more partition movements, but we can control the impact by using State Transition Throttling feature.</p> <section> <h3 id="Partition_Distribution">Partition Distribution</h3> - <p>Following charts demonstrate the worst cases (min load vs. max load) and STDEVs of partition/master distributions from some sample clusters data.<br /> If we measure the improvement by STDEV, CrushED improves the partition distribution evenness by 87% on average compared with CRUSH. And for state assignment (i.e. Mastership assignment) the evenness improvement is 68% on average.</p> - <p><img src="images/design/crushed/cursh-partition-dist.png" alt="Example" /><img src="images/design/crushed/crushed-partition-dist.png" alt="Example" /></p> - <p><img src="images/design/crushed/cursh-master-dist.png" alt="Example" /><img src="images/design/crushed/crushed-master-dist.png" alt="Example" /></p> + <p>Following charts demonstrate the worst cases (min load vs. max load) and STDEVs of partition/master distributions from some sample clusters data.<br> If we measure the improvement by STDEV, CrushED improves the partition distribution evenness by 87% on average compared with CRUSH. And for state assignment (i.e. Mastership assignment) the evenness improvement is 68% on average.</p> + <p><img src="images/design/crushed/cursh-partition-dist.png" alt="Example"><img src="images/design/crushed/crushed-partition-dist.png" alt="Example"></p> + <p><img src="images/design/crushed/cursh-master-dist.png" alt="Example"><img src="images/design/crushed/crushed-master-dist.png" alt="Example"></p> </section> <section> <h3 id="Disabling_Nodes">Disabling Nodes</h3> - <p>When nodes are offline or disabled, CrushED will re-assign the partitions to other live nodes. The algorithm move only the necessary partitions.<br /> We simulated disabling nodes, and measured partition movement changes and mastership changes. We also used the expected movement (the partitions/masters count on the disabled nodes) as a baseline to measure extra movements.</p> + <p>When nodes are offline or disabled, CrushED will re-assign the partitions to other live nodes. The algorithm move only the necessary partitions.<br> We simulated disabling nodes, and measured partition movement changes and mastership changes. We also used the expected movement (the partitions/masters count on the disabled nodes) as a baseline to measure extra movements.</p> <p>The results show that movement is highly correlated to the number of disabled nodes, and extra movements are minor (in most cases 0 movements).</p> <p>Note that <b>Rate</b> in this document is <b>the changed number / total partition or master count</b>.</p> - <p><img src="images/design/crushed/node-down-partition-move.png" alt="Example" /><img src="images/design/crushed/node-down-master-move.png" alt="Example" /></p> + <p><img src="images/design/crushed/node-down-partition-move.png" alt="Example"><img src="images/design/crushed/node-down-master-move.png" alt="Example"></p> </section> <section> <h3 id="Rolling_upgrade">Rolling upgrade</h3> - <p>Rolling upgrade is different from disabling nodes. Since nodes are reset one by one, in this test we assume the difference could be 2 nodes in maximum (for example, upgrading Node A then upgrading Node B).<br /> In this case, movements are still minimized. Even in the worst case scenario, extra partition movements and mastership changes are still close to 0%.</p> + <p>Rolling upgrade is different from disabling nodes. Since nodes are reset one by one, in this test we assume the difference could be 2 nodes in maximum (for example, upgrading Node A then upgrading Node B).<br> In this case, movements are still minimized. Even in the worst case scenario, extra partition movements and mastership changes are still close to 0%.</p> <p>Note that in real production clusters, we can completely avoid partition movements while doing rolling upgrade, by enabling Delayed Rebalancing.</p> </section> <section> @@ -233,10 +246,10 @@ if (!nodeToPartitionMap.isEmpty()) { </section> <section> <h3 id="Algorithm_Performance">Algorithm Performance</h3> - <p>We compared CrushED with CRUSH algorithms using different instance numbers. The tests are executed multiple times and we recorded median computation time.<br /> CrushED does not cost much additional computation time for regular rebalancing. In some of the worst cases, 30% more runtime was observed, compared with CRUSH, but it is quicker than MultiRoundCRUSH.</p> + <p>We compared CrushED with CRUSH algorithms using different instance numbers. The tests are executed multiple times and we recorded median computation time.<br> CrushED does not cost much additional computation time for regular rebalancing. In some of the worst cases, 30% more runtime was observed, compared with CRUSH, but it is quicker than MultiRoundCRUSH.</p> <p>However, when there are down nodes since CrushED needs to run an additional consistent hashing based re-distribution, the computation time will be much longer. In some cases, we saw more than 3 times compared to CRUSH.</p> <p>With some <b>performance improvements</b>, such as using cache to avoid duplicate calculation, we achieved to greatly reduce CrushED's running time. According to our experiment, it is now close to MultiRound CRUSH.</p> - <p><img src="images/design/crushed/performance.png" alt="Example" /></p> + <p><img src="images/design/crushed/performance.png" alt="Example"></p> </section> </section> <section> @@ -252,15 +265,15 @@ if (!nodeToPartitionMap.isEmpty()) { </ol> <p><b>IdeaState SimpleFields Example</b></p> <div class="source"> - <pre><code>HELIX_ENABLED : "true" -IDEAL\_STATE\_MODE : "AUTO_REBALANCE" -REBALANCE\_MODE : "FULL\_AUTO" -REBALANCE_STRATEGY : "org.apache.helix.controller.rebalancer.strategy.CrushRebalanceStrategy" -MIN\_ACTIVE\_REPLICAS : "0" -NUM_PARTITIONS : "64" -REBALANCER\_CLASS\_NAME : "org.apache.helix.controller.rebalancer.DelayedAutoRebalancer" -REPLICAS : "1" -STATE\_MODEL\_DEF_REF : "LeaderStandby" + <pre><code>HELIX_ENABLED : "true" +IDEAL\_STATE\_MODE : "AUTO_REBALANCE" +REBALANCE\_MODE : "FULL\_AUTO" +REBALANCE_STRATEGY : "org.apache.helix.controller.rebalancer.strategy.CrushRebalanceStrategy" +MIN\_ACTIVE\_REPLICAS : "0" +NUM_PARTITIONS : "64" +REBALANCER\_CLASS\_NAME : "org.apache.helix.controller.rebalancer.DelayedAutoRebalancer" +REPLICAS : "1" +STATE\_MODEL\_DEF_REF : "LeaderStandby" </code></pre> </div> </section> @@ -333,7 +346,7 @@ STATE\_MODEL\_DEF_REF : "LeaderStan <div class="span12"> <p class="pull-right"><a href="#">Back to top</a></p> <p class="copyright">Copyright ©2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> - <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="https://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p> + <p><a href="https://github.com/olamy/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> maintained by <a href="https://twitter.com/olamy" target="_blank" title="Olivier Lamy">Olivier Lamy</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="https://helix.apache.org/1.0.3-docs/privacy-policy.html">Privacy Policy</a>
