helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject svn commit: r1767604 [10/10] - in /helix/site-content: ./ 0.6.1-incubating-docs/ 0.6.2-incubating-docs/ 0.6.3-docs/ 0.6.4-docs/ 0.6.5-docs/ 0.6.6-docs/ 0.6.6-docs/css/ 0.6.6-docs/images/ 0.6.6-docs/img/ 0.6.6-docs/js/ 0.6.6-docs/recipes/ 0.6.6-docs/rel...
Date Wed, 02 Nov 2016 04:11:37 GMT
Added: helix/site-content/0.6.6-docs/tutorial_yaml.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.6.6-docs/tutorial_yaml.html?rev=1767604&view=auto
==============================================================================
--- helix/site-content/0.6.6-docs/tutorial_yaml.html (added)
+++ helix/site-content/0.6.6-docs/tutorial_yaml.html Wed Nov  2 04:11:36 2016
@@ -0,0 +1,320 @@
+
+<!DOCTYPE html>
+<!--
+ Generated by Apache Maven Doxia at 2016-11-01
+ 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 - YAML Cluster Setup</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="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap.min.css"
rel="stylesheet" />
+		<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/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_yaml project-066-docs" data-spy="scroll" data-offset="60"
data-target="#toc-scroll-target">
+
+		<div class="navbar navbar-fixed-top">
+			<div class="navbar-inner">
+				<div class="container">
+					<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+						<span class="icon-bar"></span>
+					</a>
+					<a class="brand" href="..">Apache Helix</a>
+					<div class="nav-collapse">
+						<ul class="nav pull-right">
+							<li><a href="index.html" title="Helix 0.6.6">Helix 0.6.6 </a></li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b
class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="download.html" title="Download">Download </a></li>
+									<li><a href="Building.html" title="Building">Building </a></li>
+									<li><a href="releasenotes/release-0.6.6.html" title="Release Notes">Release
Notes </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="Quickstart.html" title="Quick Start">Quick Start </a></li>
+									<li><a href="Tutorial.html" title="Tutorial">Tutorial </a></li>
+									<li><a href="../javadocs/0.6.6" title="Javadocs">Javadocs </a></li>
+								</ul>
+							</li>
+							<li class="dropdown">
+								<a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a>
+								<ul class="dropdown-menu">
+									<li><a href="recipes/lock_manager.html" title="Distributed lock manager">Distributed
lock manager </a></li>
+									<li><a href="recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer
group">Rabbit MQ consumer group </a></li>
+									<li><a href="recipes/rsync_replicated_file_store.html" title="Rsync replicated
file store">Rsync replicated file store </a></li>
+									<li><a href="recipes/service_discovery.html" title="Service discovery">Service
discovery </a></li>
+									<li><a href="recipes/task_dag_execution.html" title="Distributed task DAG
execution">Distributed task DAG execution </a></li>
+								</ul>
+							</li>
+						</ul>
+					</div><!--/.nav-collapse -->
+				</div>
+			</div>
+		</div>
+		
+	<div class="container">
+	
+	<!-- Masthead
+	================================================== -->
+	<header class="jumbotron subhead">
+		<div class="row" id="banner">
+			<div class="span12">
+				<div class="pull-left">
+					<a href="../" id="bannerLeft"><img src="../images/helix-logo.jpg" alt='"''"'
/></a>
+					<p class="lead">A cluster management framework for partitioned and replicated
distributed resources</p>
+				</div>
+				<div class="pull-right">
+					<a href="http://www.apache.org/" id="bannerRight"><img src="../images/feather_small.gif"
alt='"''"' /></a>
+				</div>
+			</div>
+		</div>
+		<div>
+			<ul class="breadcrumb">
+				<li><a href="../" title="Apache Helix">Apache Helix </a></li>
+				<li class="divider">/</li>
+				<li><a href="./" title="Release 0.6.6">Release 0.6.6 </a></li>
+				<li class="divider">/</li>
+				<li>  Tutorial - YAML Cluster Setup</li>
+				<li class="publishDate version-date pull-right">Last Published: 2016-11-01</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:_YAML_Cluster_Setup"><a href="./Tutorial.html">Helix
Tutorial</a>: YAML Cluster Setup</h2>
+ </div> 
+ <p>As an alternative to using Helix Admin to set up the cluster, its resources, constraints,
and the state model, Helix supports bootstrapping a cluster configuration based on a YAML
file. Below is an annotated example of such a file for a simple distributed lock manager where
a lock can only be LOCKED or RELEASED, and each lock only allows a single participant to hold
it in the LOCKED state.</p> 
+ <div class="source"> 
+  <pre>clusterName: lock-manager-custom-rebalancer # unique name for the cluster (required)
+resources:
+  - name: lock-group # unique resource name (required)
+    rebalancer: # required
+      mode: USER_DEFINED # required - USER_DEFINED means we will provide our own rebalancer
+      class: org.apache.helix.userdefinedrebalancer.LockManagerRebalancer # required for
USER_DEFINED
+    partitions:
+      count: 12 # number of partitions for the resource (default is 1)
+      replicas: 1 # number of replicas per partition (default is 1)
+    stateModel:
+      name: lock-unlock # model name (required)
+      states: [LOCKED, RELEASED, DROPPED] # the list of possible states (required if model
not built-in)
+      transitions: # the list of possible transitions (required if model not built-in)
+        - name: Unlock
+          from: LOCKED
+          to: RELEASED
+        - name: Lock
+          from: RELEASED
+          to: LOCKED
+        - name: DropLock
+          from: LOCKED
+          to: DROPPED
+        - name: DropUnlock
+          from: RELEASED
+          to: DROPPED
+        - name: Undrop
+          from: DROPPED
+          to: RELEASED
+      initialState: RELEASED # (required if model not built-in)
+    constraints:
+      state:
+        counts: # maximum number of replicas of a partition that can be in each state (required
if model not built-in)
+          - name: LOCKED
+            count: &quot;1&quot;
+          - name: RELEASED
+            count: &quot;-1&quot;
+          - name: DROPPED
+            count: &quot;-1&quot;
+        priorityList: [LOCKED, RELEASED, DROPPED] # states in order of priority (all priorities
equal if not specified)
+      transition: # transitions priority to enforce order that transitions occur
+        priorityList: [Unlock, Lock, Undrop, DropUnlock, DropLock] # all priorities equal
if not specified
+participants: # list of nodes that can serve replicas (optional if dynamic joining is active,
required otherwise)
+  - name: localhost_12001
+    host: localhost
+    port: 12001
+  - name: localhost_12002
+    host: localhost
+    port: 12002
+  - name: localhost_12003
+    host: localhost
+    port: 12003
+</pre> 
+ </div> 
+ <p>Using a file like the one above, the cluster can be set up either with the command
line:</p> 
+ <div class="source"> 
+  <pre>helix/helix-core/target/helix-core/pkg/bin/YAMLClusterSetup.sh localhost:2199
lock-manager-config.yaml
+</pre> 
+ </div> 
+ <p>or with code:</p> 
+ <div class="source"> 
+  <pre>YAMLClusterSetup setup = new YAMLClusterSetup(zkAddress);
+InputStream input =
+    Thread.currentThread().getContextClassLoader()
+        .getResourceAsStream(&quot;lock-manager-config.yaml&quot;);
+YAMLClusterSetup.YAMLClusterConfig config = setup.setupCluster(input);
+</pre> 
+ </div> 
+ <p>Some notes:</p> 
+ <ul> 
+  <li> <p>A rebalancer class is only required for the USER_DEFINED mode. It is
ignored otherwise.</p></li> 
+  <li> <p>Built-in state models, like OnlineOffline, LeaderStandby, and MasterSlave,
or state models that have already been added only require a name for stateModel. If partition
and/or replica counts are not provided, a value of 1 is assumed.</p></li> 
+ </ul> 
+</div>
+			</div>
+		</div>
+	</div>
+	</div>
+
+	</div><!-- /container -->
+	
+	<!-- Footer
+	================================================== -->
+	<footer class="well">
+		<div class="container">
+			<div class="row">
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Get Helix</li>
+						<li>
+							<a href="download.html" title="Download">Download </a>
+						</li>
+						<li>
+							<a href="Building.html" title="Building">Building </a>
+						</li>
+						<li>
+							<a href="releasenotes/release-0.6.6.html" title="Release Notes">Release Notes
</a>
+						</li>
+					</ul>
+				</div>
+				<div class="span3 bottom-nav">
+					<ul class="nav nav-list">
+						<li class="nav-header">Hands-On</li>
+						<li>
+							<a href="Quickstart.html" title="Quick Start">Quick Start </a>
+						</li>
+						<li>
+							<a href="Tutorial.html" title="Tutorial">Tutorial </a>
+						</li>
+						<li>
+							<a href="../javadocs/0.6.6" 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;2016 <a href="http://www.apache.org/">The
Apache Software Foundation</a>. All Rights Reserved.</p>
+				<p><a href="http://github.com/andriusvelykis/reflow-maven-skin" title="Reflow
Maven skin">Reflow Maven skin</a> by <a href="http://andrius.velykis.lt" target="_blank"
title="Andrius Velykis">Andrius Velykis</a>.</p>
+		
+<div class="row span16">
+  <div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project
logos are trademarks of The Apache Software Foundation.
+        All other marks mentioned may be trademarks or registered trademarks of their respective
owners.</div>
+  <a href="http://helix.apache.org/0.6.6-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="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/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

Modified: helix/site-content/0.7.0-incubating-docs/dependency-convergence.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.7.0-incubating-docs/dependency-convergence.html?rev=1767604&r1=1767603&r2=1767604&view=diff
==============================================================================
--- helix/site-content/0.7.0-incubating-docs/dependency-convergence.html (original)
+++ helix/site-content/0.7.0-incubating-docs/dependency-convergence.html Wed Nov  2 04:11:36
2016
@@ -175,7 +175,7 @@
   <thead> 
    <tr class="b"> 
     <th>Number of modules:</th> 
-    <td>8</td> 
+    <td>9</td> 
    </tr> 
   </thead> 
   <caption> 

Modified: helix/site-content/0.7.1-docs/dependency-convergence.html
URL: http://svn.apache.org/viewvc/helix/site-content/0.7.1-docs/dependency-convergence.html?rev=1767604&r1=1767603&r2=1767604&view=diff
==============================================================================
--- helix/site-content/0.7.1-docs/dependency-convergence.html (original)
+++ helix/site-content/0.7.1-docs/dependency-convergence.html Wed Nov  2 04:11:36 2016
@@ -175,7 +175,7 @@
   <thead> 
    <tr class="b"> 
     <th>Number of modules:</th> 
-    <td>8</td> 
+    <td>9</td> 
    </tr> 
   </thead> 
   <caption> 

Modified: helix/site-content/dependency-convergence.html
URL: http://svn.apache.org/viewvc/helix/site-content/dependency-convergence.html?rev=1767604&r1=1767603&r2=1767604&view=diff
==============================================================================
--- helix/site-content/dependency-convergence.html (original)
+++ helix/site-content/dependency-convergence.html Wed Nov  2 04:11:36 2016
@@ -208,7 +208,7 @@
   <thead> 
    <tr class="b"> 
     <th>Number of modules:</th> 
-    <td>8</td> 
+    <td>9</td> 
    </tr> 
   </thead> 
   <caption> 

Modified: helix/site-content/modules.html
URL: http://svn.apache.org/viewvc/helix/site-content/modules.html?rev=1767604&r1=1767603&r2=1767604&view=diff
==============================================================================
--- helix/site-content/modules.html (original)
+++ helix/site-content/modules.html Wed Nov  2 04:11:36 2016
@@ -187,10 +187,14 @@
     <td>Helix is a generic cluster management framework used for the automatic management
of partitioned, replicated and distributed resources hosted on a cluster of nodes.</td>

    </tr> 
    <tr class="a"> 
-    <td><a href="0.7.0-incubating-docs/index.html">Apache Helix :: Website ::
0.7.0-incubating</a></td> 
+    <td><a href="0.6.6-docs/index.html">Apache Helix :: Website :: 0.6.6</a></td>

     <td>Helix is a generic cluster management framework used for the automatic management
of partitioned, replicated and distributed resources hosted on a cluster of nodes.</td>

    </tr> 
    <tr class="b"> 
+    <td><a href="0.7.0-incubating-docs/index.html">Apache Helix :: Website ::
0.7.0-incubating</a></td> 
+    <td>Helix is a generic cluster management framework used for the automatic management
of partitioned, replicated and distributed resources hosted on a cluster of nodes.</td>

+   </tr> 
+   <tr class="a"> 
     <td><a href="0.7.1-docs/index.html">Apache Helix :: Website :: 0.7.1</a></td>

     <td>Helix is a generic cluster management framework used for the automatic management
of partitioned, replicated and distributed resources hosted on a cluster of nodes.</td>

    </tr> 



Mime
View raw message