helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1877362 [27/32] - in /helix/site-content: ./ 0.6.1-incubating-docs/ 0.6.1-incubating-docs/recipes/ 0.6.1-incubating-docs/releasenotes/ 0.6.2-incubating-docs/ 0.6.2-incubating-docs/recipes/ 0.6.2-incubating-docs/releasenotes/ 0.6.3-docs/ 0....
Date Tue, 05 May 2020 00:32:52 GMT
Added: helix/site-content/1.0.0-docs/tutorial_rebalance.html
URL: http://svn.apache.org/viewvc/helix/site-content/1.0.0-docs/tutorial_rebalance.html?rev=1877362&view=auto
==============================================================================
--- helix/site-content/1.0.0-docs/tutorial_rebalance.html (added)
+++ helix/site-content/1.0.0-docs/tutorial_rebalance.html Tue May  5 00:32:41 2020
@@ -0,0 +1,391 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-05-04
+ Rendered using Maven Reflow Skin 1.0.0 (http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+	<head>
+		<meta charset="UTF-8" />
+		<title>Apache Helix -   Tutorial - Rebalancing Algorithms</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta name="description" content="" />
+		<meta http-equiv="content-language" content="en" />
+
+		<link href="./css/bootstrap.min.css" rel="stylesheet" />
+		<link href="./css/bootstrap-responsive.min.css" rel="stylesheet" />
+		<link href="./css/docs.css" rel="stylesheet" />
+		<link href="./css/reflow-skin.css" rel="stylesheet" />
+		
+		
+		<link href="./css/lightbox.css" rel="stylesheet" />
+		
+		<link href="./css/site.css" rel="stylesheet" />
+		<link href="./css/print.css" rel="stylesheet" media="print" />
+		
+		<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+		<!--[if lt IE 9]>
+			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+		<![endif]-->
+		
+<script type="text/javascript">var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _gaq.push(['_trackPageview']);
+
+        (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+        })();</script>
+	</head>
+
+	<body class="page-tutorial_rebalance project-100-docs" data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="..">Apache Helix</a>
+					<div class="nav-collapse">
+						<ul class="nav pull-right">
+							<li><a href="index.html" title="Helix 1.0.0">Helix 1.0.0 </a></li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="download.html" title="Download">Download </a></li>
+									<li><a href="Building.html" title="Building">Building </a></li>
+									<li><a href="releasenotes/release-1.0.0.html" title="Release Notes">Release Notes </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="Quickstart.html" title="Quick Start">Quick Start </a></li>
+									<li><a href="Tutorial.html" title="Tutorial">Tutorial </a></li>
+									<li><a href="../javadocs/1.0.0" title="Javadocs">Javadocs </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager </a></li>
+									<li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a></li>
+									<li><a href="recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a></li>
+									<li><a href="recipes/service_discovery.html" title="Service discovery">Service discovery </a></li>
+									<li><a href="recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+		
+	<div class="container">
+	
+	<!-- Masthead
+	================================================== -->
+	<header class="jumbotron subhead">
+		<div class="row" id="banner">
+			<div class="span12">
+				<div class="pull-left">
+					<a href="../" id="bannerLeft"><img src="../images/helix-logo.jpg" alt='"''"' /></a>
+					<p class="lead">A cluster management framework for partitioned and replicated distributed resources</p>
+				</div>
+				<div class="pull-right">
+					<a href="http://www.apache.org/" id="bannerRight"><img src="../images/feather_small.gif" alt='"''"' /></a>
+				</div>
+			</div>
+		</div>
+		<div>
+			<ul class="breadcrumb">
+				<li><a href="http://helix.incubator.apache.org/" title="Apache Helix" class="externalLink">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="./" title="Release 1.0.0">Release 1.0.0 </a></li>
+				<li class="divider">/</li>
+				<li>  Tutorial - Rebalancing Algorithms</li>
+				<li class="publishDate version-date pull-right">Last Published: 2020-05-04</li>
+			</ul>
+		</div>
+	</header>
+
+	<div class="main-body">
+	<div class="row">
+		<div class="span12">
+			<div class="body-content">
+<!-- -
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. --> 
+<p></p> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Helix_Tutorial:_Rebalancing_Algorithms"><a href="./Tutorial.html">Helix Tutorial</a>: Rebalancing Algorithms</h2>
+ </div> 
+ <p>The placement of partitions in a distributed system is essential for the reliability and scalability of the system. For example, when a node fails, it is important that the partitions hosted on that node are reallocated evenly among the remaining nodes. Consistent hashing is one such algorithm that can satisfy this guarantee. Helix provides a variant of consistent hashing based on the RUSH algorithm, among others.</p> 
+ <p>This means given a number of partitions, replicas and number of nodes, Helix does the automatic assignment of partition to nodes such that:</p> 
+ <ul> 
+  <li>Each node has the same number of partitions</li> 
+  <li>Replicas of the same partition do not stay on the same node</li> 
+  <li>When a node fails, the partitions will be equally distributed among the remaining nodes</li> 
+  <li>When new nodes are added, the number of partitions moved will be minimized along with satisfying the above criteria</li> 
+ </ul> 
+ <p>Helix employs a rebalancing algorithm to compute the <i>ideal state</i> of the system. When the <i>current state</i> differs from the <i>ideal state</i>, Helix uses it as the target state of the system and computes the appropriate transitions needed to bring it to the <i>ideal state</i>.</p> 
+ <p>Helix makes it easy to perform this operation, while giving you control over the algorithm. In this section, we'll see how to implement the desired behavior.</p> 
+ <p>Helix has four options for rebalancing, in increasing order of customization by the system builder:</p> 
+ <ul> 
+  <li>FULL_AUTO</li> 
+  <li>SEMI_AUTO</li> 
+  <li>CUSTOMIZED</li> 
+  <li>USER_DEFINED</li> 
+ </ul> 
+ <div class="source"> 
+  <pre>            |FULL_AUTO     |  SEMI_AUTO | CUSTOMIZED|  USER_DEFINED  |
+            ---------------------------------------------------------|
+   LOCATION | HELIX        |  APP       |  APP      |      APP       |
+            ---------------------------------------------------------|
+      STATE | HELIX        |  HELIX     |  APP      |      APP       |
+            ----------------------------------------------------------
+</pre> 
+ </div> 
+ <div class="section"> 
+  <h3 id="FULL_AUTO">FULL_AUTO</h3> 
+  <p>When the rebalance mode is set to FULL_AUTO, Helix controls both the location of the replica along with the state. This option is useful for applications where creation of a replica is not expensive.</p> 
+  <p>For example, consider this system that uses a MasterSlave state model, with 3 partitions and 2 replicas in the ideal state.</p> 
+  <div class="source"> 
+   <pre>{
+  &quot;id&quot; : &quot;MyResource&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;REBALANCE_MODE&quot; : &quot;FULL_AUTO&quot;,
+    &quot;NUM_PARTITIONS&quot; : &quot;3&quot;,
+    &quot;REPLICAS&quot; : &quot;2&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+  }
+  &quot;listFields&quot; : {
+    &quot;MyResource_0&quot; : [],
+    &quot;MyResource_1&quot; : [],
+    &quot;MyResource_2&quot; : []
+  },
+  &quot;mapFields&quot; : {
+  }
+}
+</pre> 
+  </div> 
+  <p>If there are 3 nodes in the cluster, then Helix will balance the masters and slaves equally. The ideal state is therefore:</p> 
+  <div class="source"> 
+   <pre>{
+  &quot;id&quot; : &quot;MyResource&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;NUM_PARTITIONS&quot; : &quot;3&quot;,
+    &quot;REPLICAS&quot; : &quot;2&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+  },
+  &quot;mapFields&quot; : {
+    &quot;MyResource_0&quot; : {
+      &quot;N1&quot; : &quot;MASTER&quot;,
+      &quot;N2&quot; : &quot;SLAVE&quot;,
+    },
+    &quot;MyResource_1&quot; : {
+      &quot;N2&quot; : &quot;MASTER&quot;,
+      &quot;N3&quot; : &quot;SLAVE&quot;,
+    },
+    &quot;MyResource_2&quot; : {
+      &quot;N3&quot; : &quot;MASTER&quot;,
+      &quot;N1&quot; : &quot;SLAVE&quot;,
+    }
+  }
+}
+</pre> 
+  </div> 
+  <p>Another typical example is evenly distributing a group of tasks among the currently healthy processes. For example, if there are 60 tasks and 4 nodes, Helix assigns 15 tasks to each node. When one node fails, Helix redistributes its 15 tasks to the remaining 3 nodes, resulting in a balanced 20 tasks per node. Similarly, if a node is added, Helix re-allocates 3 tasks from each of the 4 nodes to the 5th node, resulting in a balanced distribution of 12 tasks per node..</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="SEMI_AUTO">SEMI_AUTO</h3> 
+  <p>When the application needs to control the placement of the replicas, use the SEMI_AUTO rebalance mode.</p> 
+  <p>Example: In the ideal state below, the partition 'MyResource_0' is constrained to be placed only on node1 or node2. The choice of <i>state</i> is still controlled by Helix. That means MyResource_0.MASTER could be on node1 and MyResource_0.SLAVE on node2, or vice-versa but neither would be placed on node3.</p> 
+  <div class="source"> 
+   <pre>{
+  &quot;id&quot; : &quot;MyResource&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;REBALANCE_MODE&quot; : &quot;SEMI_AUTO&quot;,
+    &quot;NUM_PARTITIONS&quot; : &quot;3&quot;,
+    &quot;REPLICAS&quot; : &quot;2&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+  }
+  &quot;listFields&quot; : {
+    &quot;MyResource_0&quot; : [node1, node2],
+    &quot;MyResource_1&quot; : [node2, node3],
+    &quot;MyResource_2&quot; : [node3, node1]
+  },
+  &quot;mapFields&quot; : {
+  }
+}
+</pre> 
+  </div> 
+  <p>The MasterSlave state model requires that a partition has exactly one MASTER at all times, and the other replicas should be SLAVEs. In this simple example with 2 replicas per partition, there would be one MASTER and one SLAVE. Upon failover, a SLAVE has to assume mastership, and a new SLAVE will be generated.</p> 
+  <p>In this mode when node1 fails, unlike in FULL_AUTO mode the partition is <i>not</i> moved from node1 to node3. Instead, Helix will decide to change the state of MyResource_0 on node2 from SLAVE to MASTER, based on the system constraints.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="CUSTOMIZED">CUSTOMIZED</h3> 
+  <p>Helix offers a third mode called CUSTOMIZED, in which the application controls the placement <i>and</i> state of each replica. The application needs to implement a callback interface that Helix invokes when the cluster state changes. Within this callback, the application can recompute the idealstate. Helix will then issue appropriate transitions such that <i>Idealstate</i> and <i>Currentstate</i> converges.</p> 
+  <p>Here's an example, again with 3 partitions, 2 replicas per partition, and the MasterSlave state model:</p> 
+  <div class="source"> 
+   <pre>{
+  &quot;id&quot; : &quot;MyResource&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;REBALANCE_MODE&quot; : &quot;CUSTOMIZED&quot;,
+    &quot;NUM_PARTITIONS&quot; : &quot;3&quot;,
+    &quot;REPLICAS&quot; : &quot;2&quot;,
+    &quot;STATE_MODEL_DEF_REF&quot; : &quot;MasterSlave&quot;,
+  },
+  &quot;mapFields&quot; : {
+    &quot;MyResource_0&quot; : {
+      &quot;N1&quot; : &quot;MASTER&quot;,
+      &quot;N2&quot; : &quot;SLAVE&quot;,
+    },
+    &quot;MyResource_1&quot; : {
+      &quot;N2&quot; : &quot;MASTER&quot;,
+      &quot;N3&quot; : &quot;SLAVE&quot;,
+    },
+    &quot;MyResource_2&quot; : {
+      &quot;N3&quot; : &quot;MASTER&quot;,
+      &quot;N1&quot; : &quot;SLAVE&quot;,
+    }
+  }
+}
+</pre> 
+  </div> 
+  <p>Suppose the current state of the system is ‘MyResource_0’ -&gt; {N1:MASTER, N2:SLAVE} and the application changes the ideal state to ‘MyResource_0’ -&gt; {N1:SLAVE,N2:MASTER}. While the application decides which node is MASTER and which is SLAVE, Helix will not blindly issue MASTER--&gt;SLAVE to N1 and SLAVE--&gt;MASTER to N2 in parallel, since that might result in a transient state where both N1 and N2 are masters, which violates the MasterSlave constraint that there is exactly one MASTER at a time. Helix will first issue MASTER--&gt;SLAVE to N1 and after it is completed, it will issue SLAVE--&gt;MASTER to N2.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="USER_DEFINED">USER_DEFINED</h3> 
+  <p>For maximum flexibility, Helix exposes an interface that can allow applications to plug in custom rebalancing logic. By providing the name of a class that implements the Rebalancer interface, Helix will automatically call the contained method whenever there is a change to the live participants in the cluster. For more, see <a href="./tutorial_user_def_rebalancer.html">User-Defined Rebalancer</a>.</p> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Backwards_Compatibility">Backwards Compatibility</h3> 
+  <p>In previous versions, FULL_AUTO was called AUTO_REBALANCE and SEMI_AUTO was called AUTO. Furthermore, they were presented as the IDEAL_STATE_MODE. Helix supports both IDEAL_STATE_MODE and REBALANCE_MODE, but IDEAL_STATE_MODE is now deprecated and may be phased out in future versions.</p> 
+ </div> 
+</div>
+			</div>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+	
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Get Helix</li>
+						<li>
+							<a href="download.html" title="Download">Download </a>
+						</li>
+						<li>
+							<a href="Building.html" title="Building">Building </a>
+						</li>
+						<li>
+							<a href="releasenotes/release-1.0.0.html" title="Release Notes">Release Notes </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Hands-On</li>
+						<li>
+							<a href="Quickstart.html" title="Quick Start">Quick Start </a>
+						</li>
+						<li>
+							<a href="Tutorial.html" title="Tutorial">Tutorial </a>
+						</li>
+						<li>
+							<a href="../javadocs/1.0.0" title="Javadocs">Javadocs </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Recipes</li>
+						<li>
+							<a href="recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager </a>
+						</li>
+						<li>
+							<a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
+						</li>
+						<li>
+							<a href="recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a>
+						</li>
+						<li>
+							<a href="recipes/service_discovery.html" title="Service discovery">Service discovery </a>
+						</li>
+						<li>
+							<a href="recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</footer>
+		
+	<div class="container subfooter">
+		<div class="row">
+			<div class="span12">
+				<p class="pull-right"><a href="#">Back to top</a></p>
+				<p class="copyright">Copyright &copy;2020 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
+		
+<div class="row span16">
+  <div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation.
+        All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
+  <a href="http://helix.apache.org/1.0.0-docs/privacy-policy.html">Privacy Policy</a>
+</div>			</div>
+		</div>
+	</div>
+
+	<!-- Le javascript
+	================================================== -->
+	<!-- Placed at the end of the document so the pages load faster -->
+
+	<!-- Fallback jQuery loading from Google CDN:
+	     http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go -->
+	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+	<script type="text/javascript">
+		if (typeof jQuery == 'undefined')
+		{
+			document.write(unescape("%3Cscript src='./js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
+		}
+	</script>
+	
+	<script src="./js/bootstrap.min.js"></script>
+	<script src="./js/lightbox.js"></script>
+	<script src="./js/jquery.smooth-scroll.min.js"></script>
+	<!-- back button support for smooth scroll -->
+	<script src="./js/jquery.ba-bbq.min.js"></script>
+
+	<script src="./js/reflow-skin.js"></script>
+	
+	</body>
+</html>
\ No newline at end of file

Added: helix/site-content/1.0.0-docs/tutorial_rest_service.html
URL: http://svn.apache.org/viewvc/helix/site-content/1.0.0-docs/tutorial_rest_service.html?rev=1877362&view=auto
==============================================================================
--- helix/site-content/1.0.0-docs/tutorial_rest_service.html (added)
+++ helix/site-content/1.0.0-docs/tutorial_rest_service.html Tue May  5 00:32:41 2020
@@ -0,0 +1,1233 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2020-05-04
+ Rendered using Maven Reflow Skin 1.0.0 (http://andriusvelykis.github.com/reflow-maven-skin)
+-->
+<html  xml:lang="en" lang="en">
+
+	<head>
+		<meta charset="UTF-8" />
+		<title>Apache Helix -   Tutorial - REST Service 2.0</title>
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta name="description" content="" />
+		<meta http-equiv="content-language" content="en" />
+
+		<link href="./css/bootstrap.min.css" rel="stylesheet" />
+		<link href="./css/bootstrap-responsive.min.css" rel="stylesheet" />
+		<link href="./css/docs.css" rel="stylesheet" />
+		<link href="./css/reflow-skin.css" rel="stylesheet" />
+		
+		
+		<link href="./css/lightbox.css" rel="stylesheet" />
+		
+		<link href="./css/site.css" rel="stylesheet" />
+		<link href="./css/print.css" rel="stylesheet" media="print" />
+		
+		<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
+		<!--[if lt IE 9]>
+			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+		<![endif]-->
+		
+<script type="text/javascript">var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _gaq.push(['_trackPageview']);
+
+        (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+        })();</script>
+	</head>
+
+	<body class="page-tutorial_rest_service project-100-docs" data-spy="scroll" data-offset="60" data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="..">Apache Helix</a>
+					<div class="nav-collapse">
+						<ul class="nav pull-right">
+							<li><a href="index.html" title="Helix 1.0.0">Helix 1.0.0 </a></li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="download.html" title="Download">Download </a></li>
+									<li><a href="Building.html" title="Building">Building </a></li>
+									<li><a href="releasenotes/release-1.0.0.html" title="Release Notes">Release Notes </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="Quickstart.html" title="Quick Start">Quick Start </a></li>
+									<li><a href="Tutorial.html" title="Tutorial">Tutorial </a></li>
+									<li><a href="../javadocs/1.0.0" title="Javadocs">Javadocs </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager </a></li>
+									<li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a></li>
+									<li><a href="recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a></li>
+									<li><a href="recipes/service_discovery.html" title="Service discovery">Service discovery </a></li>
+									<li><a href="recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+		
+	<div class="container">
+	
+	<!-- Masthead
+	================================================== -->
+	<header class="jumbotron subhead">
+		<div class="row" id="banner">
+			<div class="span12">
+				<div class="pull-left">
+					<a href="../" id="bannerLeft"><img src="../images/helix-logo.jpg" alt='"''"' /></a>
+					<p class="lead">A cluster management framework for partitioned and replicated distributed resources</p>
+				</div>
+				<div class="pull-right">
+					<a href="http://www.apache.org/" id="bannerRight"><img src="../images/feather_small.gif" alt='"''"' /></a>
+				</div>
+			</div>
+		</div>
+		<div>
+			<ul class="breadcrumb">
+				<li><a href="http://helix.incubator.apache.org/" title="Apache Helix" class="externalLink">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="./" title="Release 1.0.0">Release 1.0.0 </a></li>
+				<li class="divider">/</li>
+				<li>  Tutorial - REST Service 2.0</li>
+				<li class="publishDate version-date pull-right">Last Published: 2020-05-04</li>
+			</ul>
+		</div>
+	</header>
+
+	<div class="main-body">
+	<div class="row">
+		<div class="span12">
+			<div class="body-content">
+<!-- -
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. --> 
+<p></p> 
+<div class="section"> 
+ <div class="page-header">
+  <h2 id="Helix_Tutorial:_REST_Service_2.0"><a href="./Tutorial.html">Helix Tutorial</a>: REST Service 2.0</h2>
+ </div> 
+ <p>New Helix REST service supported features:</p> 
+ <ul> 
+  <li>Expose all admin operations via restful API. 
+   <ul> 
+    <li>All of Helix admin operations, include these defined in HelixAdmin.java and ConfigAccessor.java, etc, are exposed via rest API.</li> 
+   </ul></li> 
+  <li>Support all task framework API via restful.Current task framework operations are supported from rest API too.</li> 
+  <li>More standard Restful API 
+   <ul> 
+    <li>Use the standard HTTP methods if possible, GET, POST, PUT, DELETE, instead of customized command as it today.</li> 
+    <li>Customized command will be used if there is no corresponding HTTP methods, for example, rebalance a resource, disable an instance, etc.</li> 
+   </ul></li> 
+  <li>Make Helix restful service an separately deployable service.</li> 
+  <li>Enable Access/Audit log for all write access.</li> 
+ </ul> 
+ <div class="section"> 
+  <h3 id="Installation">Installation</h3> 
+  <p>The command line tool comes with helix-core package:</p> 
+  <p>Get the command line tool:</p> 
+  <div class="source"> 
+   <pre>git clone https://git-wip-us.apache.org/repos/asf/helix.git
+cd helix
+git checkout tags/helix-1.0.0
+./build
+cd helix-rest/target/helix-rest-pkg/bin
+chmod +x *.sh
+</pre> 
+  </div> 
+  <p>Get help:</p> 
+  <div class="source"> 
+   <pre>./run-rest-admin.sh --help
+</pre> 
+  </div> 
+  <p>Start the REST server</p> 
+  <div class="source"> 
+   <pre>./run-rest-admin.sh --port 1234 --zkSvr localhost:2121
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="Helix_REST_2.0_Endpoint">Helix REST 2.0 Endpoint</h3> 
+  <p>Helix REST 2.0 endpoint will start with /admin/v2 prefix, and the rest will mostly follow the current URL convention. This allows us to support v2.0 endpoint at the same time with the current Helix web interface. Some sample v2.0 endpoints would look like the following:</p> 
+  <div class="source"> 
+   <pre>curl -X GET http://localhost:12345/admin/v2/clusters
+curl -X POST http://localhost:12345/admin/v2/clusters/myCluster
+curl -X POST http://localhost:12345/admin/v2/clusters/myCluster?command=activate&amp;supercluster=controler_cluster
+curl http://localhost:12345/admin/v2/clusters/myCluster/resources/myResource/IdealState
+</pre> 
+  </div> 
+ </div> 
+ <div class="section"> 
+  <h3 id="REST_Endpoints_and_Supported_Operations">REST Endpoints and Supported Operations</h3> 
+  <div class="section"> 
+   <h4 id="Operations_on_Helix_Cluster">Operations on Helix Cluster</h4> 
+   <ul> 
+    <li> <p><b>“/clusters”</b></p> 
+     <ul> 
+      <li>Represents all helix managed clusters connected to given zookeeper</li> 
+      <li><b>GET</b> – List all Helix managed clusters. Example: curl <a class="externalLink" href="http://localhost:1234/admin/v2/clusters">http://localhost:1234/admin/v2/clusters</a></li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters
+{
+  &quot;clusters&quot; : [ &quot;cluster1&quot;, &quot;cluster2&quot;, &quot;cluster3&quot;]
+}
+</pre> 
+     </div></li> 
+   </ul> 
+   <ul> 
+    <li> <p><b>“/clusters/{clusterName}”</b></p> 
+     <ul> 
+      <li>Represents a helix cluster with name {clusterName}</li> 
+      <li><b>GET</b> – return the cluster info. Example: curl <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster">http://localhost:1234/admin/v2/clusters/myCluster</a></li> 
+     </ul> 
+     <div class="source"> 
+      <pre>```
+$curl http://localhost:1234/admin/v2/clusters/myCluster
+{
+  &quot;id&quot; : &quot;myCluster&quot;,
+  &quot;paused&quot; : true,
+  &quot;disabled&quot; : true,
+  &quot;controller&quot; : &quot;helix.apache.org:1234&quot;,
+  &quot;instances&quot; : [ &quot;aaa.helix.apache.org:1234&quot;, &quot;bbb.helix.apache.org:1234&quot; ],
+  &quot;liveInstances&quot; : [&quot;aaa.helix.apache.org:1234&quot;],
+  &quot;resources&quot; : [ &quot;resource1&quot;, &quot;resource2&quot;, &quot;resource3&quot; ],
+  &quot;stateModelDefs&quot; : [ &quot;MasterSlave&quot;, &quot;LeaderStandby&quot;, &quot;OnlineOffline&quot; ]
+}
+```
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>PUT</b> – create a new cluster with {clusterName}, it returns 200 if the cluster already exists. Example: curl -X PUT <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster">http://localhost:1234/admin/v2/clusters/myCluster</a></li> 
+      <li><b>DELETE</b> – delete this cluster. Example: curl -X DELETE <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster">http://localhost:1234/admin/v2/clusters/myCluster</a></li> 
+      <li><b>activate</b> – Link this cluster to a Helix super (controller) cluster, i.e, add the cluster as a resource to the super cluster. Example: curl -X POST <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster?command=activate&amp;superCluster=myCluster">http://localhost:1234/admin/v2/clusters/myCluster?command=activate&amp;superCluster=myCluster</a></li> 
+      <li><b>expand</b> – In the case that a set of new node is added in the cluster, use this command to balance the resources on the existing instances to new added instances. Example: curl -X POST <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster?command=expand">http://localhost:1234/admin/v2/clusters/myCluster?command=expand</a></li> 
+      <li><b>enable</b> – enable/resume the cluster. Example: curl -X POST <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster?command=enable">http://localhost:1234/admin/v2/clusters/myCluster?command=enable</a></li> 
+      <li><b>disable</b> – disable/pause the cluster. Example: curl -X POST <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster?command=disable">http://localhost:1234/admin/v2/clusters/myCluster?command=disable</a></li> 
+     </ul></li> 
+    <li> <p><b>“/clusters/{clusterName}/configs”</b></p> 
+     <ul> 
+      <li>Represents cluster level configs for cluster with {clusterName}</li> 
+      <li><b>GET</b>: get all configs.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/configs
+{
+  &quot;id&quot; : &quot;myCluster&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;PERSIST_BEST_POSSIBLE_ASSIGNMENT&quot; : &quot;true&quot;
+  },
+  &quot;listFields&quot; : {
+  },
+  &quot;mapFields&quot; : {
+  }
+}
+</pre> 
+     </div> 
+     <ul> 
+      <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>$curl -X POST -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/configs?command=update -d '
+{
+ &quot;id&quot; : &quot;myCluster&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;PERSIST_BEST_POSSIBLE_ASSIGNMENT&quot; : &quot;true&quot;
+  },
+  &quot;listFields&quot; : {
+    &quot;disabledPartition&quot; : [&quot;p1&quot;, &quot;p2&quot;, &quot;p3&quot;]
+  },
+  &quot;mapFields&quot; : {
+  }
+}'
+</pre> 
+     </div> <p>delete – Remove the entries included in the input from current config.</p> 
+     <div class="source"> 
+      <pre>$curl -X POST -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/configs?command=update -d '
+{
+  &quot;id&quot; : &quot;myCluster&quot;,
+  &quot;simpleFields&quot; : {
+  },
+  &quot;listFields&quot; : {
+    &quot;disabledPartition&quot; : [&quot;p1&quot;, &quot;p3&quot;]
+  },
+  &quot;mapFields&quot; : {
+  }
+}'
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/controller”</b></p> 
+     <ul> 
+      <li>Represents the controller for cluster {clusterName}.</li> 
+      <li><b>GET</b> – return controller information</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/controller
+{
+  &quot;id&quot; : &quot;myCluster&quot;,
+  &quot;controller&quot; : &quot;test.helix.apache.org:1234&quot;,
+  &quot;HELIX_VERSION&quot;:&quot;1.0.0&quot;,
+  &quot;LIVE_INSTANCE&quot;:&quot;16261@test.helix.apache.org:1234&quot;,
+  &quot;SESSION_ID&quot;:&quot;35ab496aba54c99&quot;
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/controller/errors”</b></p> 
+     <ul> 
+      <li>Represents error information for the controller of cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> – get all error information.</li> 
+      <li><b>DELETE</b> – clean up all error logs.</li> 
+     </ul></li> 
+   </ul> 
+   <ul> 
+    <li> <p><b>“/clusters/{clusterName}/controller/history”</b></p> 
+     <ul> 
+      <li>Represents the change history of leader controller of cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> – get the leader controller history.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/controller/history
+{
+  &quot;id&quot; : &quot;myCluster&quot;,
+  &quot;history&quot; [
+      &quot;{DATE=2017-03-21-16:57:14, CONTROLLER=test1.helix.apache.org:1234, TIME=1490115434248}&quot;,
+      &quot;{DATE=2017-03-27-22:35:16, CONTROLLER=test3.helix.apache.org:1234, TIME=1490654116484}&quot;,
+      &quot;{DATE=2017-03-27-22:35:24, CONTROLLER=test2.helix.apache.org:1234, TIME=1490654124926}&quot;
+  ]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>/clusters/{clusterName}/controller/messages&quot;</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> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/controller/messages
+{
+  &quot;id&quot; : &quot;myCluster&quot;,
+  &quot;count&quot; : 5,
+  &quot;messages&quot; [
+      &quot;0b8df4f2-776c-4325-96e7-8fad07bd9048&quot;,
+      &quot;13a8c0af-b77e-4f5c-81a9-24fedb62cf58&quot;
+  ]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/controller/messages/{messageId}”</b></p> 
+     <ul> 
+      <li>Represents the messages currently received by the controller of cluster {clusterName} with id {messageId}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - get the message with {messageId} received by the controller.</li> 
+      <li><b>DELETE</b> - delete the message with {messageId}</li> 
+     </ul></li> 
+   </ul> 
+   <ul> 
+    <li> <p><b>“/clusters/{clusterName}/statemodeldefs/”</b></p> 
+     <ul> 
+      <li>Represents all the state model definitions defined in cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - get all the state model definition in the cluster.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl -X POST -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/statemodeldefs
+{
+  &quot;id&quot; : &quot;myCluster&quot;,
+  &quot;stateModelDefs&quot; : [ &quot;MasterSlave&quot;, &quot;LeaderStandby&quot;, &quot;OnlineOffline&quot; ]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/statemodeldefs/{statemodeldef}”</b></p> 
+     <ul> 
+      <li>Represents the state model definition {statemodeldef} defined in cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - get the state model definition</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl -X POST -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/statemodeldefs/MasterSlave
+{
+  &quot;id&quot; : &quot;MasterSlave&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;INITIAL_STATE&quot; : &quot;OFFLINE&quot;
+  },
+  &quot;mapFields&quot; : {
+    &quot;DROPPED.meta&quot; : {
+      &quot;count&quot; : &quot;-1&quot;
+    },
+    &quot;ERROR.meta&quot; : {
+      &quot;count&quot; : &quot;-1&quot;
+    },
+    &quot;ERROR.next&quot; : {
+      &quot;DROPPED&quot; : &quot;DROPPED&quot;,
+      &quot;OFFLINE&quot; : &quot;OFFLINE&quot;
+    },
+    &quot;MASTER.meta&quot; : {
+      &quot;count&quot; : &quot;1&quot;
+    },
+    &quot;MASTER.next&quot; : {
+      &quot;SLAVE&quot; : &quot;SLAVE&quot;,
+      &quot;DROPPED&quot; : &quot;SLAVE&quot;,
+      &quot;OFFLINE&quot; : &quot;SLAVE&quot;
+    },
+    &quot;OFFLINE.meta&quot; : {
+      &quot;count&quot; : &quot;-1&quot;
+    },
+    &quot;OFFLINE.next&quot; : {
+      &quot;SLAVE&quot; : &quot;SLAVE&quot;,
+      &quot;MASTER&quot; : &quot;SLAVE&quot;,
+      &quot;DROPPED&quot; : &quot;DROPPED&quot;
+    },
+    &quot;SLAVE.meta&quot; : {
+      &quot;count&quot; : &quot;R&quot;
+    },
+    &quot;SLAVE.next&quot; : {
+      &quot;MASTER&quot; : &quot;MASTER&quot;,
+      &quot;DROPPED&quot; : &quot;OFFLINE&quot;,
+      &quot;OFFLINE&quot; : &quot;OFFLINE&quot;
+    }
+  },
+  &quot;listFields&quot; : {
+    &quot;STATE_PRIORITY_LIST&quot; : [ &quot;MASTER&quot;, &quot;SLAVE&quot;, &quot;OFFLINE&quot;, &quot;DROPPED&quot;, &quot;ERROR&quot; ],
+    &quot;STATE_TRANSITION_PRIORITYLIST&quot; : [ &quot;MASTER-SLAVE&quot;, &quot;SLAVE-MASTER&quot;, &quot;OFFLINE-SLAVE&quot;, &quot;SLAVE-OFFLINE&quot;, &quot;OFFLINE-DROPPED&quot; ]
+  }
+}
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>POST</b> - add a new state model definition with {statemodeldef}</li> 
+      <li><b>DELETE</b> - delete the state model definition</li> 
+     </ul></li> 
+   </ul> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Helix_Resource_and_its_sub-resources">Helix “Resource” and its sub-resources</h4> 
+   <ul> 
+    <li> <p><b>“/clusters/{clusterName}/resources”</b></p> 
+     <ul> 
+      <li>Represents all resources in a cluster.</li> 
+      <li><b>GET</b> - list all resources with their IdealStates and ExternViews.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/resources
+{
+  &quot;id&quot; : &quot;myCluster&quot;,
+  &quot;idealstates&quot; : [ &quot;idealstate1&quot;, &quot;idealstate2&quot;, &quot;idealstate3&quot; ],
+  &quot;externalviews&quot; : [ &quot;idealstate1&quot;, &quot;idealstate3&quot; ]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/resources/{resourceName}”</b></p> 
+     <ul> 
+      <li>Represents a resource in cluster {clusterName} with name {resourceName}</li> 
+      <li><b>GET</b> - get resource info</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/resources/resource1
+{
+  &quot;id&quot; : &quot;resource1&quot;,
+  &quot;resourceConfig&quot; : {},
+  &quot;idealState&quot; : {},
+  &quot;externalView&quot; : {}
+}
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>PUT</b> - add a resource with {resourceName}</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl -X PUT -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource -d '
+{
+  &quot;id&quot;:&quot;myResource&quot;,
+  &quot;simpleFields&quot;:{
+    &quot;STATE_MODEL_FACTORY_NAME&quot;:&quot;DEFAULT&quot;
+    ,&quot;EXTERNAL_VIEW_DISABLED&quot;:&quot;true&quot;
+    ,&quot;NUM_PARTITIONS&quot;:&quot;1&quot;
+    ,&quot;REBALANCE_MODE&quot;:&quot;TASK&quot;
+    ,&quot;REPLICAS&quot;:&quot;1&quot;
+    ,&quot;IDEAL_STATE_MODE&quot;:&quot;AUTO&quot;
+    ,&quot;STATE_MODEL_DEF_REF&quot;:&quot;Task&quot;
+    ,&quot;REBALANCER_CLASS_NAME&quot;:&quot;org.apache.helix.task.WorkflowRebalancer&quot;
+  }
+}'
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>DELETE</b> - delete a resource. Example: curl -X DELETE <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource">http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource</a></li> 
+      <li><b>enable</b> enable the resource. Example: curl -X POST <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource?command=enable">http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource?command=enable</a></li> 
+      <li><b>disable</b> - disable the resource. Example: curl -X POST <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource?command=disable">http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource?command=disable</a></li> 
+      <li><b>rebalance</b> - rebalance the resource. Example: curl -X POST <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource?command=rebalance">http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource?command=rebalance</a></li> 
+     </ul></li> 
+    <li> <p><b>“/clusters/{clusterName}/resources/{resourceName}/idealState”</b></p> 
+     <ul> 
+      <li>Represents the ideal state of a resource with name {resourceName} in cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - get idealstate.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource/idealState
+{
+  &quot;id&quot;:&quot;myResource&quot;
+  ,&quot;simpleFields&quot;:{
+    &quot;IDEAL_STATE_MODE&quot;:&quot;AUTO&quot;
+    ,&quot;NUM_PARTITIONS&quot;:&quot;2&quot;
+    ,&quot;REBALANCE_MODE&quot;:&quot;SEMI_AUTO&quot;
+    ,&quot;REPLICAS&quot;:&quot;2&quot;
+    ,&quot;STATE_MODEL_DEF_REF&quot;:&quot;MasterSlave&quot;
+  }
+  ,&quot;listFields&quot;:{
+    &quot;myResource_0&quot;:[&quot;host1&quot;, &quot;host2&quot;]
+    ,&quot;myResource_1&quot;:[&quot;host2&quot;, &quot;host1&quot;]
+  }
+  ,&quot;mapFields&quot;:{
+    &quot;myResource_0&quot;:{
+      &quot;host1&quot;:&quot;MASTER&quot;
+      ,&quot;host2&quot;:&quot;SLAVE&quot;
+    }
+    ,&quot;myResource_1&quot;:{
+      &quot;host1&quot;:&quot;SLAVE&quot;
+      ,&quot;host2&quot;:&quot;MASTER&quot;
+    }
+  }
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/resources/{resourceName}/externalView”</b></p> 
+     <ul> 
+      <li>Represents the external view of a resource with name {resourceName} in cluster {clusterName}</li> 
+      <li><b>GET</b> - get the externview</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource/externalView
+{
+  &quot;id&quot;:&quot;myResource&quot;
+  ,&quot;simpleFields&quot;:{
+    &quot;IDEAL_STATE_MODE&quot;:&quot;AUTO&quot;
+    ,&quot;NUM_PARTITIONS&quot;:&quot;2&quot;
+    ,&quot;REBALANCE_MODE&quot;:&quot;SEMI_AUTO&quot;
+    ,&quot;REPLICAS&quot;:&quot;2&quot;
+    ,&quot;STATE_MODEL_DEF_REF&quot;:&quot;MasterSlave&quot;
+  }
+  ,&quot;listFields&quot;:{
+    &quot;myResource_0&quot;:[&quot;host1&quot;, &quot;host2&quot;]
+    ,&quot;myResource_1&quot;:[&quot;host2&quot;, &quot;host1&quot;]
+  }
+  ,&quot;mapFields&quot;:{
+    &quot;myResource_0&quot;:{
+      &quot;host1&quot;:&quot;MASTER&quot;
+      ,&quot;host2&quot;:&quot;OFFLINE&quot;
+    }
+    ,&quot;myResource_1&quot;:{
+      &quot;host1&quot;:&quot;SLAVE&quot;
+      ,&quot;host2&quot;:&quot;MASTER&quot;
+    }
+  }
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/resources/{resourceName}/configs”</b></p> 
+     <ul> 
+      <li>Represents resource level of configs for resource with name {resourceName} in cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - get resource configs.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/resources/myResource/configs
+{
+  &quot;id&quot;:&quot;myDB&quot;
+  &quot;UserDefinedProperty&quot; : &quot;property&quot;
+}
+</pre> 
+     </div></li> 
+   </ul> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Helix_Instance_and_its_sub-resources">Helix Instance and its sub-resources</h4> 
+   <ul> 
+    <li> <p><b>“/clusters/{clusterName}/instances”</b></p> 
+     <ul> 
+      <li>Represents all instances in a cluster {clusterName}</li> 
+      <li><b>GET</b> - list all instances in this cluster.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances
+{
+  &quot;id&quot; : &quot;myCluster&quot;,
+  &quot;instances&quot; : [ &quot;host1&quot;, &quot;host2&quot;, &quot;host3&quot;, &quot;host4&quot;],
+  &quot;online&quot; : [&quot;host1&quot;, &quot;host4&quot;],
+  &quot;disabled&quot; : [&quot;host2&quot;]
+}
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>POST</b> - enable/disable instances.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl -X POST -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/instances/command=enable -d
+{
+  &quot;instances&quot; : [ &quot;host1&quot;, &quot;host3&quot; ]
+}
+$curl -X POST -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/instances/command=disable -d
+{
+  &quot;instances&quot; : [ &quot;host2&quot;, &quot;host4&quot; ]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/instances/{instanceName}”</b></p> 
+     <ul> 
+      <li>Represents a instance in cluster {clusterName} with name {instanceName}</li> 
+      <li><b>GET</b> - get instance information.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234
+{
+  &quot;id&quot; : &quot;host_1234&quot;,
+  &quot;configs&quot; : {
+    &quot;HELIX_ENABLED&quot; : &quot;true&quot;,
+    &quot;HELIX_HOST&quot; : &quot;host&quot;,
+    &quot;HELIX_PORT&quot; : &quot;1234&quot;,
+    &quot;HELIX_DISABLED_PARTITION&quot; : [ ]
+  }
+  &quot;liveInstance&quot; : {
+    &quot;HELIX_VERSION&quot;:&quot;0.6.6.3&quot;,
+    &quot;LIVE_INSTANCE&quot;:&quot;4526@host&quot;,
+    &quot;SESSION_ID&quot;:&quot;359619c2d7efc14&quot;
+  }
+}
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>PUT</b> - add a new instance with {instanceName}</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl -X PUT -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234 -d '
+{
+  &quot;id&quot; : &quot;host_1234&quot;,
+  &quot;simpleFields&quot; : {
+    &quot;HELIX_ENABLED&quot; : &quot;true&quot;,
+    &quot;HELIX_HOST&quot; : &quot;host&quot;,
+    &quot;HELIX_PORT&quot; : &quot;1234&quot;,
+  }
+}'
+</pre> 
+     </div> <p>There’s one important restriction for this operation: the {instanceName} should match exactly HELIX_HOST + “_” + HELIX_PORT. For example, if host is localhost, and port is 1234, the instance name should be localhost_1234. Otherwise, the response won’t contain any error but the configurations are not able to be filled in.</p> 
+     <ul> 
+      <li><b>DELETE</b> - delete the instance. Example: curl -X DELETE <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234">http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234</a></li> 
+      <li><b>enable</b> - enable the instance. Example: curl -X POST <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234?command=enable">http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234?command=enable</a></li> 
+      <li><b>disable</b> - disable the instance. Example: curl -X POST <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234?command=disable">http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234?command=disable</a></li> 
+     </ul> 
+     <ul> 
+      <li><b>addInstanceTag</b> - add tags to this instance.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl -X POST -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234?command=addInstanceTag -d '
+{
+  &quot;id&quot; : &quot;host_1234&quot;,
+  &quot;instanceTags&quot; : [ &quot;tag_1&quot;, &quot;tag_2, &quot;tag_3&quot; ]
+}'
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>removeInstanceTag</b> - remove a tag from this instance.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl -X POST -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234?command=removeInstanceTag -d '
+{
+  &quot;id&quot; : &quot;host_1234&quot;,
+  &quot;instanceTags&quot; : [ &quot;tag_1&quot;, &quot;tag_2, &quot;tag_3&quot; ]
+}'
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/instances/{instanceName}/resources”</b></p> 
+     <ul> 
+      <li>Represents all resources and their partitions locating on the instance in cluster {clusterName} with name {instanceName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - return all resources that have partitions in the instance.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/resources
+{
+  &quot;id&quot; : &quot;host_1234&quot;,
+  &quot;resources&quot; [ &quot;myResource1&quot;, &quot;myResource2&quot;, &quot;myResource3&quot;]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/instances/{instanceName}/resources/{resource}”</b></p> 
+     <ul> 
+      <li>Represents all partitions of the {resource} locating on the instance in cluster {clusterName} with name {instanceName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - return all partitions of the resource in the instance.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/localhost_1234/resources/myResource1
+{
+  &quot;id&quot;:&quot;myResource1&quot;
+  ,&quot;simpleFields&quot;:{
+    &quot;STATE_MODEL_DEF&quot;:&quot;MasterSlave&quot;
+    ,&quot;STATE_MODEL_FACTORY_NAME&quot;:&quot;DEFAULT&quot;
+    ,&quot;BUCKET_SIZE&quot;:&quot;0&quot;
+    ,&quot;SESSION_ID&quot;:&quot;359619c2d7f109b&quot;
+  }
+  ,&quot;listFields&quot;:{
+  }
+  ,&quot;mapFields&quot;:{
+    &quot;myResource1_2&quot;:{
+      &quot;CURRENT_STATE&quot;:&quot;SLAVE&quot;
+      ,&quot;INFO&quot;:&quot;&quot;
+    }
+    ,&quot;myResource1_3&quot;:{
+      &quot;CURRENT_STATE&quot;:&quot;MASTER&quot;
+      ,&quot;INFO&quot;:&quot;&quot;
+    }
+    ,&quot;myResource1_0&quot;:{
+      &quot;CURRENT_STATE&quot;:&quot;MASTER&quot;
+      ,&quot;INFO&quot;:&quot;&quot;
+    }
+    ,&quot;myResource1_1&quot;:{
+      &quot;CURRENT_STATE&quot;:&quot;SLAVE&quot;
+      ,&quot;INFO&quot;:&quot;&quot;
+    }
+  }
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/instances/{instanceName}/configs”</b></p> 
+     <ul> 
+      <li>Represents instance configs in cluster {clusterName} with name {instanceName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - return configs for the instance.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/configs 
+{
+  &quot;id&quot;:&quot;host_1234&quot;
+  &quot;configs&quot; : {
+    &quot;HELIX_ENABLED&quot; : &quot;true&quot;,
+    &quot;HELIX_HOST&quot; : &quot;host&quot;
+    &quot;HELIX_PORT&quot; : &quot;1234&quot;,
+    &quot;HELIX_DISABLED_PARTITION&quot; : [ ]
+}
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>PUT</b> - PLEASE NOTE THAT THIS PUT IS FULLY OVERRIDE THE INSTANCE CONFIG</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl -X PUT -H &quot;Content-Type: application/json&quot; http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/configs
+{
+  &quot;id&quot;:&quot;host_1234&quot;
+  &quot;configs&quot; : {
+    &quot;HELIX_ENABLED&quot; : &quot;true&quot;,
+    &quot;HELIX_HOST&quot; : &quot;host&quot;
+    &quot;HELIX_PORT&quot; : &quot;1234&quot;,
+    &quot;HELIX_DISABLED_PARTITION&quot; : [ ]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/instances/{instanceName}/errors”</b></p> 
+     <ul> 
+      <li>List all the mapping of sessionId to partitions of resources. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - get mapping</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/errors
+{
+   &quot;id&quot;:&quot;host_1234&quot;
+   &quot;errors&quot;:{
+        &quot;35sfgewngwese&quot;:{
+            &quot;resource1&quot;:[&quot;p1&quot;,&quot;p2&quot;,&quot;p5&quot;],
+            &quot;resource2&quot;:[&quot;p2&quot;,&quot;p7&quot;]
+         }
+    }
+}
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>DELETE</b> - clean up all error information from Helix.</li> 
+     </ul></li> 
+    <li> <p><b>“/clusters/{clusterName}/instances/{instanceName}/errors/{sessionId}/{resourceName}/{partitionName}”</b></p> 
+     <ul> 
+      <li>Represents error information for the partition {partitionName} of the resource {resourceName} under session {sessionId} in instance with {instanceName} in cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - get all error information.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/errors/35sfgewngwese/resource1/p1
+{
+  &quot;id&quot;:&quot;35sfgewngwese_resource1&quot;
+  ,&quot;simpleFields&quot;:{
+  }
+  ,&quot;listFields&quot;:{
+  }
+  ,&quot;mapFields&quot;:{
+    &quot;HELIX_ERROR     20170521-070822.000561 STATE_TRANSITION b819a34d-41b5-4b42-b497-1577501eeecb&quot;:{
+      &quot;AdditionalInfo&quot;:&quot;Exception while executing a state transition task ...&quot;
+      ,&quot;MSG_ID&quot;:&quot;4af79e51-5f83-4892-a271-cfadacb0906f&quot;
+      ,&quot;Message state&quot;:&quot;READ&quot;
+    }
+  }
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/instances/{instanceName}/history”</b></p> 
+     <ul> 
+      <li>Represents instance session change history for the instance with {instanceName} in cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - get the instance change history.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/history
+{
+  &quot;id&quot;: &quot;host_1234&quot;,
+  &quot;LAST_OFFLINE_TIME&quot;: &quot;183948792&quot;,
+  &quot;HISTORY&quot;: [
+    &quot;{DATE=2017-03-02T19:25:18:915, SESSION=459014c82ef3f5b, TIME=1488482718915}&quot;,
+    &quot;{DATE=2017-03-10T22:24:53:246, SESSION=15982390e5d5c91, TIME=1489184693246}&quot;,
+    &quot;{DATE=2017-03-11T02:03:52:776, SESSION=15982390e5d5d85, TIME=1489197832776}&quot;,
+    &quot;{DATE=2017-03-13T18:15:00:778, SESSION=15982390e5d678d, TIME=1489428900778}&quot;,
+    &quot;{DATE=2017-03-21T02:47:57:281, SESSION=459014c82effa82, TIME=1490064477281}&quot;,
+    &quot;{DATE=2017-03-27T14:51:06:802, SESSION=459014c82f01a07, TIME=1490626266802}&quot;,
+    &quot;{DATE=2017-03-30T00:05:08:321, SESSION=5590151804e2c78, TIME=1490832308321}&quot;,
+    &quot;{DATE=2017-03-30T01:17:34:339, SESSION=2591d53b0421864, TIME=1490836654339}&quot;,
+    &quot;{DATE=2017-03-30T17:31:09:880, SESSION=2591d53b0421b2a, TIME=1490895069880}&quot;,
+    &quot;{DATE=2017-03-30T18:05:38:220, SESSION=359619c2d7f109b, TIME=1490897138220}&quot;
+  ]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/instances/{instanceName}/messages”</b></p> 
+     <ul> 
+      <li>Represents all uncompleted messages currently received by the instance. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - list all uncompleted messages received by the controller.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/messages
+{
+  &quot;id&quot;: &quot;host_1234&quot;,
+  &quot;new_messages&quot;: [&quot;0b8df4f2-776c-4325-96e7-8fad07bd9048&quot;, &quot;13a8c0af-b77e-4f5c-81a9-24fedb62cf58&quot;],
+  &quot;read_messages&quot;: [&quot;19887b07-e9b8-4fa6-8369-64146226c454&quot;]
+  &quot;total_message_count&quot; : 100,
+  &quot;read_message_count&quot; : 50
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>&quot;/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> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/localhost_1234/messages/0b8df4f2-776c-4325-96e7-8fad07bd9048
+{
+  &quot;id&quot;: &quot;0b8df4f2-776c-4325-96e7-8fad07bd9048&quot;,
+  &quot;CREATE_TIMESTAMP&quot;:&quot;1489997469400&quot;,
+  &quot;ClusterEventName&quot;:&quot;messageChange&quot;,
+  &quot;FROM_STATE&quot;:&quot;OFFLINE&quot;,
+  &quot;MSG_ID&quot;:&quot;0b8df4f2-776c-4325-96e7-8fad07bd9048&quot;,
+  &quot;MSG_STATE&quot;:&quot;new&quot;,
+  &quot;MSG_TYPE&quot;:&quot;STATE_TRANSITION&quot;,
+  &quot;PARTITION_NAME&quot;:&quot;Resource1_243&quot;,
+  &quot;RESOURCE_NAME&quot;:&quot;Resource1&quot;,
+  &quot;SRC_NAME&quot;:&quot;controller_1234&quot;,
+  &quot;SRC_SESSION_ID&quot;:&quot;15982390e5d5a76&quot;,
+  &quot;STATE_MODEL_DEF&quot;:&quot;LeaderStandby&quot;,
+  &quot;STATE_MODEL_FACTORY_NAME&quot;:&quot;myFactory&quot;,
+  &quot;TGT_NAME&quot;:&quot;host_1234&quot;,
+  &quot;TGT_SESSION_ID&quot;:&quot;459014c82efed9b&quot;,
+  &quot;TO_STATE&quot;:&quot;DROPPED&quot;
+}
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>DELETE</b> - delete the message with {messageId}. Example: $curl -X DELETE <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/messages/0b8df4f2-776c-4325-96e7-8fad07bd9048">http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/messages/0b8df4f2-776c-4325-96e7-8fad07bd9048</a></li> 
+     </ul></li> 
+    <li> <p><b>“/clusters/{clusterName}/instances/{instanceName}/healthreports”</b></p> 
+     <ul> 
+      <li>Represents all health reports in the instance in cluster {clusterName} with name {instanceName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - return the name of health reports collected from the instance.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/healthreports
+{
+  &quot;id&quot; : &quot;host_1234&quot;,
+  &quot;healthreports&quot; [ &quot;report1&quot;, &quot;report2&quot;, &quot;report3&quot; ]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/instances/{instanceName}/healthreports/{reportName}”</b></p> 
+     <ul> 
+      <li>Represents the health report with {reportName} in the instance in cluster {clusterName} with name {instanceName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - return the content of health report collected from the instance.</li> 
+     </ul> 
+     <div class="source"> 
+      <pre>$curl http://localhost:1234/admin/v2/clusters/myCluster/instances/host_1234/healthreports/ClusterStateStats
+{
+  &quot;id&quot;:&quot;ClusterStateStats&quot;
+  ,&quot;simpleFields&quot;:{
+    &quot;CREATE_TIMESTAMP&quot;:&quot;1466753504476&quot;
+    ,&quot;TimeStamp&quot;:&quot;1466753504476&quot;
+  }
+  ,&quot;listFields&quot;:{
+  }
+  ,&quot;mapFields&quot;:{
+    &quot;UserDefinedData&quot;:{
+      &quot;Data1&quot;:&quot;0&quot;
+      ,&quot;Data2&quot;:&quot;0.0&quot;
+    }
+  }
+}
+</pre> 
+     </div></li> 
+   </ul> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Helix_Workflow_and_its_sub-resources">Helix Workflow and its sub-resources</h4> 
+   <ul> 
+    <li> <p><b>“/clusters/{clusterName}/workflows”</b></p> 
+     <ul> 
+      <li>Represents all workflows in cluster {clusterName}</li> 
+      <li><b>GET</b> - list all workflows in this cluster. Example : curl <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows">http://localhost:1234/admin/v2/clusters/TestCluster/workflows</a></li> 
+     </ul> 
+     <div class="source"> 
+      <pre>{
+  &quot;Workflows&quot; : [ &quot;Workflow1&quot;, &quot;Workflow2&quot; ]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/workflows/{workflowName}”</b></p> 
+     <ul> 
+      <li>Represents workflow with name {workflowName} in cluster {clusterName}</li> 
+      <li><b>GET</b> - return workflow information. Example : curl <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1</a></li> 
+     </ul> 
+     <div class="source"> 
+      <pre>{
+   &quot;id&quot; : &quot;Workflow1&quot;,
+   &quot;WorkflowConfig&quot; : {
+       &quot;Expiry&quot; : &quot;43200000&quot;,
+       &quot;FailureThreshold&quot; : &quot;0&quot;,
+       &quot;IsJobQueue&quot; : &quot;true&quot;,
+       &quot;LAST_PURGE_TIME&quot; : &quot;1490820801831&quot;,
+       &quot;LAST_SCHEDULED_WORKFLOW&quot; : &quot;Workflow1_20170329T000000&quot;,
+       &quot;ParallelJobs&quot; : &quot;1&quot;,
+       &quot;RecurrenceInterval&quot; : &quot;1&quot;,
+       &quot;RecurrenceUnit&quot; : &quot;DAYS&quot;,
+       &quot;START_TIME&quot; : &quot;1482176880535&quot;,
+       &quot;STATE&quot; : &quot;STOPPED&quot;,
+       &quot;StartTime&quot; : &quot;12-19-2016 00:00:00&quot;,
+       &quot;TargetState&quot; : &quot;START&quot;,
+       &quot;Terminable&quot; : &quot;false&quot;,
+       &quot;capacity&quot; : &quot;500&quot;
+    },
+   &quot;WorkflowContext&quot; : {
+       &quot;JOB_STATES&quot;: {
+         &quot;Job1&quot;: &quot;COMPLETED&quot;,
+         &quot;Job2&quot;: &quot;COMPLETED&quot;
+       },
+       &quot;StartTime&quot;: {
+         &quot;Job1&quot;: &quot;1490741582339&quot;,
+         &quot;Job2&quot;: &quot;1490741580204&quot;
+       },
+       &quot;FINISH_TIME&quot;: &quot;1490741659135&quot;,
+       &quot;START_TIME&quot;: &quot;1490741580196&quot;,
+       &quot;STATE&quot;: &quot;COMPLETED&quot;
+   },
+   &quot;Jobs&quot; : [&quot;Job1&quot;,&quot;Job2&quot;,&quot;Job3&quot;],
+   &quot;ParentJobs&quot; : {
+        &quot;Job1&quot;:[&quot;Job2&quot;, &quot;Job3&quot;],
+        &quot;Job2&quot;:[&quot;Job3&quot;]
+   }
+}
+</pre> 
+     </div> 
+     <ul> 
+      <li><b>PUT</b> - create a workflow with {workflowName}. Example : curl -X PUT -H “Content-Type: application/json” -d <a href="./WorkflowExample.json">WorkflowExample.json</a> <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1</a></li> 
+      <li><b>DELETE</b> - delete the workflow. Example : curl -X DELETE <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1</a></li> 
+      <li><b>start</b> - start the workflow. Example : curl -X POST -H “Content-Type: application/json” <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1?command=start">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1?command=start</a></li> 
+      <li><b>stop</b> - pause the workflow. Example : curl -X POST -H “Content-Type: application/json” <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1?command=stop">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1?command=stop</a></li> 
+      <li><b>resume</b> - resume the workflow. Example : curl -X POST -H “Content-Type: application/json” <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1?command=resume">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1?command=resume</a></li> 
+      <li><b>cleanup</b> - cleanup all expired jobs in the workflow, this operation is only allowed if the workflow is a JobQueue. Example : curl -X POST -H “Content-Type: application/json” <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1?command=clean">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1?command=clean</a></li> 
+     </ul></li> 
+    <li> <p><b>“/clusters/{clusterName}/workflows/{workflowName}/configs”</b></p> 
+     <ul> 
+      <li>Represents workflow config with name {workflowName} in cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - return workflow configs. Example : curl <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/configs">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/configs</a></li> 
+     </ul> 
+     <div class="source"> 
+      <pre>{
+    &quot;id&quot;: &quot;Workflow1&quot;,
+    &quot;Expiry&quot; : &quot;43200000&quot;,
+    &quot;FailureThreshold&quot; : &quot;0&quot;,
+    &quot;IsJobQueue&quot; : &quot;true&quot;,
+    &quot;START_TIME&quot; : &quot;1482176880535&quot;,
+    &quot;StartTime&quot; : &quot;12-19-2016 00:00:00&quot;,
+    &quot;TargetState&quot; : &quot;START&quot;,
+    &quot;Terminable&quot; : &quot;false&quot;,
+    &quot;capacity&quot; : &quot;500&quot;
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/workflows/{workflowName}/context”</b></p> 
+     <ul> 
+      <li>Represents workflow runtime information with name {workflowName} in cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - return workflow runtime information. Example : curl <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/context">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/context</a></li> 
+     </ul> 
+     <div class="source"> 
+      <pre>{
+    &quot;id&quot;: &quot;WorkflowContext&quot;,
+    &quot;JOB_STATES&quot;: {
+         &quot;Job1&quot;: &quot;COMPLETED&quot;,
+         &quot;Job2&quot;: &quot;COMPLETED&quot;
+     },
+     &quot;StartTime&quot;: {
+         &quot;Job1&quot;: &quot;1490741582339&quot;,
+         &quot;Job2&quot;: &quot;1490741580204&quot;
+     },
+     &quot;FINISH_TIME&quot;: &quot;1490741659135&quot;,
+     &quot;START_TIME&quot;: &quot;1490741580196&quot;,
+     &quot;STATE&quot;: &quot;COMPLETED&quot;
+}
+</pre> 
+     </div></li> 
+   </ul> 
+  </div> 
+  <div class="section"> 
+   <h4 id="Helix_Job_and_its_sub-resources">Helix Job and its sub-resources</h4> 
+   <ul> 
+    <li> <p><b>“/clusters/{clusterName}/workflows/{workflowName}/jobs”</b></p> 
+     <ul> 
+      <li>Represents all jobs in workflow {workflowName} in cluster {clusterName}</li> 
+      <li><b>GET</b> return all job names in this workflow. Example : curl <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs</a></li> 
+     </ul> 
+     <div class="source"> 
+      <pre>{
+    &quot;id&quot;:&quot;Jobs&quot;
+    &quot;Jobs&quot;:[&quot;Job1&quot;,&quot;Job2&quot;,&quot;Job3&quot;]
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/workflows/{workflowName}/jobs/{jobName}”</b></p> 
+     <ul> 
+      <li>Represents job with {jobName} within {workflowName} in cluster {clusterName}</li> 
+      <li><b>GET</b> return job information. Example : curl <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> 
+     <div class="source"> 
+      <pre>{
+    &quot;id&quot;:&quot;Job1&quot;
+    &quot;JobConfig&quot;:{
+        &quot;WorkflowID&quot;:&quot;Workflow1&quot;,
+        &quot;IgnoreDependentJobFailure&quot;:&quot;false&quot;,
+        &quot;MaxForcedReassignmentsPerTask&quot;:&quot;3&quot;
+    },
+    &quot;JobContext&quot;:{
+	&quot;START_TIME&quot;:&quot;1491005863291&quot;,
+        &quot;FINISH_TIME&quot;:&quot;1491005902612&quot;,
+        &quot;Tasks&quot;:[
+             {
+                 &quot;id&quot;:&quot;0&quot;,
+                 &quot;ASSIGNED_PARTICIPANT&quot;:&quot;P1&quot;,
+                 &quot;FINISH_TIME&quot;:&quot;1491005898905&quot;
+                 &quot;INFO&quot;:&quot;&quot;
+                 &quot;NUM_ATTEMPTS&quot;:&quot;1&quot;
+                 &quot;START_TIME&quot;:&quot;1491005863307&quot;
+                 &quot;STATE&quot;:&quot;COMPLETED&quot;
+                 &quot;TARGET&quot;:&quot;DB_0&quot;
+             },
+             {
+                 &quot;id&quot;:&quot;1&quot;,
+                 &quot;ASSIGNED_PARTICIPANT&quot;:&quot;P5&quot;,
+                 &quot;FINISH_TIME&quot;:&quot;1491005895443&quot;
+                 &quot;INFO&quot;:&quot;&quot;
+                 &quot;NUM_ATTEMPTS&quot;:&quot;1&quot;
+                 &quot;START_TIME&quot;:&quot;1491005863307&quot;
+                 &quot;STATE&quot;:&quot;COMPLETED&quot;
+                 &quot;TARGET&quot;:&quot;DB_1&quot;
+             }
+         ]
+     }
+}
+</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> 
+     </ul></li> 
+    <li> <p><b>“/clusters/{clusterName}/workflows/{workflowName}/jobs/{jobName}/configs”</b></p> 
+     <ul> 
+      <li>Represents job config for {jobName} within workflow {workflowName} in cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - return job config. Example : curl <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1/configs">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1/configs</a></li> 
+     </ul> 
+     <div class="source"> 
+      <pre>{
+  &quot;id&quot;:&quot;JobConfig&quot;
+  &quot;WorkflowID&quot;:&quot;Workflow1&quot;,
+  &quot;IgnoreDependentJobFailure&quot;:&quot;false&quot;,
+  &quot;MaxForcedReassignmentsPerTask&quot;:&quot;3&quot;
+}
+</pre> 
+     </div></li> 
+    <li> <p><b>“/clusters/{clusterName}/workflows/{workflowName}/jobs/{jobName}/context”</b></p> 
+     <ul> 
+      <li>Represents job runtime information with {jobName} in {workflowName} in cluster {clusterName}. This is new endpoint in v2.0.</li> 
+      <li><b>GET</b> - return job runtime information. Example : curl <a class="externalLink" href="http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1/context">http://localhost:1234/admin/v2/clusters/TestCluster/workflows/Workflow1/jobs/Job1/context</a></li> 
+     </ul> 
+     <div class="source"> 
+      <pre>{
+   &quot;id&quot;:&quot;JobContext&quot;:
+   &quot;START_TIME&quot;:&quot;1491005863291&quot;,
+   &quot;FINISH_TIME&quot;:&quot;1491005902612&quot;,
+   &quot;Tasks&quot;:[
+             {
+                 &quot;id&quot;:&quot;0&quot;,
+                 &quot;ASSIGNED_PARTICIPANT&quot;:&quot;P1&quot;,
+                 &quot;FINISH_TIME&quot;:&quot;1491005898905&quot;
+                 &quot;INFO&quot;:&quot;&quot;
+                 &quot;NUM_ATTEMPTS&quot;:&quot;1&quot;
+                 &quot;START_TIME&quot;:&quot;1491005863307&quot;
+                 &quot;STATE&quot;:&quot;COMPLETED&quot;
+                 &quot;TARGET&quot;:&quot;DB_0&quot;
+             },
+             {
+                 &quot;id&quot;:&quot;1&quot;,
+                 &quot;ASSIGNED_PARTICIPANT&quot;:&quot;P5&quot;,
+                 &quot;FINISH_TIME&quot;:&quot;1491005895443&quot;
+                 &quot;INFO&quot;:&quot;&quot;
+                 &quot;NUM_ATTEMPTS&quot;:&quot;1&quot;
+                 &quot;START_TIME&quot;:&quot;1491005863307&quot;
+                 &quot;STATE&quot;:&quot;COMPLETED&quot;
+                 &quot;TARGET&quot;:&quot;DB_1&quot;
+             }
+   ]
+}
+</pre> 
+     </div></li> 
+   </ul> 
+  </div> 
+ </div> 
+</div>
+			</div>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+	
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Get Helix</li>
+						<li>
+							<a href="download.html" title="Download">Download </a>
+						</li>
+						<li>
+							<a href="Building.html" title="Building">Building </a>
+						</li>
+						<li>
+							<a href="releasenotes/release-1.0.0.html" title="Release Notes">Release Notes </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Hands-On</li>
+						<li>
+							<a href="Quickstart.html" title="Quick Start">Quick Start </a>
+						</li>
+						<li>
+							<a href="Tutorial.html" title="Tutorial">Tutorial </a>
+						</li>
+						<li>
+							<a href="../javadocs/1.0.0" title="Javadocs">Javadocs </a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Recipes</li>
+						<li>
+							<a href="recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager </a>
+						</li>
+						<li>
+							<a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a>
+						</li>
+						<li>
+							<a href="recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store </a>
+						</li>
+						<li>
+							<a href="recipes/service_discovery.html" title="Service discovery">Service discovery </a>
+						</li>
+						<li>
+							<a href="recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution </a>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+	</footer>
+		
+	<div class="container subfooter">
+		<div class="row">
+			<div class="span12">
+				<p class="pull-right"><a href="#">Back to top</a></p>
+				<p class="copyright">Copyright &copy;2020 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank" title="Andrius Velykis">Andrius Velykis</a>.</p>
+		
+<div class="row span16">
+  <div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation.
+        All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
+  <a href="http://helix.apache.org/1.0.0-docs/privacy-policy.html">Privacy Policy</a>
+</div>			</div>
+		</div>
+	</div>
+
+	<!-- Le javascript
+	================================================== -->
+	<!-- Placed at the end of the document so the pages load faster -->
+
+	<!-- Fallback jQuery loading from Google CDN:
+	     http://stackoverflow.com/questions/1014203/best-way-to-use-googles-hosted-jquery-but-fall-back-to-my-hosted-library-on-go -->
+	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+	<script type="text/javascript">
+		if (typeof jQuery == 'undefined')
+		{
+			document.write(unescape("%3Cscript src='./js/jquery-1.8.3.min.js' type='text/javascript'%3E%3C/script%3E"));
+		}
+	</script>
+	
+	<script src="./js/bootstrap.min.js"></script>
+	<script src="./js/lightbox.js"></script>
+	<script src="./js/jquery.smooth-scroll.min.js"></script>
+	<!-- back button support for smooth scroll -->
+	<script src="./js/jquery.ba-bbq.min.js"></script>
+
+	<script src="./js/reflow-skin.js"></script>
+	
+	</body>
+</html>
\ No newline at end of file



Mime
View raw message