Modified: helix/site-content/0.9.9-docs/recipes/service_discovery.html URL: http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/recipes/service_discovery.html?rev=1900184&r1=1900183&r2=1900184&view=diff ============================================================================== --- helix/site-content/0.9.9-docs/recipes/service_discovery.html (original) +++ helix/site-content/0.9.9-docs/recipes/service_discovery.html Sat Apr 23 04:22:15 2022 @@ -1,200 +1,329 @@ - <!DOCTYPE html> + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 - Rendered using Maven Reflow Skin 1.0.0 (http://andriusvelykis.github.com/reflow-maven-skin) + | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/markdown/recipes/service_discovery.md at 2022-04-23 + | Rendered using Apache Maven Fluido Skin 1.11.0-SNAPSHOT +--> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" /> + <title>Apache Helix – Service Discovery</title> + <link rel="stylesheet" href="../css/apache-maven-fluido-1.11.0-SNAPSHOT.min.css" /> + <link rel="stylesheet" href="../css/site.css" /> + <link rel="stylesheet" href="../css/print.css" media="print" /> + <script src="../js/apache-maven-fluido-1.11.0-SNAPSHOT.min.js"></script> +<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="topBarEnabled"> + <header id="topbar" class="navbar navbar-fixed-top "> + <div class="navbar-inner"> + <div class="container-fluid"> + <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </a> + <ul class="nav"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../download.html" title="Download">Download</a></li> + <li><a href="../Building.html" title="Building">Building</a></li> + <li><a href="../releasenotes/release-0.9.9.html" title="Release Notes">Release Notes</a></li> + </ul> + </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../Quickstart.html" title="Quick Start">Quick Start</a></li> + <li><a href="../Tutorial.html" title="Tutorial">Tutorial</a></li> + <li><a href="../../javadocs/0.9.9" title="Javadocs">Javadocs</a></li> + </ul> + </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager</a></li> + <li><a href="../recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group</a></li> + <li><a href="../recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store</a></li> + <li><a href="../recipes/service_discovery.html" title="Service discovery">Service discovery</a></li> + <li><a href="../recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution</a></li> + </ul> + </li> + </ul> + <ul class="nav pull-right"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">External Links <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../index.html" title="Helix 0.9.9">Helix 0.9.9</a></li> + </ul> + </li> + </ul> + </div> + </div> + </header> + <div class="container-fluid"> + <header> + <div id="banner"> + <div class="pull-left"><a href="http://helix.apache.org/" id="bannerLeft"><img src="../../images/helix-logo.jpg" alt=""/></a></div> + <div class="pull-right"><a href="http://www.apache.org/" id="bannerRight"><img src="../../images/feather_small.gif" alt=""/></a></div> + <div class="clear"><hr/></div> + </div> + + <div id="breadcrumbs"> + <ul class="breadcrumb"> + <li class=""><a href="http://helix.apache.org/" class="externalLink" title="Apache Helix">Apache Helix</a><span class="divider">/</span></li> + <li class=""><a href="../../" title="Apache Helix">Apache Helix</a><span class="divider">/</span></li> + <li class=""><a href=".././" title="Release 0.9.9">Release 0.9.9</a><span class="divider">/</span></li> + <li class="active ">Service Discovery</li> + <li id="publishDate" class="pull-right">Last Published: 2022-04-23</li> + </ul> + </div> + </header> + <div class="row-fluid"> + <header id="leftColumn" class="span2"> + <nav class="well sidebar-nav"> + <ul class="nav nav-list"> + <li class="nav-header">Get Helix</li> + <li><a href="../download.html" title="Download"><span class="none"></span>Download</a></li> + <li><a href="../Building.html" title="Building"><span class="none"></span>Building</a></li> + <li><a href="../releasenotes/release-0.9.9.html" title="Release Notes"><span class="none"></span>Release Notes</a></li> + <li class="nav-header">Hands-On</li> + <li><a href="../Quickstart.html" title="Quick Start"><span class="none"></span>Quick Start</a></li> + <li><a href="../Tutorial.html" title="Tutorial"><span class="none"></span>Tutorial</a></li> + <li><a href="../../javadocs/0.9.9" title="Javadocs"><span class="none"></span>Javadocs</a></li> + <li class="nav-header">Recipes</li> + <li><a href="../recipes/lock_manager.html" title="Distributed lock manager"><span class="none"></span>Distributed lock manager</a></li> + <li><a href="../recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group"><span class="none"></span>Rabbit MQ consumer group</a></li> + <li><a href="../recipes/rsync_replicated_file_store.html" title="Rsync replicated file store"><span class="none"></span>Rsync replicated file store</a></li> + <li class="active"><a href="#"><span class="none"></span>Service discovery</a></li> + <li><a href="../recipes/task_dag_execution.html" title="Distributed task DAG execution"><span class="none"></span>Distributed task DAG execution</a></li> + </ul> + </nav> + <div class="well sidebar-nav"> +<form id="search-form" action="https://www.google.com/search" method="get" > + <input value="helix.apache.org/0.9.9-docs" name="sitesearch" type="hidden"/> + <input class="search-query" name="q" id="query" type="text" /> +</form> +<script>asyncJs( 'https://cse.google.com/brand?form=search-form' )</script> + <hr /> + <div id="poweredBy"> + <div class="clear"></div> + <div id="twitter" style="border:none; margin-top: 10px"> + <a href="https://twitter.com/ApacheHelix" class="twitter-follow-button" data-show-count="false" data-align="left" data-size="medium" data-show-screen-name="true" data-lang="en">Follow ApacheHelix</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + <div class="clear"></div> + <div class="clear"></div> +<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a> + </div> + </div> + </header> + <main id="bodyColumn" class="span10" > +<!--- +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. --> -<html xml:lang="en" lang="en"> +<section> +<h2><a name="Service_Discovery"></a>Service Discovery</h2> +<p>One of the common usage of ZooKeeper is to enable service discovery. +The basic idea is that when a server starts up it advertises its configuration/metadata such as its hostname and port on ZooKeeper. +This allows clients to dynamically discover the servers that are currently active. One can think of this like a service registry to which a server registers when it starts and +is automatically deregistered when it shutdowns or crashes. In many cases it serves as an alternative to VIPs.</p> +<p>The core idea behind this is to use ZooKeeper ephemeral nodes. The ephemeral nodes are created when the server registers and all its metadata is put into a ZNode. +When the server shutdowns, ZooKeeper automatically removes this ZNode.</p> +<p>There are two ways the clients can dynamically discover the active servers:</p><section> +<h3><a name="ZooKeeper_Watch"></a>ZooKeeper Watch</h3> +<p>Clients can set a child watch under specific path on ZooKeeper. +When a new service is registered/deregistered, ZooKeeper notifies the client via a watch event and the client can read the list of services. Even though this looks trivial, +there are lot of things one needs to keep in mind like ensuring that you first set the watch back on ZooKeeper before reading data.</p></section><section> +<h3><a name="Poll"></a>Poll</h3> +<p>Another approach is for the client to periodically read the ZooKeeper path and get the list of services.</p> +<p>Both approaches have pros and cons, for example setting a watch might trigger herd effect if there are large number of clients. This is problematic, especially when servers are starting up. +But the advantage to setting watches is that clients are immediately notified of a change which is not true in case of polling. +In some cases, having both watches and polls makes sense; watch allows one to get notifications as soon as possible while poll provides a safety net if a watch event is missed because of code bug or ZooKeeper fails to notify.</p></section><section> +<h3><a name="Other_Developer_Considerations"></a>Other Developer Considerations</h3> +<ul> + +<li>What happens when the ZooKeeper session expires? All the watches and ephemeral nodes previously added or created by this server are lost. One needs to add the watches again, recreate the ephemeral nodes, and so on.</li> +<li>Due to network issues or Java GC pauses session expiry might happen again and again; this phenomenon is known as flapping. It's important for the server to detect this and deregister itself.</li> +</ul></section><section> +<h3><a name="Other_Operational_Considerations"></a>Other Operational Considerations</h3> +<ul> + +<li>What if the node is behaving badly? One might kill the server, but it will lose the ability to debug. It would be nice to have the ability to mark a server as disabled and clients know that a node is disabled and will not contact that node.</li> +</ul></section><section> +<h3><a name="Configuration_Ownership"></a>Configuration Ownership</h3> +<p>This is an important aspect that is often ignored in the initial stages of your development. Typically, the service discovery pattern means that servers start up with some configuration which it simply puts into ZooKeeper. While this works well in the beginning, configuration management becomes very difficult since the servers themselves are statically configured. Any change in server configuration implies restarting the server. Ideally, it will be nice to have the ability to change configuration dynamically without having to restart a server.</p> +<p>Ideally you want a hybrid solution, a node starts with minimal configuration and gets the rest of configuration from ZooKeeper.</p></section><section> +<h3><a name="Using_Helix_for_Service_Discovery"></a>Using Helix for Service Discovery</h3> +<p>Even though Helix has a higher-level abstraction in terms of state machines, constraints and objectives, service discovery is one of things has been a prevalent use case from the start. +The controller uses the exact mechanism we described above to discover when new servers join the cluster. We create these ZNodes under /CLUSTERNAME/LIVEINSTANCES. +Since at any time there is only one controller, we use a ZK watch to track the liveness of a server.</p> +<p>This recipe simply demonstrates how one can re-use that part for implementing service discovery. This demonstrates multiple modes of service discovery:</p> +<ul> + +<li>POLL: The client reads from zookeeper at regular intervals 30 seconds. Use this if you have 100's of clients</li> +<li>WATCH: The client sets up watcher and gets notified of the changes. Use this if you have 10's of clients</li> +<li>NONE: This does neither of the above, but reads directly from zookeeper when ever needed</li> +</ul> +<p>Helix provides these additional features compared to other implementations available elsewhere:</p> +<ul> + +<li>It has the concept of disabling a node which means that a badly behaving node can be disabled using the Helix admin API</li> +<li>It automatically detects if a node connects/disconnects from zookeeper repeatedly and disables the node</li> +<li>Configuration management +<ul> + +<li>Allows one to set configuration via the admin API at various granulaties like cluster, instance, resource, partition</li> +<li>Configurations can be dynamically changed</li> +<li>The server is notified when configurations change</li> +</ul> +</li> +</ul></section><section> +<h3><a name="Checkout_and_Build"></a>Checkout and Build</h3> + +<div class="source"><pre class="prettyprint"><code>git clone https://git-wip-us.apache.org/repos/asf/helix.git +cd helix +git checkout tags/helix-0.9.9 +mvn clean install package -DskipTests +cd recipes/service-discovery/target/service-discovery-pkg/bin +chmod +x * +</code></pre></div></section><section> +<h3><a name="Start_ZooKeeper"></a>Start ZooKeeper</h3> + +<div class="source"><pre class="prettyprint"><code>./start-standalone-zookeeper 2199 +</code></pre></div></section><section> +<h3><a name="Run_the_Demo"></a>Run the Demo</h3> + +<div class="source"><pre class="prettyprint"><code>./service-discovery-demo.sh +</code></pre></div></section><section> +<h3><a name="Output"></a>Output</h3> - <head> - <meta charset="UTF-8" /> - <title>Apache Helix – Service Discovery</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]--> - - </head> - - <body class="page-$config.fileId project-$config.projectId" 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> - <div class="nav-collapse"> - <ul class="nav pull-right"> - <li class="active"><a href="" title="Helix 0.9.9">Helix 0.9.9 </a></li> - <li class="dropdown active"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li class="active"><a href="" title="Download">Download </a></li> - <li class="active"><a href="" title="Building">Building </a></li> - <li class="active"><a href="" title="Release Notes">Release Notes </a></li> - </ul> - </li> - <li class="dropdown active"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li class="active"><a href="" title="Quick Start">Quick Start </a></li> - <li class="active"><a href="" title="Tutorial">Tutorial </a></li> - <li class="active"><a href="" title="Javadocs">Javadocs </a></li> - </ul> - </li> - <li class="dropdown active"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li class="active"><a href="" title="Distributed lock manager">Distributed lock manager </a></li> - <li class="active"><a href="" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a></li> - <li class="active"><a href="" title="Rsync replicated file store">Rsync replicated file store </a></li> - <li class="active"><a href="" title="Service discovery">Service discovery </a></li> - <li class="active"><a href="" 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="" alt='"''"' /></a> - </div> - <div class="pull-right"> - <a href="http://www.apache.org/" id="bannerRight"><img src="" alt='"''"' /></a> - </div> - </div> - </div> - <div> - <ul class="breadcrumb"> - <li><a href="" title="Apache Helix">Apache Helix </a></li> - <li class="divider">/</li> - <li><a href="" title="Release 0.9.9">Release 0.9.9 </a></li> - <li class="divider">/</li> - <li>Service Discovery</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> - </ul> - </div> - </header> - - <div class="main-body"> - <div class="row"> - <div class="span12"> - <div class="body-content"> -$bodyWithHeader - </div> - </div> - </div> - </div> - - </div><!-- /container --> - - <!-- Footer - ================================================== --> - <footer class="well"> - <div class="container"> - <div class="row"> - <div class="span9 bottom-nav"> - <ul class="nav nav-list"> - <li class="nav-header">Get Helix</li> - <li class="active"> - <a href="#" title="Download">Download </a> - </li> - <li class="active"> - <a href="#" title="Building">Building </a> - </li> - <li class="active"> - <a href="#" title="Release Notes">Release Notes </a> - </li> - <li class="nav-header">Hands-On</li> - <li class="active"> - <a href="#" title="Quick Start">Quick Start </a> - </li> - <li class="active"> - <a href="#" title="Tutorial">Tutorial </a> - </li> - <li class="active"> - <a href="#" title="Javadocs">Javadocs </a> - </li> - <li class="nav-header">Recipes</li> - <li class="active"> - <a href="#" title="Distributed lock manager">Distributed lock manager </a> - </li> - <li class="active"> - <a href="#" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a> - </li> - <li class="active"> - <a href="#" title="Rsync replicated file store">Rsync replicated file store </a> - </li> - <li class="active"> - <a href="#" title="Service discovery">Service discovery </a> - </li> - <li class="active"> - <a href="#" 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 ©2022 <a href="https://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> - </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> +<div class="source"><pre class="prettyprint"><code>START:Service discovery demo mode:WATCH + Registering service + host.x.y.z_12000 + host.x.y.z_12001 + host.x.y.z_12002 + host.x.y.z_12003 + host.x.y.z_12004 + SERVICES AVAILABLE + SERVICENAME HOST PORT + myServiceName host.x.y.z 12000 + myServiceName host.x.y.z 12001 + myServiceName host.x.y.z 12002 + myServiceName host.x.y.z 12003 + myServiceName host.x.y.z 12004 + Deregistering service: + host.x.y.z_12002 + SERVICES AVAILABLE + SERVICENAME HOST PORT + myServiceName host.x.y.z 12000 + myServiceName host.x.y.z 12001 + myServiceName host.x.y.z 12003 + myServiceName host.x.y.z 12004 + Registering service:host.x.y.z_12002 +END:Service discovery demo mode:WATCH +============================================= +START:Service discovery demo mode:POLL + Registering service + host.x.y.z_12000 + host.x.y.z_12001 + host.x.y.z_12002 + host.x.y.z_12003 + host.x.y.z_12004 + SERVICES AVAILABLE + SERVICENAME HOST PORT + myServiceName host.x.y.z 12000 + myServiceName host.x.y.z 12001 + myServiceName host.x.y.z 12002 + myServiceName host.x.y.z 12003 + myServiceName host.x.y.z 12004 + Deregistering service: + host.x.y.z_12002 + Sleeping for poll interval:30000 + SERVICES AVAILABLE + SERVICENAME HOST PORT + myServiceName host.x.y.z 12000 + myServiceName host.x.y.z 12001 + myServiceName host.x.y.z 12003 + myServiceName host.x.y.z 12004 + Registering service:host.x.y.z_12002 +END:Service discovery demo mode:POLL +============================================= +START:Service discovery demo mode:NONE + Registering service + host.x.y.z_12000 + host.x.y.z_12001 + host.x.y.z_12002 + host.x.y.z_12003 + host.x.y.z_12004 + SERVICES AVAILABLE + SERVICENAME HOST PORT + myServiceName host.x.y.z 12000 + myServiceName host.x.y.z 12001 + myServiceName host.x.y.z 12002 + myServiceName host.x.y.z 12003 + myServiceName host.x.y.z 12004 + Deregistering service: + host.x.y.z_12000 + SERVICES AVAILABLE + SERVICENAME HOST PORT + myServiceName host.x.y.z 12001 + myServiceName host.x.y.z 12002 + myServiceName host.x.y.z 12003 + myServiceName host.x.y.z 12004 + Registering service:host.x.y.z_12000 +END:Service discovery demo mode:NONE +============================================= +</code></pre></div></section></section> + </main> + </div> + </div> + <hr/> + <footer> + <div class="container-fluid"> + <div class="row-fluid"> +<div class="row span16"><div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation. + All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div> + <a href="https://helix.apache.org/0.9.9-docs/privacy-policy.html">Privacy Policy</a> + </div> + </div> + </div> + </footer> +<script> + if(anchors) { + anchors.add(); + } +</script> + </body> </html> \ No newline at end of file
Modified: helix/site-content/0.9.9-docs/recipes/task_dag_execution.html URL: http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/recipes/task_dag_execution.html?rev=1900184&r1=1900183&r2=1900184&view=diff ============================================================================== --- helix/site-content/0.9.9-docs/recipes/task_dag_execution.html (original) +++ helix/site-content/0.9.9-docs/recipes/task_dag_execution.html Sat Apr 23 04:22:15 2022 @@ -1,200 +1,363 @@ - <!DOCTYPE html> + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 - Rendered using Maven Reflow Skin 1.0.0 (http://andriusvelykis.github.com/reflow-maven-skin) + | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/markdown/recipes/task_dag_execution.md at 2022-04-23 + | Rendered using Apache Maven Fluido Skin 1.11.0-SNAPSHOT +--> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" /> + <title>Apache Helix – Distributed Task Execution</title> + <link rel="stylesheet" href="../css/apache-maven-fluido-1.11.0-SNAPSHOT.min.css" /> + <link rel="stylesheet" href="../css/site.css" /> + <link rel="stylesheet" href="../css/print.css" media="print" /> + <script src="../js/apache-maven-fluido-1.11.0-SNAPSHOT.min.js"></script> +<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="topBarEnabled"> + <header id="topbar" class="navbar navbar-fixed-top "> + <div class="navbar-inner"> + <div class="container-fluid"> + <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </a> + <ul class="nav"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../download.html" title="Download">Download</a></li> + <li><a href="../Building.html" title="Building">Building</a></li> + <li><a href="../releasenotes/release-0.9.9.html" title="Release Notes">Release Notes</a></li> + </ul> + </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../Quickstart.html" title="Quick Start">Quick Start</a></li> + <li><a href="../Tutorial.html" title="Tutorial">Tutorial</a></li> + <li><a href="../../javadocs/0.9.9" title="Javadocs">Javadocs</a></li> + </ul> + </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager</a></li> + <li><a href="../recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group</a></li> + <li><a href="../recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store</a></li> + <li><a href="../recipes/service_discovery.html" title="Service discovery">Service discovery</a></li> + <li><a href="../recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution</a></li> + </ul> + </li> + </ul> + <ul class="nav pull-right"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">External Links <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../index.html" title="Helix 0.9.9">Helix 0.9.9</a></li> + </ul> + </li> + </ul> + </div> + </div> + </header> + <div class="container-fluid"> + <header> + <div id="banner"> + <div class="pull-left"><a href="http://helix.apache.org/" id="bannerLeft"><img src="../../images/helix-logo.jpg" alt=""/></a></div> + <div class="pull-right"><a href="http://www.apache.org/" id="bannerRight"><img src="../../images/feather_small.gif" alt=""/></a></div> + <div class="clear"><hr/></div> + </div> + + <div id="breadcrumbs"> + <ul class="breadcrumb"> + <li class=""><a href="http://helix.apache.org/" class="externalLink" title="Apache Helix">Apache Helix</a><span class="divider">/</span></li> + <li class=""><a href="../../" title="Apache Helix">Apache Helix</a><span class="divider">/</span></li> + <li class=""><a href=".././" title="Release 0.9.9">Release 0.9.9</a><span class="divider">/</span></li> + <li class="active ">Distributed Task Execution</li> + <li id="publishDate" class="pull-right">Last Published: 2022-04-23</li> + </ul> + </div> + </header> + <div class="row-fluid"> + <header id="leftColumn" class="span2"> + <nav class="well sidebar-nav"> + <ul class="nav nav-list"> + <li class="nav-header">Get Helix</li> + <li><a href="../download.html" title="Download"><span class="none"></span>Download</a></li> + <li><a href="../Building.html" title="Building"><span class="none"></span>Building</a></li> + <li><a href="../releasenotes/release-0.9.9.html" title="Release Notes"><span class="none"></span>Release Notes</a></li> + <li class="nav-header">Hands-On</li> + <li><a href="../Quickstart.html" title="Quick Start"><span class="none"></span>Quick Start</a></li> + <li><a href="../Tutorial.html" title="Tutorial"><span class="none"></span>Tutorial</a></li> + <li><a href="../../javadocs/0.9.9" title="Javadocs"><span class="none"></span>Javadocs</a></li> + <li class="nav-header">Recipes</li> + <li><a href="../recipes/lock_manager.html" title="Distributed lock manager"><span class="none"></span>Distributed lock manager</a></li> + <li><a href="../recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group"><span class="none"></span>Rabbit MQ consumer group</a></li> + <li><a href="../recipes/rsync_replicated_file_store.html" title="Rsync replicated file store"><span class="none"></span>Rsync replicated file store</a></li> + <li><a href="../recipes/service_discovery.html" title="Service discovery"><span class="none"></span>Service discovery</a></li> + <li class="active"><a href="#"><span class="none"></span>Distributed task DAG execution</a></li> + </ul> + </nav> + <div class="well sidebar-nav"> +<form id="search-form" action="https://www.google.com/search" method="get" > + <input value="helix.apache.org/0.9.9-docs" name="sitesearch" type="hidden"/> + <input class="search-query" name="q" id="query" type="text" /> +</form> +<script>asyncJs( 'https://cse.google.com/brand?form=search-form' )</script> + <hr /> + <div id="poweredBy"> + <div class="clear"></div> + <div id="twitter" style="border:none; margin-top: 10px"> + <a href="https://twitter.com/ApacheHelix" class="twitter-follow-button" data-show-count="false" data-align="left" data-size="medium" data-show-screen-name="true" data-lang="en">Follow ApacheHelix</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + <div class="clear"></div> + <div class="clear"></div> +<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a> + </div> + </div> + </header> + <main id="bodyColumn" class="span10" > +<!--- +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. --> -<html xml:lang="en" lang="en"> +<section> +<h2><a name="Distributed_Task_Execution"></a>Distributed Task Execution</h2> +<p>This recipe is intended to demonstrate how task dependencies can be modeled using primitives provided by Helix. A given task can be run with the desired amount of parallelism and will start only when upstream dependencies are met. The demo executes the task DAG described below using 10 workers. Although the demo starts the workers as threads, there is no requirement that all the workers need to run in the same process. In reality, these workers run on many different boxes on a cluster. When worker fails, Helix takes care of re-assigning a failed task partition to a new worker.</p> +<p>Redis is used as a result store. Any other suitable implementation for TaskResultStore can be plugged in.</p><section> +<h3><a name="Workflow"></a>Workflow</h3><section> +<h4><a name="Input"></a>Input</h4> +<p>10000 impression events and around 100 click events are pre-populated in task result store (redis).</p> +<ul> + +<li> + +<p><b>ImpEvent</b>: format: id,isFraudulent,country,gender</p> +</li> +<li> + +<p><b>ClickEvent</b>: format: id,isFraudulent,impEventId</p> +</li> +</ul></section><section> +<h4><a name="Stages"></a>Stages</h4> +<ul> + +<li> + +<p><b>FilterImps</b>: Filters impression where isFraudulent=true.</p> +</li> +<li> + +<p><b>FilterClicks</b>: Filters clicks where isFraudulent=true</p> +</li> +<li> + +<p><b>impCountsByGender</b>: Generates impression counts grouped by gender. It does this by incrementing the count for ‘impression_gender_counts:<gender_value>’ in the task result store (redis hash). Depends on: <b>FilterImps</b></p> +</li> +<li> + +<p><b>impCountsByCountry</b>: Generates impression counts grouped by country. It does this by incrementing the count for ‘impression_country_counts:<country_value>’ in the task result store (redis hash). Depends on: <b>FilterClicks</b></p> +</li> +<li> + +<p><b>impClickJoin</b>: Joins clicks with corresponding impression event using impEventId as the join key. Join is needed to pull dimensions not present in click event. Depends on: <b>FilterImps, FilterClicks</b></p> +</li> +<li> + +<p><b>clickCountsByGender</b>: Generates click counts grouped by gender. It does this by incrementing the count for click_gender_counts:<gender_value> in the task result store (redis hash). Depends on: <b>impClickJoin</b></p> +</li> +<li> + +<p><b>clickCountsByGender</b>: Generates click counts grouped by country. It does this by incrementing the count for click_country_counts:<country_value> in the task result store (redis hash). Depends on: <b>impClickJoin</b></p> +</li> +<li> + +<p><b>report</b>: Reads from all aggregates generated by previous stages and prints them. Depends on: <b>impCountsByGender, impCountsByCountry, clickCountsByGender,clickCountsByGender</b></p> +</li> +</ul></section></section><section> +<h3><a name="Creating_a_DAG"></a>Creating a DAG</h3> +<p>Each stage is represented as a Node along with the upstream dependency and desired parallelism. Each stage is modeled as a resource in Helix using OnlineOffline state model. As part of an Offline to Online transition, we watch the external view of upstream resources and wait for them to transition to the online state. See Task.java for additional info.</p> + +<div class="source"><pre class="prettyprint"><code>Dag dag = new Dag(); +dag.addNode(new Node("filterImps", 10, "")); +dag.addNode(new Node("filterClicks", 5, "")); +dag.addNode(new Node("impClickJoin", 10, "filterImps,filterClicks")); +dag.addNode(new Node("impCountsByGender", 10, "filterImps")); +dag.addNode(new Node("impCountsByCountry", 10, "filterImps")); +dag.addNode(new Node("clickCountsByGender", 5, "impClickJoin")); +dag.addNode(new Node("clickCountsByCountry", 5, "impClickJoin")); +dag.addNode(new Node("report",1,"impCountsByGender,impCountsByCountry,clickCountsByGender,clickCountsByCountry")); +</code></pre></div></section><section> +<h3><a name="Demo"></a>Demo</h3> +<p>In order to run the demo, use the following steps</p> +<p>See <a class="externalLink" href="http://redis.io/topics/quickstart">http://redis.io/topics/quickstart</a> on how to install redis server</p> + +<div class="source"><pre class="prettyprint"><code>Start redis e.g: +./redis-server --port 6379 + +git clone https://git-wip-us.apache.org/repos/asf/helix.git +cd helix +git checkout helix-0.9.9 +cd recipes/task-execution +mvn clean install package -DskipTests +cd target/task-execution-pkg/bin +chmod +x task-execution-demo.sh +./task-execution-demo.sh 2181 localhost 6379 + +</code></pre></div> +<p>Here's a visual representation of the DAG.</p> + +<div class="source"><pre class="prettyprint"><code> + + + + + +-----------------+ +----------------+ + | filterImps | | filterClicks | + | (parallelism=10)| | (parallelism=5)| + +----------+-----++ +-------+--------+ + | | | | + | | | | + | | | | + | | +------->--------v------------+ + +--------------<-+ +------v-------+ | impClickJoin | + |impCountsByGender |impCountsByCountry | (parallelism=10) | + |(parallelism=10) |(parallelism=10) ++-------------------+-+ + +-----------+--+ +---+----------+ | | + | | | | + | | | | + | | +--------v---------+ +-v-------------------+ + | | |clickCountsByGender |clickCountsByCountry | + | | |(parallelism=5) | |(parallelism=5) | + | | +----+-------------+ +---------------------+ + | | | | + | | | | + | | | | + +----->+-----+>-----------v----+<---------------+ + | report | + |(parallelism=1) | + +-----------------------+ + +</code></pre></div> +<p>(credit for above ascii art: <a class="externalLink" href="http://www.asciiflow.com">http://www.asciiflow.com</a>)</p><section> +<h4><a name="Output"></a>Output</h4> - <head> - <meta charset="UTF-8" /> - <title>Apache Helix – Distributed Task Execution</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]--> - - </head> - - <body class="page-$config.fileId project-$config.projectId" 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> - <div class="nav-collapse"> - <ul class="nav pull-right"> - <li class="active"><a href="" title="Helix 0.9.9">Helix 0.9.9 </a></li> - <li class="dropdown active"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li class="active"><a href="" title="Download">Download </a></li> - <li class="active"><a href="" title="Building">Building </a></li> - <li class="active"><a href="" title="Release Notes">Release Notes </a></li> - </ul> - </li> - <li class="dropdown active"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li class="active"><a href="" title="Quick Start">Quick Start </a></li> - <li class="active"><a href="" title="Tutorial">Tutorial </a></li> - <li class="active"><a href="" title="Javadocs">Javadocs </a></li> - </ul> - </li> - <li class="dropdown active"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li class="active"><a href="" title="Distributed lock manager">Distributed lock manager </a></li> - <li class="active"><a href="" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a></li> - <li class="active"><a href="" title="Rsync replicated file store">Rsync replicated file store </a></li> - <li class="active"><a href="" title="Service discovery">Service discovery </a></li> - <li class="active"><a href="" 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="" alt='"''"' /></a> - </div> - <div class="pull-right"> - <a href="http://www.apache.org/" id="bannerRight"><img src="" alt='"''"' /></a> - </div> - </div> - </div> - <div> - <ul class="breadcrumb"> - <li><a href="" title="Apache Helix">Apache Helix </a></li> - <li class="divider">/</li> - <li><a href="" title="Release 0.9.9">Release 0.9.9 </a></li> - <li class="divider">/</li> - <li>Distributed Task Execution</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> - </ul> - </div> - </header> - - <div class="main-body"> - <div class="row"> - <div class="span12"> - <div class="body-content"> -$bodyWithHeader - </div> - </div> - </div> - </div> - - </div><!-- /container --> - - <!-- Footer - ================================================== --> - <footer class="well"> - <div class="container"> - <div class="row"> - <div class="span9 bottom-nav"> - <ul class="nav nav-list"> - <li class="nav-header">Get Helix</li> - <li class="active"> - <a href="#" title="Download">Download </a> - </li> - <li class="active"> - <a href="#" title="Building">Building </a> - </li> - <li class="active"> - <a href="#" title="Release Notes">Release Notes </a> - </li> - <li class="nav-header">Hands-On</li> - <li class="active"> - <a href="#" title="Quick Start">Quick Start </a> - </li> - <li class="active"> - <a href="#" title="Tutorial">Tutorial </a> - </li> - <li class="active"> - <a href="#" title="Javadocs">Javadocs </a> - </li> - <li class="nav-header">Recipes</li> - <li class="active"> - <a href="#" title="Distributed lock manager">Distributed lock manager </a> - </li> - <li class="active"> - <a href="#" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a> - </li> - <li class="active"> - <a href="#" title="Rsync replicated file store">Rsync replicated file store </a> - </li> - <li class="active"> - <a href="#" title="Service discovery">Service discovery </a> - </li> - <li class="active"> - <a href="#" 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 ©2022 <a href="https://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> - </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> +<div class="source"><pre class="prettyprint"><code>Done populating dummy data +Executing filter task for filterImps_3 for impressions_demo +Executing filter task for filterImps_2 for impressions_demo +Executing filter task for filterImps_0 for impressions_demo +Executing filter task for filterImps_1 for impressions_demo +Executing filter task for filterImps_4 for impressions_demo +Executing filter task for filterClicks_3 for clicks_demo +Executing filter task for filterClicks_1 for clicks_demo +Executing filter task for filterImps_8 for impressions_demo +Executing filter task for filterImps_6 for impressions_demo +Executing filter task for filterClicks_2 for clicks_demo +Executing filter task for filterClicks_0 for clicks_demo +Executing filter task for filterImps_7 for impressions_demo +Executing filter task for filterImps_5 for impressions_demo +Executing filter task for filterClicks_4 for clicks_demo +Executing filter task for filterImps_9 for impressions_demo +Running AggTask for impCountsByGender_3 for filtered_impressions_demo gender +Running AggTask for impCountsByGender_2 for filtered_impressions_demo gender +Running AggTask for impCountsByGender_0 for filtered_impressions_demo gender +Running AggTask for impCountsByGender_9 for filtered_impressions_demo gender +Running AggTask for impCountsByGender_1 for filtered_impressions_demo gender +Running AggTask for impCountsByGender_4 for filtered_impressions_demo gender +Running AggTask for impCountsByCountry_4 for filtered_impressions_demo country +Running AggTask for impCountsByGender_5 for filtered_impressions_demo gender +Executing JoinTask for impClickJoin_2 +Running AggTask for impCountsByCountry_3 for filtered_impressions_demo country +Running AggTask for impCountsByCountry_1 for filtered_impressions_demo country +Running AggTask for impCountsByCountry_0 for filtered_impressions_demo country +Running AggTask for impCountsByCountry_2 for filtered_impressions_demo country +Running AggTask for impCountsByGender_6 for filtered_impressions_demo gender +Executing JoinTask for impClickJoin_1 +Executing JoinTask for impClickJoin_0 +Executing JoinTask for impClickJoin_3 +Running AggTask for impCountsByGender_8 for filtered_impressions_demo gender +Executing JoinTask for impClickJoin_4 +Running AggTask for impCountsByGender_7 for filtered_impressions_demo gender +Running AggTask for impCountsByCountry_5 for filtered_impressions_demo country +Running AggTask for impCountsByCountry_6 for filtered_impressions_demo country +Executing JoinTask for impClickJoin_9 +Running AggTask for impCountsByCountry_8 for filtered_impressions_demo country +Running AggTask for impCountsByCountry_7 for filtered_impressions_demo country +Executing JoinTask for impClickJoin_5 +Executing JoinTask for impClickJoin_6 +Running AggTask for impCountsByCountry_9 for filtered_impressions_demo country +Executing JoinTask for impClickJoin_8 +Executing JoinTask for impClickJoin_7 +Running AggTask for clickCountsByCountry_1 for joined_clicks_demo country +Running AggTask for clickCountsByCountry_0 for joined_clicks_demo country +Running AggTask for clickCountsByCountry_2 for joined_clicks_demo country +Running AggTask for clickCountsByCountry_3 for joined_clicks_demo country +Running AggTask for clickCountsByGender_1 for joined_clicks_demo gender +Running AggTask for clickCountsByCountry_4 for joined_clicks_demo country +Running AggTask for clickCountsByGender_3 for joined_clicks_demo gender +Running AggTask for clickCountsByGender_2 for joined_clicks_demo gender +Running AggTask for clickCountsByGender_4 for joined_clicks_demo gender +Running AggTask for clickCountsByGender_0 for joined_clicks_demo gender +Running reports task +Impression counts per country +{CANADA=1940, US=1958, CHINA=2014, UNKNOWN=2022, UK=1946} +Click counts per country +{US=24, CANADA=14, CHINA=26, UNKNOWN=14, UK=22} +Impression counts per gender +{F=3325, UNKNOWN=3259, M=3296} +Click counts per gender +{F=33, UNKNOWN=32, M=35} +</code></pre></div></section></section></section> + </main> + </div> + </div> + <hr/> + <footer> + <div class="container-fluid"> + <div class="row-fluid"> +<div class="row span16"><div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation. + All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div> + <a href="https://helix.apache.org/0.9.9-docs/privacy-policy.html">Privacy Policy</a> + </div> + </div> + </div> + </footer> +<script> + if(anchors) { + anchors.add(); + } +</script> + </body> </html> \ No newline at end of file Modified: helix/site-content/0.9.9-docs/releasenotes/release-0.9.9.html URL: http://svn.apache.org/viewvc/helix/site-content/0.9.9-docs/releasenotes/release-0.9.9.html?rev=1900184&r1=1900183&r2=1900184&view=diff ============================================================================== --- helix/site-content/0.9.9-docs/releasenotes/release-0.9.9.html (original) +++ helix/site-content/0.9.9-docs/releasenotes/release-0.9.9.html Sat Apr 23 04:22:15 2022 @@ -1,200 +1,175 @@ - <!DOCTYPE html> + + <!-- - Generated by Apache Maven Doxia at 2022-04-23 - Rendered using Maven Reflow Skin 1.0.0 (http://andriusvelykis.github.com/reflow-maven-skin) + | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/apt/releasenotes/release-0.9.9.apt at 2022-04-23 + | Rendered using Apache Maven Fluido Skin 1.11.0-SNAPSHOT --> -<html xml:lang="en" lang="en"> - - <head> - <meta charset="UTF-8" /> - <title>Apache Helix – Release Notes for Apache Helix 0.9.9</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]--> - - </head> - - <body class="page-$config.fileId project-$config.projectId" 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> - <div class="nav-collapse"> - <ul class="nav pull-right"> - <li class="active"><a href="" title="Helix 0.9.9">Helix 0.9.9 </a></li> - <li class="dropdown active"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li class="active"><a href="" title="Download">Download </a></li> - <li class="active"><a href="" title="Building">Building </a></li> - <li class="active"><a href="" title="Release Notes">Release Notes </a></li> - </ul> - </li> - <li class="dropdown active"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li class="active"><a href="" title="Quick Start">Quick Start </a></li> - <li class="active"><a href="" title="Tutorial">Tutorial </a></li> - <li class="active"><a href="" title="Javadocs">Javadocs </a></li> - </ul> - </li> - <li class="dropdown active"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li class="active"><a href="" title="Distributed lock manager">Distributed lock manager </a></li> - <li class="active"><a href="" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a></li> - <li class="active"><a href="" title="Rsync replicated file store">Rsync replicated file store </a></li> - <li class="active"><a href="" title="Service discovery">Service discovery </a></li> - <li class="active"><a href="" 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="" alt='"''"' /></a> - </div> - <div class="pull-right"> - <a href="http://www.apache.org/" id="bannerRight"><img src="" alt='"''"' /></a> - </div> - </div> - </div> - <div> - <ul class="breadcrumb"> - <li><a href="" title="Apache Helix">Apache Helix </a></li> - <li class="divider">/</li> - <li><a href="" title="Release 0.9.9">Release 0.9.9 </a></li> - <li class="divider">/</li> - <li>Release Notes for Apache Helix 0.9.9</li> - <li class="publishDate version-date pull-right">Last Published: 2022-04-23</li> - </ul> - </div> - </header> - - <div class="main-body"> - <div class="row"> - <div class="span12"> - <div class="body-content"> -$bodyWithHeader - </div> - </div> - </div> - </div> - - </div><!-- /container --> - - <!-- Footer - ================================================== --> - <footer class="well"> - <div class="container"> - <div class="row"> - <div class="span9 bottom-nav"> - <ul class="nav nav-list"> - <li class="nav-header">Get Helix</li> - <li class="active"> - <a href="#" title="Download">Download </a> - </li> - <li class="active"> - <a href="#" title="Building">Building </a> - </li> - <li class="active"> - <a href="#" title="Release Notes">Release Notes </a> - </li> - <li class="nav-header">Hands-On</li> - <li class="active"> - <a href="#" title="Quick Start">Quick Start </a> - </li> - <li class="active"> - <a href="#" title="Tutorial">Tutorial </a> - </li> - <li class="active"> - <a href="#" title="Javadocs">Javadocs </a> - </li> - <li class="nav-header">Recipes</li> - <li class="active"> - <a href="#" title="Distributed lock manager">Distributed lock manager </a> - </li> - <li class="active"> - <a href="#" title="Rabbit MQ consumer group">Rabbit MQ consumer group </a> - </li> - <li class="active"> - <a href="#" title="Rsync replicated file store">Rsync replicated file store </a> - </li> - <li class="active"> - <a href="#" title="Service discovery">Service discovery </a> - </li> - <li class="active"> - <a href="#" 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 ©2022 <a href="https://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> - </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 xmlns="http://www.w3.org/1999/xhtml" lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" /> + <title>Apache Helix – Release Notes for Apache Helix 0.9.9</title> + <link rel="stylesheet" href="../css/apache-maven-fluido-1.11.0-SNAPSHOT.min.css" /> + <link rel="stylesheet" href="../css/site.css" /> + <link rel="stylesheet" href="../css/print.css" media="print" /> + <script src="../js/apache-maven-fluido-1.11.0-SNAPSHOT.min.js"></script> +<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="topBarEnabled"> + <header id="topbar" class="navbar navbar-fixed-top "> + <div class="navbar-inner"> + <div class="container-fluid"> + <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </a> + <ul class="nav"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Helix <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../download.html" title="Download">Download</a></li> + <li><a href="../Building.html" title="Building">Building</a></li> + <li><a href="../releasenotes/release-0.9.9.html" title="Release Notes">Release Notes</a></li> + </ul> + </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hands-On <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../Quickstart.html" title="Quick Start">Quick Start</a></li> + <li><a href="../Tutorial.html" title="Tutorial">Tutorial</a></li> + <li><a href="../../javadocs/0.9.9" title="Javadocs">Javadocs</a></li> + </ul> + </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Recipes <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../recipes/lock_manager.html" title="Distributed lock manager">Distributed lock manager</a></li> + <li><a href="../recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group">Rabbit MQ consumer group</a></li> + <li><a href="../recipes/rsync_replicated_file_store.html" title="Rsync replicated file store">Rsync replicated file store</a></li> + <li><a href="../recipes/service_discovery.html" title="Service discovery">Service discovery</a></li> + <li><a href="../recipes/task_dag_execution.html" title="Distributed task DAG execution">Distributed task DAG execution</a></li> + </ul> + </li> + </ul> + <ul class="nav pull-right"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">External Links <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="../index.html" title="Helix 0.9.9">Helix 0.9.9</a></li> + </ul> + </li> + </ul> + </div> + </div> + </header> + <div class="container-fluid"> + <header> + <div id="banner"> + <div class="pull-left"><a href="http://helix.apache.org/" id="bannerLeft"><img src="../../images/helix-logo.jpg" alt=""/></a></div> + <div class="pull-right"><a href="http://www.apache.org/" id="bannerRight"><img src="../../images/feather_small.gif" alt=""/></a></div> + <div class="clear"><hr/></div> + </div> + + <div id="breadcrumbs"> + <ul class="breadcrumb"> + <li class=""><a href="http://helix.apache.org/" class="externalLink" title="Apache Helix">Apache Helix</a><span class="divider">/</span></li> + <li class=""><a href="../../" title="Apache Helix">Apache Helix</a><span class="divider">/</span></li> + <li class=""><a href=".././" title="Release 0.9.9">Release 0.9.9</a><span class="divider">/</span></li> + <li class="active ">Release Notes for Apache Helix 0.9.9</li> + <li id="publishDate" class="pull-right">Last Published: 2022-04-23</li> + </ul> + </div> + </header> + <div class="row-fluid"> + <header id="leftColumn" class="span2"> + <nav class="well sidebar-nav"> + <ul class="nav nav-list"> + <li class="nav-header">Get Helix</li> + <li><a href="../download.html" title="Download"><span class="none"></span>Download</a></li> + <li><a href="../Building.html" title="Building"><span class="none"></span>Building</a></li> + <li class="active"><a href="#"><span class="none"></span>Release Notes</a></li> + <li class="nav-header">Hands-On</li> + <li><a href="../Quickstart.html" title="Quick Start"><span class="none"></span>Quick Start</a></li> + <li><a href="../Tutorial.html" title="Tutorial"><span class="none"></span>Tutorial</a></li> + <li><a href="../../javadocs/0.9.9" title="Javadocs"><span class="none"></span>Javadocs</a></li> + <li class="nav-header">Recipes</li> + <li><a href="../recipes/lock_manager.html" title="Distributed lock manager"><span class="none"></span>Distributed lock manager</a></li> + <li><a href="../recipes/rabbitmq_consumer_group.html" title="Rabbit MQ consumer group"><span class="none"></span>Rabbit MQ consumer group</a></li> + <li><a href="../recipes/rsync_replicated_file_store.html" title="Rsync replicated file store"><span class="none"></span>Rsync replicated file store</a></li> + <li><a href="../recipes/service_discovery.html" title="Service discovery"><span class="none"></span>Service discovery</a></li> + <li><a href="../recipes/task_dag_execution.html" title="Distributed task DAG execution"><span class="none"></span>Distributed task DAG execution</a></li> + </ul> + </nav> + <div class="well sidebar-nav"> +<form id="search-form" action="https://www.google.com/search" method="get" > + <input value="helix.apache.org/0.9.9-docs" name="sitesearch" type="hidden"/> + <input class="search-query" name="q" id="query" type="text" /> +</form> +<script>asyncJs( 'https://cse.google.com/brand?form=search-form' )</script> + <hr /> + <div id="poweredBy"> + <div class="clear"></div> + <div id="twitter" style="border:none; margin-top: 10px"> + <a href="https://twitter.com/ApacheHelix" class="twitter-follow-button" data-show-count="false" data-align="left" data-size="medium" data-show-screen-name="true" data-lang="en">Follow ApacheHelix</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + <div class="clear"></div> + <div class="clear"></div> +<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a> + </div> + </div> + </header> + <main id="bodyColumn" class="span10" > +<section> +<h2><a name="Release_Notes_for_Apache_Helix_0.9.9"></a>Release Notes for Apache Helix 0.9.9</h2> +<p>The Apache Helix team would like to announce the release of Apache Helix 0.9.9.</p> +<p>This is the twenty-third release under the Apache umbrella, and the nineteenth as a top-level project.</p> +<p>Helix is a generic cluster management framework used for the automatic management of partitioned, replicated and distributed resources hosted on a cluster of nodes.</p><section> +<h3><a name="Key_Note_for_Helix_Release"></a>Key Note for Helix Release</h3> +<p>In this release, there are three type of configuration for ZK write limitations:</p> +<ul> +<li>jute.maxbuffer: This used to be consistent with jute maxbuffer set for ZkClient. So if your data size is over this value, write is not allowed.</li> +<li>zk.serializer.znrecord.write.size.limit.bytes: If the ZNode size is larger than the value you set (even after compression), the data will NOT be written to ZK at ZNRecorderSerializer level. Default is 1MB</li> +<li>zk.serializer.znrecord.auto-compress.threshold.bytes: If the ZNode size is larger than the value you set, compression will be applied for this ZNode.</li></ul></section><section> +<h3><a name="Detailed_Changes"></a>Detailed Changes</h3><section> +<h4><a name="Improvements"></a>Improvements</h4> +<ul> +<li>Add separate ZK serializer configuration to active ZNRecord compression when size exceeds a threshold. #1901</li> +<li>Validate data write size limit in ZkClient #1072</li></ul></section></section></section><section> +<h2><a name="Cheers.2C_--_The_Apache_Helix_Team"></a>Cheers, -- The Apache Helix Team</h2></section> + </main> + </div> + </div> + <hr/> + <footer> + <div class="container-fluid"> + <div class="row-fluid"> +<div class="row span16"><div>Apache Helix, Apache, the Apache feather logo, and the Apache Helix project logos are trademarks of The Apache Software Foundation. + All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div> + <a href="https://helix.apache.org/0.9.9-docs/privacy-policy.html">Privacy Policy</a> + </div> + </div> + </div> + </footer> +<script> + if(anchors) { + anchors.add(); + } +</script> + </body> </html> \ No newline at end of file
