You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by dl...@apache.org on 2015/05/29 20:13:45 UTC

svn commit: r1682527 [1/3] - in /mesos/site: publish/ publish/documentation/allocation-module/ publish/documentation/configuration/ publish/documentation/latest/allocation-module/ publish/documentation/latest/configuration/ publish/documentation/latest...

Author: dlester
Date: Fri May 29 18:13:44 2015
New Revision: 1682527

URL: http://svn.apache.org/r1682527
Log:
Update Mesos documentation.

Modified:
    mesos/site/publish/documentation/allocation-module/index.html
    mesos/site/publish/documentation/configuration/index.html
    mesos/site/publish/documentation/latest/allocation-module/index.html
    mesos/site/publish/documentation/latest/configuration/index.html
    mesos/site/publish/documentation/latest/modules/index.html
    mesos/site/publish/documentation/modules/index.html
    mesos/site/publish/sitemap.xml
    mesos/site/source/documentation/latest/allocation-module.md
    mesos/site/source/documentation/latest/configuration.md
    mesos/site/source/documentation/latest/modules.md

Modified: mesos/site/publish/documentation/allocation-module/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/allocation-module/index.html?rev=1682527&r1=1682526&r2=1682527&view=diff
==============================================================================
--- mesos/site/publish/documentation/allocation-module/index.html (original)
+++ mesos/site/publish/documentation/allocation-module/index.html Fri May 29 18:13:44 2015
@@ -83,124 +83,70 @@
 	<div class="col-md-8">
 		<h1>Mesos Allocation Module</h1>
 
-<p>The logic that the Mesos master uses to determine which frameworks to make offer resource offers to is encapsulated in the Master&rsquo;s <em>allocation module</em>.  The allocation module is a pluggable component that organizations can use to implement their own sharing policy, e.g. fair-sharing, Dominant Resource Fairness (see <a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2010/EECS-2010-55.pdf">the DRF paper</a>), priority, etc.</p>
+<p>The logic that the Mesos master uses to determine which frameworks to make resource offers to is encapsulated in the Master&rsquo;s <em>allocator module</em>. The allocator is a pluggable component that organizations can use to implement their own sharing policy, e.g. fair-sharing, priority, etc., or tune the default hierarchical Dominant Resource Fairness algorithm (see <a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2010/EECS-2010-55.pdf">the DRF paper</a>).</p>
 
-<h2>Allocation Module API</h2>
+<p>To use a custom allocator in Mesos, one must:</p>
 
-<p>Mesos is implemented in C++, so allocation modules are implemented in C++, and inherit the @AllocatorProcess@ class defined in @MESOS_HOME/src/master/allocator.hpp@. As of the time of this writing (5/29/13), the API for allocation modules is as follows:</p>
+<ul>
+<li><p><a href="#writing-a-custom-allocator">Implement</a> an <code>Allocator</code> interface as defined in <code>mesos/master/allocator.hpp</code>,</p></li>
+<li><p><a href="#wiring-up-a-custom-allocator">Wrap</a> the allocator implementation in a module and load it in the Mesos master.</p></li>
+</ul>
 
-<pre><code>  virtual ~AllocatorProcess() {}
 
-  virtual void initialize(
-      const Flags&amp; flags,
-      const process::PID&lt;Master&gt;&amp; master,
-      const hashmap&lt;std::string, RoleInfo&gt;&amp; roles) = 0;
-
-  virtual void frameworkAdded(
-      const FrameworkID&amp; frameworkId,
-      const FrameworkInfo&amp; frameworkInfo,
-      const Resources&amp; used) = 0;
-
-  virtual void frameworkRemoved(
-      const FrameworkID&amp; frameworkId) = 0;
-
-  virtual void frameworkActivated(
-      const FrameworkID&amp; frameworkId,
-      const FrameworkInfo&amp; frameworkInfo) = 0;
-
-  virtual void frameworkDeactivated(
-      const FrameworkID&amp; frameworkId) = 0;
-
-  virtual void slaveAdded(
-      const SlaveID&amp; slaveId,
-      const SlaveInfo&amp; slaveInfo,
-      const hashmap&lt;FrameworkID, Resources&gt;&amp; used) = 0;
-
-  virtual void slaveRemoved(
-      const SlaveID&amp; slaveId) = 0;
-
-  virtual void updateWhitelist(
-      const Option&lt;hashset&lt;std::string&gt; &gt;&amp; whitelist) = 0;
-
-  virtual void resourcesRequested(
-      const FrameworkID&amp; frameworkId,
-      const std::vector&lt;Request&gt;&amp; requests) = 0;
-
-  // Whenever resources are "recovered" in the cluster (e.g., a task
-  // finishes, an offer is removed because a framework has failed or
-  // is failing over), or a framework refuses them, the master
-  // invokes this callback.
-  virtual void resourcesRecovered(
-      const FrameworkID&amp; frameworkId,
-      const SlaveID&amp; slaveId,
-      const Resources&amp; resources,
-      const Option&lt;Filters&gt;&amp; filters) = 0;
-
-  // Whenever a framework that has filtered resources wants to revive
-  // offers for those resources the master invokes this callback.
-  virtual void offersRevived(
-      const FrameworkID&amp; frameworkId) = 0;
-</code></pre>
-
-<p>The default allocation module is the HierarchicalAllocatorProcess, which can be found in @MESOS_HOME/src/master/hierarchical_allocator_process.hpp@. You can reference this as a starting place if you choose to write your own allocation module.</p>
-
-<h2>Sorter API</h2>
+<h2>Writing a custom allocator</h2>
 
-<p>Additionally, the hierarchical allocator module can be extended without the need to reimplement the entirety of the allocation logic through the use of the @Sorter@ abstraction.</p>
+<p>Allocator modules are implemented in C++, the same language in which Mesos is written. They must subclass the <code>Allocator</code> interface defined in <code>mesos/master/allocator.hpp</code>. However, your implementation can be a C++ proxy, which delegates calls to an actual allocator written in a language of your choice.</p>
 
-<p>Sorters define the order that roles or frameworks should be offered resources in by taking &ldquo;client&rdquo; objects and some information about those clients and returning an ordered list of clients.</p>
+<p>The default allocator is <code>HierarchicalDRFAllocatorProcess</code>, which lives in <code>$MESOS_HOME/src/master/allocator/mesos/hierarchical.hpp</code>. Like most Mesos components, it is actor-based, which means all interface methods are non-blocking and return immediately after putting the corresponding action into the actor&rsquo;s queue. If you would like to design your custom allocator in a similar manner, subclass <code>MesosAllocatorProcess</code> from <code>$MESOS_HOME/src/master/allocator/mesos/allocator.hpp</code> and wrap your actor-based allocator in <code>MesosAllocator</code>. This dispatches calls to the underlying actor and controls its lifetime. You can refer to <code>HierarchicalDRFAllocatorProcess</code> as a starting place if you choose to write your own actor-based allocation module.</p>
 
-<p>Sorters are implemented in C++ and inherit the @Sorter@ class defined in @MESOS_HOME/src/master/sorter.hpp@. As of the time of this writing, the API for Sorters is as follows:</p>
+<p>Additionally, the built-in hierarchical allocator can be extended without the need to reimplement the entirety of the allocation logic. This is possible through the use of the <code>Sorter</code> abstraction. Sorters define the order in which hierarchy layers (e.g. roles or frameworks) should be offered resources by taking &ldquo;client&rdquo; objects and some information about those clients and returning an ordered list of clients.</p>
 
-<pre><code>  virtual ~Sorter() {}
+<p>Sorters are implemented in C++ and inherit the <code>Sorter</code> class defined in <code>$MESOS_HOME/src/master/allocator/sorter/sorter.hpp</code>. The default sorter is <code>DRFSorter</code>, which implements fair sharing and can be found in <code>$MESOS_HOME/src/master/allocator/sorter/drf/sorter.hpp</code>. This sorter is capable of expressing priorities by specifying weights in <code>Sorter::add()</code>. Each client&rsquo;s share is divided by its weight. For example, a role that has a weight of <code>2</code> will be offered twice as many resources as a role with weight <code>1</code>.</p>
 
-  // Adds a client to allocate resources to. A client
-  // may be a user or a framework.
-  virtual void add(const std::string&amp; client, double weight = 1) = 0;
+<h2>Wiring up a custom allocator</h2>
 
-  // Removes a client.
-  virtual void remove(const std::string&amp; client) = 0;
+<p>Once a custom allocator has been written, the next step is to override the built-in implementation with your own. This process consists of several steps:</p>
 
-  // Readds a client to the sort after deactivate.
-  virtual void activate(const std::string&amp; client) = 0;
+<ul>
+<li><p>Wrap your allocator in a Mesos allocator module,</p></li>
+<li><p>Load this module in Mesos master.</p></li>
+</ul>
 
-  // Removes a client from the sort, so it won't get allocated to.
-  virtual void deactivate(const std::string&amp; client) = 0;
 
-  // Specify that resources have been allocated to the given client.
-  virtual void allocated(const std::string&amp; client,
-                         const Resources&amp; resources) = 0;
+<p>An allocator module is a factory function and a module description, as defined in <code>mesos/module/allocator.hpp</code>. Assuming the allocation logic is implemented by the <code>ExternalAllocator</code> class declared in <code>external_allocator.hpp</code>, the following snippet describes the implementation of an allocator module named <code>ExternalAllocatorModule</code>:</p>
 
-  // Specify that resources have been unallocated from the given client.
-  virtual void unallocated(const std::string&amp; client,
-                           const Resources&amp; resources) = 0;
+<pre><code>#include &lt;mesos/master/allocator.hpp&gt;
+#include &lt;mesos/module/allocator.hpp&gt;
+#include &lt;stout/try.hpp&gt;
 
-  // Returns the resources that have been allocated to this client.
-  virtual Resources allocation(const std::string&amp; client) = 0;
+#include "external_allocator.hpp"
 
-  // Add resources to the total pool of resources this
-  // Sorter should consider.
-  virtual void add(const Resources&amp; resources) = 0;
+using namespace mesos;
+using mesos::master::allocator::Allocator;
+using mesos::internal::master::allocator::HierarchicalDRFAllocator;
 
-  // Remove resources from the total pool.
-  virtual void remove(const Resources&amp; resources) = 0;
+static Allocator* createExternalAllocator(const Parameters&amp; parameters)
+{
+  Try&lt;Allocator*&gt; allocator = ExternalAllocator::create();
+  if (allocator.isError()) {
+    return NULL;
+  }
 
-  // Returns a list of all clients, in the order that they
-  // should be allocated to, according to this Sorter's policy.
-  virtual std::list&lt;std::string&gt; sort() = 0;
+  return allocator.get();
+}
 
-  // Returns true if this Sorter contains the specified client,
-  // either active or deactivated.
-  virtual bool contains(const std::string&amp; client) = 0;
-
-  // Returns the number of clients this Sorter contains,
-  // either active or deactivated.
-  virtual int count() = 0;
+// Declares an ExternalAllocator module named 'ExternalAllocatorModule'.
+mesos::modules::Module&lt;Allocator&gt; ExternalAllocatorModule(
+    MESOS_MODULE_API_VERSION,
+    MESOS_VERSION,
+    "Mesos Contributor",
+    "engineer@example.com",
+    "External Allocator module.",
+    NULL,
+    createExternalAllocator);
 </code></pre>
 
-<p>The default @Sorter@ is the DRFSorter, which implements fair sharing and can be found at @MESOS_HOME/src/master/drf_sorter.hpp@.</p>
-
-<p>For DRF, if weights are specified in Sorter::add, a client&rsquo;s share will be divided by the weight, creating a form of priority. For example, a role that has a weight of 2 will be offered twice as many resources as a role with weight 1.</p>
+<p>Refer to the <a href="http://mesos.apache.org/documentation/latest/modules/">Mesos Modules documentation</a> for instructions how to compile and load a module in Mesos master.</p>
 
 	</div>
 </div>

Modified: mesos/site/publish/documentation/configuration/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/configuration/index.html?rev=1682527&r1=1682526&r2=1682527&view=diff
==============================================================================
--- mesos/site/publish/documentation/configuration/index.html (original)
+++ mesos/site/publish/documentation/configuration/index.html Fri May 29 18:13:44 2015
@@ -298,6 +298,17 @@ file:///path/to/file (where file contain
   </tr>
   <tr>
     <td>
+      --allocator=VALUE
+    </td>
+    <td>
+      Allocator to use for resource allocation to frameworks.
+      Use the default <code>HierarchicalDRF</code> allocator, or load
+      an alternate allocator module using <code>--modules</code>.
+      (default: HierarchicalDRF)
+    </td>
+  </tr>
+  <tr>
+    <td>
       --[no-]authenticate
     </td>
     <td>

Modified: mesos/site/publish/documentation/latest/allocation-module/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/latest/allocation-module/index.html?rev=1682527&r1=1682526&r2=1682527&view=diff
==============================================================================
--- mesos/site/publish/documentation/latest/allocation-module/index.html (original)
+++ mesos/site/publish/documentation/latest/allocation-module/index.html Fri May 29 18:13:44 2015
@@ -83,124 +83,70 @@
 	<div class="col-md-8">
 		<h1>Mesos Allocation Module</h1>
 
-<p>The logic that the Mesos master uses to determine which frameworks to make offer resource offers to is encapsulated in the Master&rsquo;s <em>allocation module</em>.  The allocation module is a pluggable component that organizations can use to implement their own sharing policy, e.g. fair-sharing, Dominant Resource Fairness (see <a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2010/EECS-2010-55.pdf">the DRF paper</a>), priority, etc.</p>
+<p>The logic that the Mesos master uses to determine which frameworks to make resource offers to is encapsulated in the Master&rsquo;s <em>allocator module</em>. The allocator is a pluggable component that organizations can use to implement their own sharing policy, e.g. fair-sharing, priority, etc., or tune the default hierarchical Dominant Resource Fairness algorithm (see <a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2010/EECS-2010-55.pdf">the DRF paper</a>).</p>
 
-<h2>Allocation Module API</h2>
+<p>To use a custom allocator in Mesos, one must:</p>
 
-<p>Mesos is implemented in C++, so allocation modules are implemented in C++, and inherit the @AllocatorProcess@ class defined in @MESOS_HOME/src/master/allocator.hpp@. As of the time of this writing (5/29/13), the API for allocation modules is as follows:</p>
+<ul>
+<li><p><a href="#writing-a-custom-allocator">Implement</a> an <code>Allocator</code> interface as defined in <code>mesos/master/allocator.hpp</code>,</p></li>
+<li><p><a href="#wiring-up-a-custom-allocator">Wrap</a> the allocator implementation in a module and load it in the Mesos master.</p></li>
+</ul>
 
-<pre><code>  virtual ~AllocatorProcess() {}
 
-  virtual void initialize(
-      const Flags&amp; flags,
-      const process::PID&lt;Master&gt;&amp; master,
-      const hashmap&lt;std::string, RoleInfo&gt;&amp; roles) = 0;
-
-  virtual void frameworkAdded(
-      const FrameworkID&amp; frameworkId,
-      const FrameworkInfo&amp; frameworkInfo,
-      const Resources&amp; used) = 0;
-
-  virtual void frameworkRemoved(
-      const FrameworkID&amp; frameworkId) = 0;
-
-  virtual void frameworkActivated(
-      const FrameworkID&amp; frameworkId,
-      const FrameworkInfo&amp; frameworkInfo) = 0;
-
-  virtual void frameworkDeactivated(
-      const FrameworkID&amp; frameworkId) = 0;
-
-  virtual void slaveAdded(
-      const SlaveID&amp; slaveId,
-      const SlaveInfo&amp; slaveInfo,
-      const hashmap&lt;FrameworkID, Resources&gt;&amp; used) = 0;
-
-  virtual void slaveRemoved(
-      const SlaveID&amp; slaveId) = 0;
-
-  virtual void updateWhitelist(
-      const Option&lt;hashset&lt;std::string&gt; &gt;&amp; whitelist) = 0;
-
-  virtual void resourcesRequested(
-      const FrameworkID&amp; frameworkId,
-      const std::vector&lt;Request&gt;&amp; requests) = 0;
-
-  // Whenever resources are "recovered" in the cluster (e.g., a task
-  // finishes, an offer is removed because a framework has failed or
-  // is failing over), or a framework refuses them, the master
-  // invokes this callback.
-  virtual void resourcesRecovered(
-      const FrameworkID&amp; frameworkId,
-      const SlaveID&amp; slaveId,
-      const Resources&amp; resources,
-      const Option&lt;Filters&gt;&amp; filters) = 0;
-
-  // Whenever a framework that has filtered resources wants to revive
-  // offers for those resources the master invokes this callback.
-  virtual void offersRevived(
-      const FrameworkID&amp; frameworkId) = 0;
-</code></pre>
-
-<p>The default allocation module is the HierarchicalAllocatorProcess, which can be found in @MESOS_HOME/src/master/hierarchical_allocator_process.hpp@. You can reference this as a starting place if you choose to write your own allocation module.</p>
-
-<h2>Sorter API</h2>
+<h2>Writing a custom allocator</h2>
 
-<p>Additionally, the hierarchical allocator module can be extended without the need to reimplement the entirety of the allocation logic through the use of the @Sorter@ abstraction.</p>
+<p>Allocator modules are implemented in C++, the same language in which Mesos is written. They must subclass the <code>Allocator</code> interface defined in <code>mesos/master/allocator.hpp</code>. However, your implementation can be a C++ proxy, which delegates calls to an actual allocator written in a language of your choice.</p>
 
-<p>Sorters define the order that roles or frameworks should be offered resources in by taking &ldquo;client&rdquo; objects and some information about those clients and returning an ordered list of clients.</p>
+<p>The default allocator is <code>HierarchicalDRFAllocatorProcess</code>, which lives in <code>$MESOS_HOME/src/master/allocator/mesos/hierarchical.hpp</code>. Like most Mesos components, it is actor-based, which means all interface methods are non-blocking and return immediately after putting the corresponding action into the actor&rsquo;s queue. If you would like to design your custom allocator in a similar manner, subclass <code>MesosAllocatorProcess</code> from <code>$MESOS_HOME/src/master/allocator/mesos/allocator.hpp</code> and wrap your actor-based allocator in <code>MesosAllocator</code>. This dispatches calls to the underlying actor and controls its lifetime. You can refer to <code>HierarchicalDRFAllocatorProcess</code> as a starting place if you choose to write your own actor-based allocation module.</p>
 
-<p>Sorters are implemented in C++ and inherit the @Sorter@ class defined in @MESOS_HOME/src/master/sorter.hpp@. As of the time of this writing, the API for Sorters is as follows:</p>
+<p>Additionally, the built-in hierarchical allocator can be extended without the need to reimplement the entirety of the allocation logic. This is possible through the use of the <code>Sorter</code> abstraction. Sorters define the order in which hierarchy layers (e.g. roles or frameworks) should be offered resources by taking &ldquo;client&rdquo; objects and some information about those clients and returning an ordered list of clients.</p>
 
-<pre><code>  virtual ~Sorter() {}
+<p>Sorters are implemented in C++ and inherit the <code>Sorter</code> class defined in <code>$MESOS_HOME/src/master/allocator/sorter/sorter.hpp</code>. The default sorter is <code>DRFSorter</code>, which implements fair sharing and can be found in <code>$MESOS_HOME/src/master/allocator/sorter/drf/sorter.hpp</code>. This sorter is capable of expressing priorities by specifying weights in <code>Sorter::add()</code>. Each client&rsquo;s share is divided by its weight. For example, a role that has a weight of <code>2</code> will be offered twice as many resources as a role with weight <code>1</code>.</p>
 
-  // Adds a client to allocate resources to. A client
-  // may be a user or a framework.
-  virtual void add(const std::string&amp; client, double weight = 1) = 0;
+<h2>Wiring up a custom allocator</h2>
 
-  // Removes a client.
-  virtual void remove(const std::string&amp; client) = 0;
+<p>Once a custom allocator has been written, the next step is to override the built-in implementation with your own. This process consists of several steps:</p>
 
-  // Readds a client to the sort after deactivate.
-  virtual void activate(const std::string&amp; client) = 0;
+<ul>
+<li><p>Wrap your allocator in a Mesos allocator module,</p></li>
+<li><p>Load this module in Mesos master.</p></li>
+</ul>
 
-  // Removes a client from the sort, so it won't get allocated to.
-  virtual void deactivate(const std::string&amp; client) = 0;
 
-  // Specify that resources have been allocated to the given client.
-  virtual void allocated(const std::string&amp; client,
-                         const Resources&amp; resources) = 0;
+<p>An allocator module is a factory function and a module description, as defined in <code>mesos/module/allocator.hpp</code>. Assuming the allocation logic is implemented by the <code>ExternalAllocator</code> class declared in <code>external_allocator.hpp</code>, the following snippet describes the implementation of an allocator module named <code>ExternalAllocatorModule</code>:</p>
 
-  // Specify that resources have been unallocated from the given client.
-  virtual void unallocated(const std::string&amp; client,
-                           const Resources&amp; resources) = 0;
+<pre><code>#include &lt;mesos/master/allocator.hpp&gt;
+#include &lt;mesos/module/allocator.hpp&gt;
+#include &lt;stout/try.hpp&gt;
 
-  // Returns the resources that have been allocated to this client.
-  virtual Resources allocation(const std::string&amp; client) = 0;
+#include "external_allocator.hpp"
 
-  // Add resources to the total pool of resources this
-  // Sorter should consider.
-  virtual void add(const Resources&amp; resources) = 0;
+using namespace mesos;
+using mesos::master::allocator::Allocator;
+using mesos::internal::master::allocator::HierarchicalDRFAllocator;
 
-  // Remove resources from the total pool.
-  virtual void remove(const Resources&amp; resources) = 0;
+static Allocator* createExternalAllocator(const Parameters&amp; parameters)
+{
+  Try&lt;Allocator*&gt; allocator = ExternalAllocator::create();
+  if (allocator.isError()) {
+    return NULL;
+  }
 
-  // Returns a list of all clients, in the order that they
-  // should be allocated to, according to this Sorter's policy.
-  virtual std::list&lt;std::string&gt; sort() = 0;
+  return allocator.get();
+}
 
-  // Returns true if this Sorter contains the specified client,
-  // either active or deactivated.
-  virtual bool contains(const std::string&amp; client) = 0;
-
-  // Returns the number of clients this Sorter contains,
-  // either active or deactivated.
-  virtual int count() = 0;
+// Declares an ExternalAllocator module named 'ExternalAllocatorModule'.
+mesos::modules::Module&lt;Allocator&gt; ExternalAllocatorModule(
+    MESOS_MODULE_API_VERSION,
+    MESOS_VERSION,
+    "Mesos Contributor",
+    "engineer@example.com",
+    "External Allocator module.",
+    NULL,
+    createExternalAllocator);
 </code></pre>
 
-<p>The default @Sorter@ is the DRFSorter, which implements fair sharing and can be found at @MESOS_HOME/src/master/drf_sorter.hpp@.</p>
-
-<p>For DRF, if weights are specified in Sorter::add, a client&rsquo;s share will be divided by the weight, creating a form of priority. For example, a role that has a weight of 2 will be offered twice as many resources as a role with weight 1.</p>
+<p>Refer to the <a href="http://mesos.apache.org/documentation/latest/modules/">Mesos Modules documentation</a> for instructions how to compile and load a module in Mesos master.</p>
 
 	</div>
 </div>

Modified: mesos/site/publish/documentation/latest/configuration/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/latest/configuration/index.html?rev=1682527&r1=1682526&r2=1682527&view=diff
==============================================================================
--- mesos/site/publish/documentation/latest/configuration/index.html (original)
+++ mesos/site/publish/documentation/latest/configuration/index.html Fri May 29 18:13:44 2015
@@ -298,6 +298,17 @@ file:///path/to/file (where file contain
   </tr>
   <tr>
     <td>
+      --allocator=VALUE
+    </td>
+    <td>
+      Allocator to use for resource allocation to frameworks.
+      Use the default <code>HierarchicalDRF</code> allocator, or load
+      an alternate allocator module using <code>--modules</code>.
+      (default: HierarchicalDRF)
+    </td>
+  </tr>
+  <tr>
+    <td>
       --[no-]authenticate
     </td>
     <td>

Modified: mesos/site/publish/documentation/latest/modules/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/latest/modules/index.html?rev=1682527&r1=1682526&r2=1682527&view=diff
==============================================================================
--- mesos/site/publish/documentation/latest/modules/index.html (original)
+++ mesos/site/publish/documentation/latest/modules/index.html Fri May 29 18:13:44 2015
@@ -194,7 +194,24 @@ searched in the standard library paths o
 
 <h2>What kinds of modules are supported?</h2>
 
-<p>Here are the various module kinds currently available:</p>
+<p>Here are the various module kinds currently available.</p>
+
+<h3>Allocator</h3>
+
+<p>The Mesos master&rsquo;s <em>allocator</em> periodically determines which framework(s) should be offered the cluster&rsquo;s available resources. Allocator modules enable experimenting with specialized resource allocation algorithms. An example of these could be an allocator that provides a feature currently not supported by the built-in Hierarchical Dominant Resource Fairness allocator, like oversubscription with preemption.</p>
+
+<p>To load a custom allocator into Mesos master, you need to:</p>
+
+<ul>
+<li><p>Introduce it to the Mesos master by listing it in the <code>--modules</code> configuration,</p></li>
+<li><p>Select it as the allocator via the <code>--allocator</code> flag.</p></li>
+</ul>
+
+
+<p>For example, the following command will run the Mesos master with <code>ExternalAllocatorModule</code> (see <a href="#Example-JSON-strings">this section</a> for JSON format):</p>
+
+<pre><code>./bin/mesos-master.sh --work_dir=m/work --modules="file://&lt;modules-including-allocator&gt;.json" --allocator=ExternalAllocatorModule
+</code></pre>
 
 <h3>Anonymous</h3>
 

Modified: mesos/site/publish/documentation/modules/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/modules/index.html?rev=1682527&r1=1682526&r2=1682527&view=diff
==============================================================================
--- mesos/site/publish/documentation/modules/index.html (original)
+++ mesos/site/publish/documentation/modules/index.html Fri May 29 18:13:44 2015
@@ -194,7 +194,24 @@ searched in the standard library paths o
 
 <h2>What kinds of modules are supported?</h2>
 
-<p>Here are the various module kinds currently available:</p>
+<p>Here are the various module kinds currently available.</p>
+
+<h3>Allocator</h3>
+
+<p>The Mesos master&rsquo;s <em>allocator</em> periodically determines which framework(s) should be offered the cluster&rsquo;s available resources. Allocator modules enable experimenting with specialized resource allocation algorithms. An example of these could be an allocator that provides a feature currently not supported by the built-in Hierarchical Dominant Resource Fairness allocator, like oversubscription with preemption.</p>
+
+<p>To load a custom allocator into Mesos master, you need to:</p>
+
+<ul>
+<li><p>Introduce it to the Mesos master by listing it in the <code>--modules</code> configuration,</p></li>
+<li><p>Select it as the allocator via the <code>--allocator</code> flag.</p></li>
+</ul>
+
+
+<p>For example, the following command will run the Mesos master with <code>ExternalAllocatorModule</code> (see <a href="#Example-JSON-strings">this section</a> for JSON format):</p>
+
+<pre><code>./bin/mesos-master.sh --work_dir=m/work --modules="file://&lt;modules-including-allocator&gt;.json" --allocator=ExternalAllocatorModule
+</code></pre>
 
 <h3>Anonymous</h3>