Modified: helix/site-content/0.9.9-docs/tutorial_participant.html URL: http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_participant.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/0.9.9-docs/tutorial_participant.html (original) +++ helix/site-content/0.9.9-docs/tutorial_participant.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_participant 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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 0.9.9">Release 0.9.9</a></li> <li class="divider">/</li> <li>Tutorial - Participant</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> @@ -198,12 +211,12 @@ manager.connect(); OnlineOfflineStateModel stateModel = new OnlineOfflineStateModel(); return stateModel; } - @StateModelInfo(states = "{'OFFLINE','ONLINE'}", initialState = "OFFINE") + @StateModelInfo(states = "{'OFFLINE','ONLINE'}", initialState = "OFFINE") public static class OnlineOfflineStateModel extends StateModel { - @Transition(from = "OFFLINE", to = "ONLINE") + @Transition(from = "OFFLINE", to = "ONLINE") public void onBecomeOnlineFromOffline(Message message, NotificationContext context) { - System.out.println("OnlineOfflineStateModel.onBecomeOnlineFromOffline()"); + System.out.println("OnlineOfflineStateModel.onBecomeOnlineFromOffline()"); //////////////////////////////////////////////////////////////////////////////////////////////// // Application logic to handle transition // @@ -211,10 +224,10 @@ manager.connect(); //////////////////////////////////////////////////////////////////////////////////////////////// } - @Transition(from = "ONLINE", to = "OFFLINE") + @Transition(from = "ONLINE", to = "OFFLINE") public void onBecomeOfflineFromOnline(Message message, NotificationContext context) { - System.out.println("OnlineOfflineStateModel.onBecomeOfflineFromOnline()"); + System.out.println("OnlineOfflineStateModel.onBecomeOfflineFromOnline()"); //////////////////////////////////////////////////////////////////////////////////////////////// // Application logic to handle transition // @@ -296,7 +309,7 @@ manager.connect(); <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/0.9.9-docs/privacy-policy.html">Privacy Policy</a>
Modified: 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=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/0.9.9-docs/tutorial_propstore.html (original) +++ helix/site-content/0.9.9-docs/tutorial_propstore.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_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"> @@ -119,7 +132,7 @@ <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: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -227,7 +240,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/0.9.9-docs/privacy-policy.html">Privacy Policy</a> Modified: 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=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/0.9.9-docs/tutorial_rebalance.html (original) +++ helix/site-content/0.9.9-docs/tutorial_rebalance.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_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"> @@ -119,7 +132,7 @@ <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: 2022-04-23</li> + <li class="publishDate version-date pull-right">Last Published: 2022-04-25</li> </ul> </div> </header> @@ -182,19 +195,19 @@ under the License. <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><code>{ - "id" : "MyResource", - "simpleFields" : { - "REBALANCE_MODE" : "FULL_AUTO", - "NUM_PARTITIONS" : "3", - "REPLICAS" : "2", - "STATE_MODEL_DEF_REF" : "MasterSlave", + "id" : "MyResource", + "simpleFields" : { + "REBALANCE_MODE" : "FULL_AUTO", + "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> @@ -202,24 +215,24 @@ under the License. <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><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", } } } @@ -233,19 +246,19 @@ under the License. <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><code>{ - "id" : "MyResource", - "simpleFields" : { - "REBALANCE_MODE" : "SEMI_AUTO", - "NUM_PARTITIONS" : "3", - "REPLICAS" : "2", - "STATE_MODEL_DEF_REF" : "MasterSlave", + "id" : "MyResource", + "simpleFields" : { + "REBALANCE_MODE" : "SEMI_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> @@ -259,25 +272,25 @@ under the License. <p>Here's an example, again with 3 partitions, 2 replicas per partition, and the MasterSlave state model:</p> <div class="source"> <pre><code>{ - "id" : "MyResource", - "simpleFields" : { - "REBALANCE_MODE" : "CUSTOMIZED", - "NUM_PARTITIONS" : "3", - "REPLICAS" : "2", - "STATE_MODEL_DEF_REF" : "MasterSlave", + "id" : "MyResource", + "simpleFields" : { + "REBALANCE_MODE" : "CUSTOMIZED", + "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", } } } @@ -363,7 +376,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/0.9.9-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/0.9.9-docs/tutorial_rest_service.html URL: http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_rest_service.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/0.9.9-docs/tutorial_rest_service.html (original) +++ helix/site-content/0.9.9-docs/tutorial_rest_service.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_rest_service 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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 0.9.9">Release 0.9.9</a></li> <li class="divider">/</li> <li>Tutorial - REST Service 2.0</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> @@ -213,7 +226,7 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters { - "clusters" : [ "cluster1", "cluster2", "cluster3"] + "clusters" : [ "cluster1", "cluster2", "cluster3"] } </code></pre> </div> </li> @@ -224,14 +237,14 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster { - "id" : "myCluster", - "paused" : true, - "disabled" : true, - "controller" : "helix.apache.org:1234", - "instances" : [ "aaa.helix.apache.org:1234", "bbb.helix.apache.org:1234" ], - "liveInstances" : ["aaa.helix.apache.org:1234"], - "resources" : [ "resource1", "resource2", "resource3" ], - "stateModelDefs" : [ "MasterSlave", "LeaderStandby", "OnlineOffline" ] + "id" : "myCluster", + "paused" : true, + "disabled" : true, + "controller" : "helix.apache.org:1234", + "instances" : [ "aaa.helix.apache.org:1234", "bbb.helix.apache.org:1234" ], + "liveInstances" : ["aaa.helix.apache.org:1234"], + "resources" : [ "resource1", "resource2", "resource3" ], + "stateModelDefs" : [ "MasterSlave", "LeaderStandby", "OnlineOffline" ] } </code></pre> </div> </li> @@ -250,31 +263,31 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/configs { - "id" : "myCluster", - "simpleFields" : { - "PERSIST_BEST_POSSIBLE_ASSIGNMENT" : "true" + "id" : "myCluster", + "simpleFields" : { + "PERSIST_BEST_POSSIBLE_ASSIGNMENT" : "true" }, - "listFields" : { + "listFields" : { }, - "mapFields" : { + "mapFields" : { } } </code></pre> </div> <ul> - <li><b>POST</b>: update or delete one/some config entries.<br /> update â Update the entries included in the input.</li> + <li><b>POST</b>: update or delete one/some config entries.<br> update â Update the entries included in the input.</li> </ul> <div class="source"> - <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/configs?command=update -d ' + <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/configs?command=update -d ' { - "id" : "myCluster", - "simpleFields" : { - "PERSIST_BEST_POSSIBLE_ASSIGNMENT" : "true" + "id" : "myCluster", + "simpleFields" : { + "PERSIST_BEST_POSSIBLE_ASSIGNMENT" : "true" }, - "listFields" : { - "disabledPartition" : ["p1", "p2", "p3"] + "listFields" : { + "disabledPartition" : ["p1", "p2", "p3"] }, - "mapFields" : { + "mapFields" : { } }' </code></pre> @@ -284,15 +297,15 @@ curl http://localhost:12345/admin/v2/clu </code></pre> </div> <div class="source"> - <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/configs?command=update -d ' + <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/configs?command=update -d ' { - "id" : "myCluster", - "simpleFields" : { + "id" : "myCluster", + "simpleFields" : { }, - "listFields" : { - "disabledPartition" : ["p1", "p3"] + "listFields" : { + "disabledPartition" : ["p1", "p3"] }, - "mapFields" : { + "mapFields" : { } }' </code></pre> @@ -305,11 +318,11 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/controller { - "id" : "myCluster", - "controller" : "test.helix.apache.org:1234", - "HELIX_VERSION":"0.9.9", - "LIVE_INSTANCE":"[email protected]:1234", - "SESSION_ID":"35ab496aba54c99" + "id" : "myCluster", + "controller" : "test.helix.apache.org:1234", + "HELIX_VERSION":"0.9.9", + "LIVE_INSTANCE":"[email protected]:1234", + "SESSION_ID":"35ab496aba54c99" } </code></pre> </div> </li> @@ -327,16 +340,16 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/controller/history { - "id" : "myCluster", - "history" [ - "{DATE=2017-03-21-16:57:14, CONTROLLER=test1.helix.apache.org:1234, TIME=1490115434248}", - "{DATE=2017-03-27-22:35:16, CONTROLLER=test3.helix.apache.org:1234, TIME=1490654116484}", - "{DATE=2017-03-27-22:35:24, CONTROLLER=test2.helix.apache.org:1234, TIME=1490654124926}" + "id" : "myCluster", + "history" [ + "{DATE=2017-03-21-16:57:14, CONTROLLER=test1.helix.apache.org:1234, TIME=1490115434248}", + "{DATE=2017-03-27-22:35:16, CONTROLLER=test3.helix.apache.org:1234, TIME=1490654116484}", + "{DATE=2017-03-27-22:35:24, CONTROLLER=test2.helix.apache.org:1234, TIME=1490654124926}" ] } </code></pre> </div> </li> - <li> <p><b>/clusters/{clusterName}/controller/messages"</b></p> + <li> <p><b>/clusters/{clusterName}/controller/messages"</b></p> <ul> <li>Represents all uncompleted messages currently received by the controller of cluster {clusterName}. This is new endpoint in v2.0.</li> <li><b>GET</b> â list all uncompleted messages received by the controller.</li> @@ -344,11 +357,11 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/controller/messages { - "id" : "myCluster", - "count" : 5, - "messages" [ - "0b8df4f2-776c-4325-96e7-8fad07bd9048", - "13a8c0af-b77e-4f5c-81a9-24fedb62cf58" + "id" : "myCluster", + "count" : 5, + "messages" [ + "0b8df4f2-776c-4325-96e7-8fad07bd9048", + "13a8c0af-b77e-4f5c-81a9-24fedb62cf58" ] } </code></pre> @@ -365,10 +378,10 @@ curl http://localhost:12345/admin/v2/clu <li><b>GET</b> - get all the state model definition in the cluster.</li> </ul> <div class="source"> - <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/statemodeldefs + <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/statemodeldefs { - "id" : "myCluster", - "stateModelDefs" : [ "MasterSlave", "LeaderStandby", "OnlineOffline" ] + "id" : "myCluster", + "stateModelDefs" : [ "MasterSlave", "LeaderStandby", "OnlineOffline" ] } </code></pre> </div> </li> @@ -378,51 +391,51 @@ curl http://localhost:12345/admin/v2/clu <li><b>GET</b> - get the state model definition</li> </ul> <div class="source"> - <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/statemodeldefs/MasterSlave + <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/statemodeldefs/MasterSlave { - "id" : "MasterSlave", - "simpleFields" : { - "INITIAL_STATE" : "OFFLINE" + "id" : "MasterSlave", + "simpleFields" : { + "INITIAL_STATE" : "OFFLINE" }, - "mapFields" : { - "DROPPED.meta" : { - "count" : "-1" + "mapFields" : { + "DROPPED.meta" : { + "count" : "-1" }, - "ERROR.meta" : { - "count" : "-1" + "ERROR.meta" : { + "count" : "-1" }, - "ERROR.next" : { - "DROPPED" : "DROPPED", - "OFFLINE" : "OFFLINE" + "ERROR.next" : { + "DROPPED" : "DROPPED", + "OFFLINE" : "OFFLINE" }, - "MASTER.meta" : { - "count" : "1" + "MASTER.meta" : { + "count" : "1" }, - "MASTER.next" : { - "SLAVE" : "SLAVE", - "DROPPED" : "SLAVE", - "OFFLINE" : "SLAVE" + "MASTER.next" : { + "SLAVE" : "SLAVE", + "DROPPED" : "SLAVE", + "OFFLINE" : "SLAVE" }, - "OFFLINE.meta" : { - "count" : "-1" + "OFFLINE.meta" : { + "count" : "-1" }, - "OFFLINE.next" : { - "SLAVE" : "SLAVE", - "MASTER" : "SLAVE", - "DROPPED" : "DROPPED" + "OFFLINE.next" : { + "SLAVE" : "SLAVE", + "MASTER" : "SLAVE", + "DROPPED" : "DROPPED" }, - "SLAVE.meta" : { - "count" : "R" + "SLAVE.meta" : { + "count" : "R" }, - "SLAVE.next" : { - "MASTER" : "MASTER", - "DROPPED" : "OFFLINE", - "OFFLINE" : "OFFLINE" + "SLAVE.next" : { + "MASTER" : "MASTER", + "DROPPED" : "OFFLINE", + "OFFLINE" : "OFFLINE" } }, - "listFields" : { - "STATE_PRIORITY_LIST" : [ "MASTER", "SLAVE", "OFFLINE", "DROPPED", "ERROR" ], - "STATE_TRANSITION_PRIORITYLIST" : [ "MASTER-SLAVE", "SLAVE-MASTER", "OFFLINE-SLAVE", "SLAVE-OFFLINE", "OFFLINE-DROPPED" ] + "listFields" : { + "STATE_PRIORITY_LIST" : [ "MASTER", "SLAVE", "OFFLINE", "DROPPED", "ERROR" ], + "STATE_TRANSITION_PRIORITYLIST" : [ "MASTER-SLAVE", "SLAVE-MASTER", "OFFLINE-SLAVE", "SLAVE-OFFLINE", "OFFLINE-DROPPED" ] } } </code></pre> @@ -444,9 +457,9 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/resources { - "id" : "myCluster", - "idealstates" : [ "idealstate1", "idealstate2", "idealstate3" ], - "externalviews" : [ "idealstate1", "idealstate3" ] + "id" : "myCluster", + "idealstates" : [ "idealstate1", "idealstate2", "idealstate3" ], + "externalviews" : [ "idealstate1", "idealstate3" ] } </code></pre> </div> </li> @@ -458,10 +471,10 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/resources/resource1 { - "id" : "resource1", - "resourceConfig" : {}, - "idealState" : {}, - "externalView" : {} + "id" : "resource1", + "resourceConfig" : {}, + "idealState" : {}, + "externalView" : {} } </code></pre> </div> @@ -469,18 +482,18 @@ curl http://localhost:12345/admin/v2/clu <li><b>PUT</b> - add a resource with {resourceName}</li> </ul> <div class="source"> - <pre><code>$curl -X PUT -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource -d ' + <pre><code>$curl -X PUT -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource -d ' { - "id":"myResource", - "simpleFields":{ - "STATE_MODEL_FACTORY_NAME":"DEFAULT" - ,"EXTERNAL_VIEW_DISABLED":"true" - ,"NUM_PARTITIONS":"1" - ,"REBALANCE_MODE":"TASK" - ,"REPLICAS":"1" - ,"IDEAL_STATE_MODE":"AUTO" - ,"STATE_MODEL_DEF_REF":"Task" - ,"REBALANCER_CLASS_NAME":"org.apache.helix.task.WorkflowRebalancer" + "id":"myResource", + "simpleFields":{ + "STATE_MODEL_FACTORY_NAME":"DEFAULT" + ,"EXTERNAL_VIEW_DISABLED":"true" + ,"NUM_PARTITIONS":"1" + ,"REBALANCE_MODE":"TASK" + ,"REPLICAS":"1" + ,"IDEAL_STATE_MODE":"AUTO" + ,"STATE_MODEL_DEF_REF":"Task" + ,"REBALANCER_CLASS_NAME":"org.apache.helix.task.WorkflowRebalancer" } }' </code></pre> @@ -499,26 +512,26 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource/idealState { - "id":"myResource" - ,"simpleFields":{ - "IDEAL_STATE_MODE":"AUTO" - ,"NUM_PARTITIONS":"2" - ,"REBALANCE_MODE":"SEMI_AUTO" - ,"REPLICAS":"2" - ,"STATE_MODEL_DEF_REF":"MasterSlave" - } - ,"listFields":{ - "myResource_0":["host1", "host2"] - ,"myResource_1":["host2", "host1"] - } - ,"mapFields":{ - "myResource_0":{ - "host1":"MASTER" - ,"host2":"SLAVE" + "id":"myResource" + ,"simpleFields":{ + "IDEAL_STATE_MODE":"AUTO" + ,"NUM_PARTITIONS":"2" + ,"REBALANCE_MODE":"SEMI_AUTO" + ,"REPLICAS":"2" + ,"STATE_MODEL_DEF_REF":"MasterSlave" + } + ,"listFields":{ + "myResource_0":["host1", "host2"] + ,"myResource_1":["host2", "host1"] + } + ,"mapFields":{ + "myResource_0":{ + "host1":"MASTER" + ,"host2":"SLAVE" } - ,"myResource_1":{ - "host1":"SLAVE" - ,"host2":"MASTER" + ,"myResource_1":{ + "host1":"SLAVE" + ,"host2":"MASTER" } } } @@ -532,26 +545,26 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource/externalView { - "id":"myResource" - ,"simpleFields":{ - "IDEAL_STATE_MODE":"AUTO" - ,"NUM_PARTITIONS":"2" - ,"REBALANCE_MODE":"SEMI_AUTO" - ,"REPLICAS":"2" - ,"STATE_MODEL_DEF_REF":"MasterSlave" - } - ,"listFields":{ - "myResource_0":["host1", "host2"] - ,"myResource_1":["host2", "host1"] - } - ,"mapFields":{ - "myResource_0":{ - "host1":"MASTER" - ,"host2":"OFFLINE" + "id":"myResource" + ,"simpleFields":{ + "IDEAL_STATE_MODE":"AUTO" + ,"NUM_PARTITIONS":"2" + ,"REBALANCE_MODE":"SEMI_AUTO" + ,"REPLICAS":"2" + ,"STATE_MODEL_DEF_REF":"MasterSlave" + } + ,"listFields":{ + "myResource_0":["host1", "host2"] + ,"myResource_1":["host2", "host1"] + } + ,"mapFields":{ + "myResource_0":{ + "host1":"MASTER" + ,"host2":"OFFLINE" } - ,"myResource_1":{ - "host1":"SLAVE" - ,"host2":"MASTER" + ,"myResource_1":{ + "host1":"SLAVE" + ,"host2":"MASTER" } } } @@ -565,8 +578,8 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource/configs { - "id":"myDB" - "UserDefinedProperty" : "property" + "id":"myDB" + "UserDefinedProperty" : "property" } </code></pre> </div> </li> @@ -583,10 +596,10 @@ curl http://localhost:12345/admin/v2/clu <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances { - "id" : "myCluster", - "instances" : [ "host1", "host2", "host3", "host4"], - "online" : ["host1", "host4"], - "disabled" : ["host2"] + "id" : "myCluster", + "instances" : [ "host1", "host2", "host3", "host4"], + "online" : ["host1", "host4"], + "disabled" : ["host2"] } </code></pre> </div> @@ -594,13 +607,13 @@ curl http://localhost:12345/admin/v2/clu <li><b>POST</b> - enable/disable instances.</li> </ul> <div class="source"> - <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/command=enable -d + <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/command=enable -d { - "instances" : [ "host1", "host3" ] + "instances" : [ "host1", "host3" ] } -$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/command=disable -d +$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/command=disable -d { - "instances" : [ "host2", "host4" ] + "instances" : [ "host2", "host4" ] } </code></pre> </div> </li> @@ -612,17 +625,17 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234 { - "id" : "host_1234", - "configs" : { - "HELIX_ENABLED" : "true", - "HELIX_HOST" : "host", - "HELIX_PORT" : "1234", - "HELIX_DISABLED_PARTITION" : [ ] - } - "liveInstance" : { - "HELIX_VERSION":"0.6.6.3", - "LIVE_INSTANCE":"4526@host", - "SESSION_ID":"359619c2d7efc14" + "id" : "host_1234", + "configs" : { + "HELIX_ENABLED" : "true", + "HELIX_HOST" : "host", + "HELIX_PORT" : "1234", + "HELIX_DISABLED_PARTITION" : [ ] + } + "liveInstance" : { + "HELIX_VERSION":"0.6.6.3", + "LIVE_INSTANCE":"4526@host", + "SESSION_ID":"359619c2d7efc14" } } </code></pre> @@ -631,13 +644,13 @@ $curl -X POST -H "Content-Type: app <li><b>PUT</b> - add a new instance with {instanceName}</li> </ul> <div class="source"> - <pre><code>$curl -X PUT -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234 -d ' + <pre><code>$curl -X PUT -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234 -d ' { - "id" : "host_1234", - "simpleFields" : { - "HELIX_ENABLED" : "true", - "HELIX_HOST" : "host", - "HELIX_PORT" : "1234", + "id" : "host_1234", + "simpleFields" : { + "HELIX_ENABLED" : "true", + "HELIX_HOST" : "host", + "HELIX_PORT" : "1234", } }' </code></pre> @@ -649,10 +662,10 @@ $curl -X POST -H "Content-Type: app <li> <p><b>addInstanceTag</b> - add tags to this instance.</p> </li> </ul> <div class="source"> - <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234?command=addInstanceTag -d ' + <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234?command=addInstanceTag -d ' { - "id" : "host_1234", - "instanceTags" : [ "tag_1", "tag_2, "tag_3" ] + "id" : "host_1234", + "instanceTags" : [ "tag_1", "tag_2, "tag_3" ] }' </code></pre> </div> @@ -660,10 +673,10 @@ $curl -X POST -H "Content-Type: app <li><b>removeInstanceTag</b> - remove a tag from this instance.</li> </ul> <div class="source"> - <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234?command=removeInstanceTag -d ' + <pre><code>$curl -X POST -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234?command=removeInstanceTag -d ' { - "id" : "host_1234", - "instanceTags" : [ "tag_1", "tag_2, "tag_3" ] + "id" : "host_1234", + "instanceTags" : [ "tag_1", "tag_2, "tag_3" ] }' </code></pre> </div> </li> @@ -675,8 +688,8 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/resources { - "id" : "host_1234", - "resources" [ "myResource1", "myResource2", "myResource3"] + "id" : "host_1234", + "resources" [ "myResource1", "myResource2", "myResource3"] } </code></pre> </div> </li> @@ -688,31 +701,31 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/localhost_1234/resources/myResource1 { - "id":"myResource1" - ,"simpleFields":{ - "STATE_MODEL_DEF":"MasterSlave" - ,"STATE_MODEL_FACTORY_NAME":"DEFAULT" - ,"BUCKET_SIZE":"0" - ,"SESSION_ID":"359619c2d7f109b" - } - ,"listFields":{ - } - ,"mapFields":{ - "myResource1_2":{ - "CURRENT_STATE":"SLAVE" - ,"INFO":"" + "id":"myResource1" + ,"simpleFields":{ + "STATE_MODEL_DEF":"MasterSlave" + ,"STATE_MODEL_FACTORY_NAME":"DEFAULT" + ,"BUCKET_SIZE":"0" + ,"SESSION_ID":"359619c2d7f109b" + } + ,"listFields":{ + } + ,"mapFields":{ + "myResource1_2":{ + "CURRENT_STATE":"SLAVE" + ,"INFO":"" } - ,"myResource1_3":{ - "CURRENT_STATE":"MASTER" - ,"INFO":"" + ,"myResource1_3":{ + "CURRENT_STATE":"MASTER" + ,"INFO":"" } - ,"myResource1_0":{ - "CURRENT_STATE":"MASTER" - ,"INFO":"" + ,"myResource1_0":{ + "CURRENT_STATE":"MASTER" + ,"INFO":"" } - ,"myResource1_1":{ - "CURRENT_STATE":"SLAVE" - ,"INFO":"" + ,"myResource1_1":{ + "CURRENT_STATE":"SLAVE" + ,"INFO":"" } } } @@ -726,12 +739,12 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/configs { - "id":"host_1234" - "configs" : { - "HELIX_ENABLED" : "true", - "HELIX_HOST" : "host" - "HELIX_PORT" : "1234", - "HELIX_DISABLED_PARTITION" : [ ] + "id":"host_1234" + "configs" : { + "HELIX_ENABLED" : "true", + "HELIX_HOST" : "host" + "HELIX_PORT" : "1234", + "HELIX_DISABLED_PARTITION" : [ ] } </code></pre> </div> @@ -739,14 +752,14 @@ $curl -X POST -H "Content-Type: app <li><b>PUT</b> - PLEASE NOTE THAT THIS PUT IS FULLY OVERRIDE THE INSTANCE CONFIG</li> </ul> <div class="source"> - <pre><code>$curl -X PUT -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/configs + <pre><code>$curl -X PUT -H "Content-Type: application/json" http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/configs { - "id":"host_1234" - "configs" : { - "HELIX_ENABLED" : "true", - "HELIX_HOST" : "host" - "HELIX_PORT" : "1234", - "HELIX_DISABLED_PARTITION" : [ ] + "id":"host_1234" + "configs" : { + "HELIX_ENABLED" : "true", + "HELIX_HOST" : "host" + "HELIX_PORT" : "1234", + "HELIX_DISABLED_PARTITION" : [ ] } </code></pre> </div> </li> @@ -758,11 +771,11 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/errors { - "id":"host_1234" - "errors":{ - "35sfgewngwese":{ - "resource1":["p1","p2","p5"], - "resource2":["p2","p7"] + "id":"host_1234" + "errors":{ + "35sfgewngwese":{ + "resource1":["p1","p2","p5"], + "resource2":["p2","p7"] } } } @@ -779,16 +792,16 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/errors/35sfgewngwese/resource1/p1 { - "id":"35sfgewngwese_resource1" - ,"simpleFields":{ + "id":"35sfgewngwese_resource1" + ,"simpleFields":{ } - ,"listFields":{ + ,"listFields":{ } - ,"mapFields":{ - "HELIX_ERROR 20170521-070822.000561 STATE_TRANSITION b819a34d-41b5-4b42-b497-1577501eeecb":{ - "AdditionalInfo":"Exception while executing a state transition task ..." - ,"MSG_ID":"4af79e51-5f83-4892-a271-cfadacb0906f" - ,"Message state":"READ" + ,"mapFields":{ + "HELIX_ERROR 20170521-070822.000561 STATE_TRANSITION b819a34d-41b5-4b42-b497-1577501eeecb":{ + "AdditionalInfo":"Exception while executing a state transition task ..." + ,"MSG_ID":"4af79e51-5f83-4892-a271-cfadacb0906f" + ,"Message state":"READ" } } } @@ -802,19 +815,19 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/history { - "id": "host_1234", - "LAST_OFFLINE_TIME": "183948792", - "HISTORY": [ - "{DATE=2017-03-02T19:25:18:915, SESSION=459014c82ef3f5b, TIME=1488482718915}", - "{DATE=2017-03-10T22:24:53:246, SESSION=15982390e5d5c91, TIME=1489184693246}", - "{DATE=2017-03-11T02:03:52:776, SESSION=15982390e5d5d85, TIME=1489197832776}", - "{DATE=2017-03-13T18:15:00:778, SESSION=15982390e5d678d, TIME=1489428900778}", - "{DATE=2017-03-21T02:47:57:281, SESSION=459014c82effa82, TIME=1490064477281}", - "{DATE=2017-03-27T14:51:06:802, SESSION=459014c82f01a07, TIME=1490626266802}", - "{DATE=2017-03-30T00:05:08:321, SESSION=5590151804e2c78, TIME=1490832308321}", - "{DATE=2017-03-30T01:17:34:339, SESSION=2591d53b0421864, TIME=1490836654339}", - "{DATE=2017-03-30T17:31:09:880, SESSION=2591d53b0421b2a, TIME=1490895069880}", - "{DATE=2017-03-30T18:05:38:220, SESSION=359619c2d7f109b, TIME=1490.9.738220}" + "id": "host_1234", + "LAST_OFFLINE_TIME": "183948792", + "HISTORY": [ + "{DATE=2017-03-02T19:25:18:915, SESSION=459014c82ef3f5b, TIME=1488482718915}", + "{DATE=2017-03-10T22:24:53:246, SESSION=15982390e5d5c91, TIME=1489184693246}", + "{DATE=2017-03-11T02:03:52:776, SESSION=15982390e5d5d85, TIME=1489197832776}", + "{DATE=2017-03-13T18:15:00:778, SESSION=15982390e5d678d, TIME=1489428900778}", + "{DATE=2017-03-21T02:47:57:281, SESSION=459014c82effa82, TIME=1490064477281}", + "{DATE=2017-03-27T14:51:06:802, SESSION=459014c82f01a07, TIME=1490626266802}", + "{DATE=2017-03-30T00:05:08:321, SESSION=5590151804e2c78, TIME=1490832308321}", + "{DATE=2017-03-30T01:17:34:339, SESSION=2591d53b0421864, TIME=1490836654339}", + "{DATE=2017-03-30T17:31:09:880, SESSION=2591d53b0421b2a, TIME=1490895069880}", + "{DATE=2017-03-30T18:05:38:220, SESSION=359619c2d7f109b, TIME=1490.9.738220}" ] } </code></pre> @@ -827,15 +840,15 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/messages { - "id": "host_1234", - "new_messages": ["0b8df4f2-776c-4325-96e7-8fad07bd9048", "13a8c0af-b77e-4f5c-81a9-24fedb62cf58"], - "read_messages": ["19887b07-e9b8-4fa6-8369-64146226c454"] - "total_message_count" : 100, - "read_message_count" : 50 + "id": "host_1234", + "new_messages": ["0b8df4f2-776c-4325-96e7-8fad07bd9048", "13a8c0af-b77e-4f5c-81a9-24fedb62cf58"], + "read_messages": ["19887b07-e9b8-4fa6-8369-64146226c454"] + "total_message_count" : 100, + "read_message_count" : 50 } </code></pre> </div> </li> - <li> <p><b>"/clusters/{clusterName}/instances/{instanceName}/messages/{messageId}</b></p> + <li> <p><b>"/clusters/{clusterName}/instances/{instanceName}/messages/{messageId}</b></p> <ul> <li>Represents the messages currently received by by the instance with message given message id. This is new endpoint in v2.0.</li> <li><b>GET</b> - get the message content with {messageId} received by the instance.</li> @@ -843,22 +856,22 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/localhost_1234/messages/0b8df4f2-776c-4325-96e7-8fad07bd9048 { - "id": "0b8df4f2-776c-4325-96e7-8fad07bd9048", - "CREATE_TIMESTAMP":"1489997469400", - "ClusterEventName":"messageChange", - "FROM_STATE":"OFFLINE", - "MSG_ID":"0b8df4f2-776c-4325-96e7-8fad07bd9048", - "MSG_STATE":"new", - "MSG_TYPE":"STATE_TRANSITION", - "PARTITION_NAME":"Resource1_243", - "RESOURCE_NAME":"Resource1", - "SRC_NAME":"controller_1234", - "SRC_SESSION_ID":"15982390e5d5a76", - "STATE_MODEL_DEF":"LeaderStandby", - "STATE_MODEL_FACTORY_NAME":"myFactory", - "TGT_NAME":"host_1234", - "TGT_SESSION_ID":"459014c82efed9b", - "TO_STATE":"DROPPED" + "id": "0b8df4f2-776c-4325-96e7-8fad07bd9048", + "CREATE_TIMESTAMP":"1489997469400", + "ClusterEventName":"messageChange", + "FROM_STATE":"OFFLINE", + "MSG_ID":"0b8df4f2-776c-4325-96e7-8fad07bd9048", + "MSG_STATE":"new", + "MSG_TYPE":"STATE_TRANSITION", + "PARTITION_NAME":"Resource1_243", + "RESOURCE_NAME":"Resource1", + "SRC_NAME":"controller_1234", + "SRC_SESSION_ID":"15982390e5d5a76", + "STATE_MODEL_DEF":"LeaderStandby", + "STATE_MODEL_FACTORY_NAME":"myFactory", + "TGT_NAME":"host_1234", + "TGT_SESSION_ID":"459014c82efed9b", + "TO_STATE":"DROPPED" } </code></pre> </div> @@ -873,8 +886,8 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/healthreports { - "id" : "host_1234", - "healthreports" [ "report1", "report2", "report3" ] + "id" : "host_1234", + "healthreports" [ "report1", "report2", "report3" ] } </code></pre> </div> </li> @@ -886,17 +899,17 @@ $curl -X POST -H "Content-Type: app <div class="source"> <pre><code>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/healthreports/ClusterStateStats { - "id":"ClusterStateStats" - ,"simpleFields":{ - "CREATE_TIMESTAMP":"1466753504476" - ,"TimeStamp":"1466753504476" - } - ,"listFields":{ - } - ,"mapFields":{ - "UserDefinedData":{ - "Data1":"0" - ,"Data2":"0.0" + "id":"ClusterStateStats" + ,"simpleFields":{ + "CREATE_TIMESTAMP":"1466753504476" + ,"TimeStamp":"1466753504476" + } + ,"listFields":{ + } + ,"mapFields":{ + "UserDefinedData":{ + "Data1":"0" + ,"Data2":"0.0" } } } @@ -914,7 +927,7 @@ $curl -X POST -H "Content-Type: app </ul> <div class="source"> <pre><code>{ - "Workflows" : [ "Workflow1", "Workflow2" ] + "Workflows" : [ "Workflow1", "Workflow2" ] } </code></pre> </div> </li> @@ -925,40 +938,40 @@ $curl -X POST -H "Content-Type: app </ul> <div class="source"> <pre><code>{ - "id" : "Workflow1", - "WorkflowConfig" : { - "Expiry" : "43200000", - "FailureThreshold" : "0", - "IsJobQueue" : "true", - "LAST_PURGE_TIME" : "1490820801831", - "LAST_SCHEDULED_WORKFLOW" : "Workflow1_20170329T000000", - "ParallelJobs" : "1", - "RecurrenceInterval" : "1", - "RecurrenceUnit" : "DAYS", - "START_TIME" : "1482176880535", - "STATE" : "STOPPED", - "StartTime" : "12-19-2016 00:00:00", - "TargetState" : "START", - "Terminable" : "false", - "capacity" : "500" + "id" : "Workflow1", + "WorkflowConfig" : { + "Expiry" : "43200000", + "FailureThreshold" : "0", + "IsJobQueue" : "true", + "LAST_PURGE_TIME" : "1490820801831", + "LAST_SCHEDULED_WORKFLOW" : "Workflow1_20170329T000000", + "ParallelJobs" : "1", + "RecurrenceInterval" : "1", + "RecurrenceUnit" : "DAYS", + "START_TIME" : "1482176880535", + "STATE" : "STOPPED", + "StartTime" : "12-19-2016 00:00:00", + "TargetState" : "START", + "Terminable" : "false", + "capacity" : "500" }, - "WorkflowContext" : { - "JOB_STATES": { - "Job1": "COMPLETED", - "Job2": "COMPLETED" + "WorkflowContext" : { + "JOB_STATES": { + "Job1": "COMPLETED", + "Job2": "COMPLETED" }, - "StartTime": { - "Job1": "1490741582339", - "Job2": "1490741580204" + "StartTime": { + "Job1": "1490741582339", + "Job2": "1490741580204" }, - "FINISH_TIME": "1490741659135", - "START_TIME": "1490741580196", - "STATE": "COMPLETED" + "FINISH_TIME": "1490741659135", + "START_TIME": "1490741580196", + "STATE": "COMPLETED" }, - "Jobs" : ["Job1","Job2","Job3"], - "ParentJobs" : { - "Job1":["Job2", "Job3"], - "Job2":["Job3"] + "Jobs" : ["Job1","Job2","Job3"], + "ParentJobs" : { + "Job1":["Job2", "Job3"], + "Job2":["Job3"] } } </code></pre> @@ -978,15 +991,15 @@ $curl -X POST -H "Content-Type: app </ul> <div class="source"> <pre><code>{ - "id": "Workflow1", - "Expiry" : "43200000", - "FailureThreshold" : "0", - "IsJobQueue" : "true", - "START_TIME" : "1482176880535", - "StartTime" : "12-19-2016 00:00:00", - "TargetState" : "START", - "Terminable" : "false", - "capacity" : "500" + "id": "Workflow1", + "Expiry" : "43200000", + "FailureThreshold" : "0", + "IsJobQueue" : "true", + "START_TIME" : "1482176880535", + "StartTime" : "12-19-2016 00:00:00", + "TargetState" : "START", + "Terminable" : "false", + "capacity" : "500" } </code></pre> </div> </li> @@ -997,18 +1010,18 @@ $curl -X POST -H "Content-Type: app </ul> <div class="source"> <pre><code>{ - "id": "WorkflowContext", - "JOB_STATES": { - "Job1": "COMPLETED", - "Job2": "COMPLETED" + "id": "WorkflowContext", + "JOB_STATES": { + "Job1": "COMPLETED", + "Job2": "COMPLETED" }, - "StartTime": { - "Job1": "1490741582339", - "Job2": "1490741580204" + "StartTime": { + "Job1": "1490741582339", + "Job2": "1490741580204" }, - "FINISH_TIME": "1490741659135", - "START_TIME": "1490741580196", - "STATE": "COMPLETED" + "FINISH_TIME": "1490741659135", + "START_TIME": "1490741580196", + "STATE": "COMPLETED" } </code></pre> </div> </li> @@ -1024,8 +1037,8 @@ $curl -X POST -H "Content-Type: app </ul> <div class="source"> <pre><code>{ - "id":"Jobs" - "Jobs":["Job1","Job2","Job3"] + "id":"Jobs" + "Jobs":["Job1","Job2","Job3"] } </code></pre> </div> </li> @@ -1036,35 +1049,35 @@ $curl -X POST -H "Content-Type: app </ul> <div class="source"> <pre><code>{ - "id":"Job1" - "JobConfig":{ - "WorkflowID":"Workflow1", - "IgnoreDependentJobFailure":"false", - "MaxForcedReassignmentsPerTask":"3" + "id":"Job1" + "JobConfig":{ + "WorkflowID":"Workflow1", + "IgnoreDependentJobFailure":"false", + "MaxForcedReassignmentsPerTask":"3" }, - "JobContext":{ - "START_TIME":"1491005863291", - "FINISH_TIME":"149101.0.0612", - "Tasks":[ + "JobContext":{ + "START_TIME":"1491005863291", + "FINISH_TIME":"149101.0.0612", + "Tasks":[ { - "id":"0", - "ASSIGNED_PARTICIPANT":"P1", - "FINISH_TIME":"1491005898905" - "INFO":"" - "NUM_ATTEMPTS":"1" - "START_TIME":"1491005863307" - "STATE":"COMPLETED" - "TARGET":"DB_0" + "id":"0", + "ASSIGNED_PARTICIPANT":"P1", + "FINISH_TIME":"1491005898905" + "INFO":"" + "NUM_ATTEMPTS":"1" + "START_TIME":"1491005863307" + "STATE":"COMPLETED" + "TARGET":"DB_0" }, { - "id":"1", - "ASSIGNED_PARTICIPANT":"P5", - "FINISH_TIME":"1491005895443" - "INFO":"" - "NUM_ATTEMPTS":"1" - "START_TIME":"1491005863307" - "STATE":"COMPLETED" - "TARGET":"DB_1" + "id":"1", + "ASSIGNED_PARTICIPANT":"P5", + "FINISH_TIME":"1491005895443" + "INFO":"" + "NUM_ATTEMPTS":"1" + "START_TIME":"1491005863307" + "STATE":"COMPLETED" + "TARGET":"DB_1" } ] } @@ -1072,8 +1085,8 @@ $curl -X POST -H "Content-Type: app </code></pre> </div> <ul> - <li><b>PUT</b> - insert a job with {jobName} into the workflow, this operation is only allowed if the workflow is a JobQueue.<br /> Example : curl -X PUT -H âContent-Type: application/jsonâ -d <a href="./JobExample.json">JobExample.json</a> <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1</a></li> - <li><b>DELETE</b> - delete the job from the workflow, this operation is only allowed if the workflow is a JobQueue.<br /> Example : curl -X DELETE <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1</a></li> + <li><b>PUT</b> - insert a job with {jobName} into the workflow, this operation is only allowed if the workflow is a JobQueue.<br> Example : curl -X PUT -H âContent-Type: application/jsonâ -d <a href="./JobExample.json">JobExample.json</a> <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1</a></li> + <li><b>DELETE</b> - delete the job from the workflow, this operation is only allowed if the workflow is a JobQueue.<br> Example : curl -X DELETE <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1</a></li> </ul> </li> <li> <p><b>â/clusters/{clusterName}/workflows/{workflowName}/jobs/{jobName}/configsâ</b></p> <ul> @@ -1082,10 +1095,10 @@ $curl -X POST -H "Content-Type: app </ul> <div class="source"> <pre><code>{ - "id":"JobConfig" - "WorkflowID":"Workflow1", - "IgnoreDependentJobFailure":"false", - "MaxForcedReassignmentsPerTask":"3" + "id":"JobConfig" + "WorkflowID":"Workflow1", + "IgnoreDependentJobFailure":"false", + "MaxForcedReassignmentsPerTask":"3" } </code></pre> </div> </li> @@ -1096,29 +1109,29 @@ $curl -X POST -H "Content-Type: app </ul> <div class="source"> <pre><code>{ - "id":"JobContext": - "START_TIME":"1491005863291", - "FINISH_TIME":"149101.0.0612", - "Tasks":[ + "id":"JobContext": + "START_TIME":"1491005863291", + "FINISH_TIME":"149101.0.0612", + "Tasks":[ { - "id":"0", - "ASSIGNED_PARTICIPANT":"P1", - "FINISH_TIME":"1491005898905" - "INFO":"" - "NUM_ATTEMPTS":"1" - "START_TIME":"1491005863307" - "STATE":"COMPLETED" - "TARGET":"DB_0" + "id":"0", + "ASSIGNED_PARTICIPANT":"P1", + "FINISH_TIME":"1491005898905" + "INFO":"" + "NUM_ATTEMPTS":"1" + "START_TIME":"1491005863307" + "STATE":"COMPLETED" + "TARGET":"DB_0" }, { - "id":"1", - "ASSIGNED_PARTICIPANT":"P5", - "FINISH_TIME":"1491005895443" - "INFO":"" - "NUM_ATTEMPTS":"1" - "START_TIME":"1491005863307" - "STATE":"COMPLETED" - "TARGET":"DB_1" + "id":"1", + "ASSIGNED_PARTICIPANT":"P5", + "FINISH_TIME":"1491005895443" + "INFO":"" + "NUM_ATTEMPTS":"1" + "START_TIME":"1491005863307" + "STATE":"COMPLETED" + "TARGET":"DB_1" } ] } @@ -1197,7 +1210,7 @@ $curl -X POST -H "Content-Type: app <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/0.9.9-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/0.9.9-docs/tutorial_spectator.html URL: http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_spectator.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/0.9.9-docs/tutorial_spectator.html (original) +++ helix/site-content/0.9.9-docs/tutorial_spectator.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_spectator 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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 0.9.9">Release 0.9.9</a></li> <li class="divider">/</li> <li>Tutorial - Spectator</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> @@ -184,8 +197,8 @@ manager.addExternalViewChangeListener(ro <h3 id="Spectator_Code">Spectator Code</h3> <p>In the following code snippet, the application sends the request to a valid instance by interrogating the external view. Suppose the desired resource for this request is in the partition myDB_1.</p> <div class="source"> - <pre><code>// instances = routingTableProvider.getInstances(, "PARTITION_NAME", "PARTITION_STATE"); -instances = routingTableProvider.getInstances("myDB", "myDB_1", "ONLINE"); + <pre><code>// instances = routingTableProvider.getInstances(, "PARTITION_NAME", "PARTITION_STATE"); +instances = routingTableProvider.getInstances("myDB", "myDB_1", "ONLINE"); //////////////////////////////////////////////////////////////////////////////////////////////// // Application-specific code to send a request to one of the instances // @@ -268,7 +281,7 @@ result = theInstance.sendRequest(yourApp <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/0.9.9-docs/privacy-policy.html">Privacy Policy</a> Modified: helix/site-content/0.9.9-docs/tutorial_state.html URL: http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/tutorial_state.html?rev=1900255&r1=1900254&r2=1900255&view=diff ============================================================================== --- helix/site-content/0.9.9-docs/tutorial_state.html (original) +++ helix/site-content/0.9.9-docs/tutorial_state.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_state 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"> @@ -119,7 +132,7 @@ <li><a href="./" title="Release 0.9.9">Release 0.9.9</a></li> <li class="divider">/</li> <li>Tutorial - State Machine Configuration</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,8 +193,8 @@ under the License. <p>In addition to the state machine configuration, one can specify the constraints of states and transitions.</p> <p>For example, one can say:</p> <ul> - <li> <p>MASTER:1 <br />Maximum number of replicas in MASTER state at any time is 1</p> </li> - <li> <p>OFFLINE-SLAVE:5 <br />Maximum number of OFFLINE-SLAVE transitions that can happen concurrently in the system is 5 in this example.</p> </li> + <li> <p>MASTER:1 <br>Maximum number of replicas in MASTER state at any time is 1</p> </li> + <li> <p>OFFLINE-SLAVE:5 <br>Maximum number of OFFLINE-SLAVE transitions that can happen concurrently in the system is 5 in this example.</p> </li> </ul> <section> <h4 id="Dynamic_State_Constraints">Dynamic State Constraints</h4> @@ -213,43 +226,43 @@ under the License. </section> <section> <h4 id="ERROR">ERROR</h4> - <p>The ERROR state is used whenever the participant serving a partition encountered an error and cannot continue to serve the partition. HelixAdmin has "reset" functionality to allow for participants to recover from the ERROR state.</p> + <p>The ERROR state is used whenever the participant serving a partition encountered an error and cannot continue to serve the partition. HelixAdmin has "reset" functionality to allow for participants to recover from the ERROR state.</p> </section> </section> <section> <h3 id="Annotated_Example">Annotated Example</h3> <p>Below is a complete definition of a Master-Slave state model. Notice the fields marked REQUIRED; these are essential for any state model definition.</p> <div class="source"> - <pre><code>StateModelDefinition stateModel = new StateModelDefinition.Builder("MasterSlave") + <pre><code>StateModelDefinition stateModel = new StateModelDefinition.Builder("MasterSlave") // OFFLINE is the state that the system starts in (initial state is REQUIRED) - .initialState("OFFLINE") + .initialState("OFFLINE") // Lowest number here indicates highest priority, no value indicates lowest priority - .addState("MASTER", 1) - .addState("SLAVE", 2) - .addState("OFFLINE") + .addState("MASTER", 1) + .addState("SLAVE", 2) + .addState("OFFLINE") // Note the special inclusion of the DROPPED state (REQUIRED) .addState(HelixDefinedState.DROPPED.toString()) // No more than one master allowed - .upperBound("MASTER", 1) + .upperBound("MASTER", 1) // R indicates an upper bound of number of replicas for each partition - .dynamicUpperBound("SLAVE", "R") + .dynamicUpperBound("SLAVE", "R") // Add some high-priority transitions - .addTransition("SLAVE", "MASTER", 1) - .addTransition("OFFLINE", "SLAVE", 2) + .addTransition("SLAVE", "MASTER", 1) + .addTransition("OFFLINE", "SLAVE", 2) // Using the same priority value indicates that these transitions can fire in any order - .addTransition("MASTER", "SLAVE", 3) - .addTransition("SLAVE", "OFFLINE", 3) + .addTransition("MASTER", "SLAVE", 3) + .addTransition("SLAVE", "OFFLINE", 3) // Not specifying a value defaults to lowest priority // Notice the inclusion of the OFFLINE to DROPPED transition // Since every state has a path to OFFLINE, they each now have a path to DROPPED (REQUIRED) - .addTransition("OFFLINE", HelixDefinedState.DROPPED.toString()) + .addTransition("OFFLINE", HelixDefinedState.DROPPED.toString()) // Create the StateModelDefinition instance .build(); @@ -329,7 +342,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/0.9.9-docs/privacy-policy.html">Privacy Policy</a>
