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/06/07 00:17:28 UTC

svn commit: r1683963 [1/3] - in /mesos/site: publish/ publish/documentation/configuration/ publish/documentation/latest/configuration/ publish/documentation/latest/mesos-c++-style-guide/ publish/documentation/latest/powered-by-mesos/ publish/documentat...

Author: dlester
Date: Sat Jun  6 22:17:28 2015
New Revision: 1683963

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

Modified:
    mesos/site/publish/documentation/configuration/index.html
    mesos/site/publish/documentation/latest/configuration/index.html
    mesos/site/publish/documentation/latest/mesos-c++-style-guide/index.html
    mesos/site/publish/documentation/latest/powered-by-mesos/index.html
    mesos/site/publish/documentation/mesos-c++-style-guide/index.html
    mesos/site/publish/documentation/powered-by-mesos/index.html
    mesos/site/publish/sitemap.xml
    mesos/site/source/documentation/latest/configuration.md
    mesos/site/source/documentation/latest/mesos-c++-style-guide.md
    mesos/site/source/documentation/latest/powered-by-mesos.md

Modified: mesos/site/publish/documentation/configuration/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/configuration/index.html?rev=1683963&r1=1683962&r2=1683963&view=diff
==============================================================================
--- mesos/site/publish/documentation/configuration/index.html (original)
+++ mesos/site/publish/documentation/configuration/index.html Sat Jun  6 22:17:28 2015
@@ -1121,7 +1121,7 @@ file:///path/to/file (where file contain
       'cgroups/cpu,cgroups/mem', or network/port_mapping
       (configure with flag: --with-network-isolator to enable),
       or 'external', or load an alternate isolator module using
-      the <code>--modules</code> flag. (default: posix/cpu,posix/mem)
+      the <code>--modules</code> flag. Note that this flag is only relevant for the Mesos Containerizer. (default: posix/cpu,posix/mem)
     </td>
   </tr>
   <tr>
@@ -1316,6 +1316,24 @@ file:///path/to/file (where file contain
     </td>
   </tr>
   <tr>
+    <td>
+      --fetcher_cache_size=VALUE
+    </td>
+    <td>
+      Size of the fetcher cache in Bytes.
+      (default: 2 GB)
+    </td>
+  </tr>
+  <tr>
+    <td>
+      --fetcher_cache_dir=VALUE
+    </td>
+    <td>
+      Parent directory for fetcher cache directories (one subdirectory per slave). By default this directory is held inside the work directory, so everything can be deleted or archived in one swoop, in particular during testing. However, a typical production scenario is to use a separate cache volume. First, it is not meant to be backed up. Second, you want to avoid that sandbox directories and the cache directory can interfere with each other in unpredictable ways by occupying shared space. So it is recommended to set the cache directory explicitly.
+      (default: /tmp/mesos/fetch)
+    </td>
+  </tr>
+  <tr>
     <td>
       --work_dir=VALUE
     </td>

Modified: mesos/site/publish/documentation/latest/configuration/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/latest/configuration/index.html?rev=1683963&r1=1683962&r2=1683963&view=diff
==============================================================================
--- mesos/site/publish/documentation/latest/configuration/index.html (original)
+++ mesos/site/publish/documentation/latest/configuration/index.html Sat Jun  6 22:17:28 2015
@@ -1121,7 +1121,7 @@ file:///path/to/file (where file contain
       'cgroups/cpu,cgroups/mem', or network/port_mapping
       (configure with flag: --with-network-isolator to enable),
       or 'external', or load an alternate isolator module using
-      the <code>--modules</code> flag. (default: posix/cpu,posix/mem)
+      the <code>--modules</code> flag. Note that this flag is only relevant for the Mesos Containerizer. (default: posix/cpu,posix/mem)
     </td>
   </tr>
   <tr>
@@ -1316,6 +1316,24 @@ file:///path/to/file (where file contain
     </td>
   </tr>
   <tr>
+    <td>
+      --fetcher_cache_size=VALUE
+    </td>
+    <td>
+      Size of the fetcher cache in Bytes.
+      (default: 2 GB)
+    </td>
+  </tr>
+  <tr>
+    <td>
+      --fetcher_cache_dir=VALUE
+    </td>
+    <td>
+      Parent directory for fetcher cache directories (one subdirectory per slave). By default this directory is held inside the work directory, so everything can be deleted or archived in one swoop, in particular during testing. However, a typical production scenario is to use a separate cache volume. First, it is not meant to be backed up. Second, you want to avoid that sandbox directories and the cache directory can interfere with each other in unpredictable ways by occupying shared space. So it is recommended to set the cache directory explicitly.
+      (default: /tmp/mesos/fetch)
+    </td>
+  </tr>
+  <tr>
     <td>
       --work_dir=VALUE
     </td>

Modified: mesos/site/publish/documentation/latest/mesos-c++-style-guide/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/latest/mesos-c%2B%2B-style-guide/index.html?rev=1683963&r1=1683962&r2=1683963&view=diff
==============================================================================
--- mesos/site/publish/documentation/latest/mesos-c++-style-guide/index.html (original)
+++ mesos/site/publish/documentation/latest/mesos-c++-style-guide/index.html Sat Jun  6 22:17:28 2015
@@ -228,6 +228,138 @@ allocator-&gt;resourcesRecovered(
 </ul>
 
 
+<h2>Capture by Reference</h2>
+
+<p>We disallow capturing <strong>temporaries</strong> by reference. See <a href="https://issues.apache.org/jira/browse/MESOS-2629">MESOS-2629</a> for the rationale.</p>
+
+<pre><code>Future&lt;Nothing&gt; f() { return Nothing(); }
+Future&lt;bool&gt; g() { return false; }
+
+struct T
+{
+  T(const char* data) : data(data) {}
+  const T&amp; member() const { return *this; }
+  const char* data;
+};
+
+// 1: Don't use.
+const Future&lt;Nothing&gt;&amp; future = f();
+
+// 1: Instead use.
+const Future&lt;Nothing&gt; future = f();
+
+// 2: Don't use.
+const Future&lt;Nothing&gt;&amp; future = Future&lt;Nothing&gt;(Nothing());
+
+// 2: Instead use.
+const Future&lt;Nothing&gt; future = Future&lt;Nothing&gt;(Nothing());
+
+// 3: Don't use.
+const Future&lt;bool&gt;&amp; future = f().then(lambda::bind(g));
+
+// 3: Instead use.
+const Future&lt;bool&gt; future = f().then(lambda::bind(g));
+
+// 4: Don't use (since the T that got constructed is a temporary!).
+const T&amp; t = T("Hello").member();
+
+// 4: Preferred alias pattern (see below).
+const T t("Hello");
+const T&amp; t_ = t.member();
+
+// 4: Can also use.
+const T t = T("Hello").member();
+</code></pre>
+
+<p>We allow capturing non-temporaries by <em>constant reference</em> when the intent is to <strong>alias</strong>.</p>
+
+<p>The goal is to make code more concise and improve readability. Use this if an expression referencing a field by <code>const</code> is:</p>
+
+<ul>
+<li>Used repeatedly.</li>
+<li>Would benefit from a concise name to provide context for readability.</li>
+<li>Will <strong>not</strong> be invalidated during the lifetime of the alias. Otherwise document this explicitly.</li>
+</ul>
+
+
+<pre><code>hashmap&lt;int, hashset&lt;int&gt;&gt; index;
+
+struct T
+{
+  int number;
+  string name;
+};
+
+// 1: Ok.
+const hashset&lt;int&gt;&amp; values = index[2];
+
+// 2: Ok.
+for (auto iterator = index.begin(); iterator != index.end(); ++iterator) {
+  const hashset&lt;int&gt;&amp; values = iterator-&gt;second;
+}
+
+// 3: Ok.
+foreachpair (const int&amp; key, hashset&lt;int&gt;&amp; values, index) {}
+foreachvalue (const hashset&lt;int&gt;&amp; values, index) {}
+foreachkey (const int&amp; key, index) {}
+
+// 4: Avoid aliases in most circumstances as they can be dangerous.
+//    This is an example of a dangling alias!
+vector&lt;string&gt; strings{"hello"};
+
+string&amp; s = strings[0];
+
+strings.erase(strings.begin());
+
+s += "world"; // THIS IS A DANGLING REFERENCE!
+</code></pre>
+
+<h2>File Headers</h2>
+
+<ul>
+<li>Mesos source files must contain the &ldquo;ASF&rdquo; header:</li>
+</ul>
+
+
+<pre><code>/**
+ * 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.
+ */
+</code></pre>
+
+<ul>
+<li>Stout and libprocess source files must contain the &ldquo;Apache License Version 2.0&rdquo; header:</li>
+</ul>
+
+
+<pre><code>/**
+ * Licensed 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
+ */
+</code></pre>
+
 <h2>C++11</h2>
 
 <p>We support C++11 and require GCC 4.8+ or Clang 3.5+ compilers. The whitelist of supported C++11 features is:</p>
@@ -257,7 +389,9 @@ Try&lt;Owned&lt;LocalAuthorizer&gt;&gt;
 
 <ul>
 <li>Rvalue references.</li>
+<li>Explicitly-defaulted functions.</li>
 <li>Variadic templates.</li>
+<li>Delegating constructors.</li>
 <li>Mutexes.
 
 <ul>

Modified: mesos/site/publish/documentation/latest/powered-by-mesos/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/latest/powered-by-mesos/index.html?rev=1683963&r1=1683962&r2=1683963&view=diff
==============================================================================
--- mesos/site/publish/documentation/latest/powered-by-mesos/index.html (original)
+++ mesos/site/publish/documentation/latest/powered-by-mesos/index.html Sat Jun  6 22:17:28 2015
@@ -157,7 +157,9 @@
 <li><a href="http://www.whisk.com">Whisk</a></li>
 <li><a href="http://www.wizcorp.jp">Wizcorp</a></li>
 <li><a href="http://www.woorank.com">WooRank</a></li>
+<li><a href="http://www.yelp.com">Yelp</a></li>
 <li><a href="http://www.yieldbot.com">Yieldbot</a></li>
+<li><a href="http://www.yodle.com">Yodle</a></li>
 <li><a href="http://www.xogito.com">Xogito</a></li>
 </ul>
 

Modified: mesos/site/publish/documentation/mesos-c++-style-guide/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/mesos-c%2B%2B-style-guide/index.html?rev=1683963&r1=1683962&r2=1683963&view=diff
==============================================================================
--- mesos/site/publish/documentation/mesos-c++-style-guide/index.html (original)
+++ mesos/site/publish/documentation/mesos-c++-style-guide/index.html Sat Jun  6 22:17:28 2015
@@ -228,6 +228,138 @@ allocator-&gt;resourcesRecovered(
 </ul>
 
 
+<h2>Capture by Reference</h2>
+
+<p>We disallow capturing <strong>temporaries</strong> by reference. See <a href="https://issues.apache.org/jira/browse/MESOS-2629">MESOS-2629</a> for the rationale.</p>
+
+<pre><code>Future&lt;Nothing&gt; f() { return Nothing(); }
+Future&lt;bool&gt; g() { return false; }
+
+struct T
+{
+  T(const char* data) : data(data) {}
+  const T&amp; member() const { return *this; }
+  const char* data;
+};
+
+// 1: Don't use.
+const Future&lt;Nothing&gt;&amp; future = f();
+
+// 1: Instead use.
+const Future&lt;Nothing&gt; future = f();
+
+// 2: Don't use.
+const Future&lt;Nothing&gt;&amp; future = Future&lt;Nothing&gt;(Nothing());
+
+// 2: Instead use.
+const Future&lt;Nothing&gt; future = Future&lt;Nothing&gt;(Nothing());
+
+// 3: Don't use.
+const Future&lt;bool&gt;&amp; future = f().then(lambda::bind(g));
+
+// 3: Instead use.
+const Future&lt;bool&gt; future = f().then(lambda::bind(g));
+
+// 4: Don't use (since the T that got constructed is a temporary!).
+const T&amp; t = T("Hello").member();
+
+// 4: Preferred alias pattern (see below).
+const T t("Hello");
+const T&amp; t_ = t.member();
+
+// 4: Can also use.
+const T t = T("Hello").member();
+</code></pre>
+
+<p>We allow capturing non-temporaries by <em>constant reference</em> when the intent is to <strong>alias</strong>.</p>
+
+<p>The goal is to make code more concise and improve readability. Use this if an expression referencing a field by <code>const</code> is:</p>
+
+<ul>
+<li>Used repeatedly.</li>
+<li>Would benefit from a concise name to provide context for readability.</li>
+<li>Will <strong>not</strong> be invalidated during the lifetime of the alias. Otherwise document this explicitly.</li>
+</ul>
+
+
+<pre><code>hashmap&lt;int, hashset&lt;int&gt;&gt; index;
+
+struct T
+{
+  int number;
+  string name;
+};
+
+// 1: Ok.
+const hashset&lt;int&gt;&amp; values = index[2];
+
+// 2: Ok.
+for (auto iterator = index.begin(); iterator != index.end(); ++iterator) {
+  const hashset&lt;int&gt;&amp; values = iterator-&gt;second;
+}
+
+// 3: Ok.
+foreachpair (const int&amp; key, hashset&lt;int&gt;&amp; values, index) {}
+foreachvalue (const hashset&lt;int&gt;&amp; values, index) {}
+foreachkey (const int&amp; key, index) {}
+
+// 4: Avoid aliases in most circumstances as they can be dangerous.
+//    This is an example of a dangling alias!
+vector&lt;string&gt; strings{"hello"};
+
+string&amp; s = strings[0];
+
+strings.erase(strings.begin());
+
+s += "world"; // THIS IS A DANGLING REFERENCE!
+</code></pre>
+
+<h2>File Headers</h2>
+
+<ul>
+<li>Mesos source files must contain the &ldquo;ASF&rdquo; header:</li>
+</ul>
+
+
+<pre><code>/**
+ * 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.
+ */
+</code></pre>
+
+<ul>
+<li>Stout and libprocess source files must contain the &ldquo;Apache License Version 2.0&rdquo; header:</li>
+</ul>
+
+
+<pre><code>/**
+ * Licensed 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
+ */
+</code></pre>
+
 <h2>C++11</h2>
 
 <p>We support C++11 and require GCC 4.8+ or Clang 3.5+ compilers. The whitelist of supported C++11 features is:</p>
@@ -257,7 +389,9 @@ Try&lt;Owned&lt;LocalAuthorizer&gt;&gt;
 
 <ul>
 <li>Rvalue references.</li>
+<li>Explicitly-defaulted functions.</li>
 <li>Variadic templates.</li>
+<li>Delegating constructors.</li>
 <li>Mutexes.
 
 <ul>

Modified: mesos/site/publish/documentation/powered-by-mesos/index.html
URL: http://svn.apache.org/viewvc/mesos/site/publish/documentation/powered-by-mesos/index.html?rev=1683963&r1=1683962&r2=1683963&view=diff
==============================================================================
--- mesos/site/publish/documentation/powered-by-mesos/index.html (original)
+++ mesos/site/publish/documentation/powered-by-mesos/index.html Sat Jun  6 22:17:28 2015
@@ -157,7 +157,9 @@
 <li><a href="http://www.whisk.com">Whisk</a></li>
 <li><a href="http://www.wizcorp.jp">Wizcorp</a></li>
 <li><a href="http://www.woorank.com">WooRank</a></li>
+<li><a href="http://www.yelp.com">Yelp</a></li>
 <li><a href="http://www.yieldbot.com">Yieldbot</a></li>
+<li><a href="http://www.yodle.com">Yodle</a></li>
 <li><a href="http://www.xogito.com">Xogito</a></li>
 </ul>