Author: bmahler
Date: Mon May 4 20:52:03 2015
New Revision: 1677682
URL: http://svn.apache.org/r1677682
Log:
Fixed a bad link in the 0.21.0 blog post, documentation pull.
Modified:
mesos/site/publish/blog/feed.xml
mesos/site/publish/blog/mesos-0-21-0-released/index.html
mesos/site/publish/documentation/latest/mesos-c++-style-guide/index.html
mesos/site/publish/documentation/latest/release-guide/index.html
mesos/site/publish/documentation/mesos-c++-style-guide/index.html
mesos/site/publish/documentation/release-guide/index.html
mesos/site/publish/sitemap.xml
mesos/site/source/blog/2014-11-17-mesos-0-21-0-released.md
mesos/site/source/documentation/latest/mesos-c++-style-guide.md
mesos/site/source/documentation/latest/release-guide.md
Modified: mesos/site/publish/blog/feed.xml
URL:
http://svn.apache.org/viewvc/mesos/site/publish/blog/feed.xml?rev=1677682&r1=1677681&r2=1677682&view=diff
==============================================================================
--- mesos/site/publish/blog/feed.xml (original)
+++ mesos/site/publish/blog/feed.xml Mon May 4 20:52:03 2015
@@ -122,7 +122,7 @@ Adam B, Alexander Rojas, Alexander Rukle
<li>Task reconciliation for frameworks (<a
href="https://issues.apache.org/jira/browse/MESOS-1407">MESOS-1407</a>)</li>
<li>Support for Mesos modules (<a
href="https://issues.apache.org/jira/browse/MESOS-1931">MESOS-1931</a>)</li>
<li>Task status now includes source and reason (<a
href="https://issues.apache.org/jira/browse/MESOS-343">MESOS-343</a>,
<a
href="https://issues.apache.org/jira/browse/MESOS-1143">MESOS-1143</a>)</li>
-<li>A shared filesystem isolator (<a
href="https://issues.apache.org/jira/browse/MESOS-1143">MESOS-1586</a>)</li>
+<li>A shared filesystem isolator (<a
href="https://issues.apache.org/jira/browse/MESOS-1586">MESOS-1586</a>)</li>
<li>A pid namespace isolator (<a
href="https://issues.apache.org/jira/browse/MESOS-1765">MESOS-1765</a>)</li>
</ul>
Modified: mesos/site/publish/blog/mesos-0-21-0-released/index.html
URL:
http://svn.apache.org/viewvc/mesos/site/publish/blog/mesos-0-21-0-released/index.html?rev=1677682&r1=1677681&r2=1677682&view=diff
==============================================================================
--- mesos/site/publish/blog/mesos-0-21-0-released/index.html (original)
+++ mesos/site/publish/blog/mesos-0-21-0-released/index.html Mon May 4
20:52:03 2015
@@ -118,7 +118,7 @@
<li>Task reconciliation for frameworks (<a
href="https://issues.apache.org/jira/browse/MESOS-1407">MESOS-1407</a>)</li>
<li>Support for Mesos modules (<a
href="https://issues.apache.org/jira/browse/MESOS-1931">MESOS-1931</a>)</li>
<li>Task status now includes source and reason (<a
href="https://issues.apache.org/jira/browse/MESOS-343">MESOS-343</a>, <a
href="https://issues.apache.org/jira/browse/MESOS-1143">MESOS-1143</a>)</li>
-<li>A shared filesystem isolator (<a
href="https://issues.apache.org/jira/browse/MESOS-1143">MESOS-1586</a>)</li>
+<li>A shared filesystem isolator (<a
href="https://issues.apache.org/jira/browse/MESOS-1586">MESOS-1586</a>)</li>
<li>A pid namespace isolator (<a
href="https://issues.apache.org/jira/browse/MESOS-1765">MESOS-1765</a>)</li>
</ul>
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=1677682&r1=1677681&r2=1677682&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
Mon May 4 20:52:03 2015
@@ -215,7 +215,7 @@ allocator->resourcesRecovered(
</ul>
-<pre><code>Try&lt;Duration&gt; failoverTimeout =
+<pre><code>Try<Duration> failoverTimeout =
Duration::create(FrameworkInfo().failover_timeout());
</code></pre>
@@ -230,7 +230,7 @@ allocator->resourcesRecovered(
<h2>C++11</h2>
-<p>We still support older compilers. The whitelist of supported C++11 features
is:</p>
+<p>We support C++11 and require GCC 4.8+ or Clang 3.5+ compilers. The
whitelist of supported C++11 features is:</p>
<ul>
<li>Static assertions.</li>
@@ -252,7 +252,7 @@ shared_ptr<list<string>> nam
// 3: Don't use.
auto authorizer = LocalAuthorizer::create(acls);
// Compare with
-Try&lt;Owned&lt;LocalAuthorizer>> authorizer =
LocalAuthorizer::create();
+Try<Owned<LocalAuthorizer>> authorizer = LocalAuthorizer::create();
</code></pre>
<ul>
@@ -273,6 +273,260 @@ Try&lt;Owned&lt;LocalAuthorizer&
<li><code>shared_from_this()</code></li>
</ul>
</li>
+<li><p>Lambdas!</p>
+
+<ul>
+<li><p>Don’t put a space between the capture list and the parameter
list:</p>
+
+<pre><code>// 1: OK.
+[]() { ...; };
+
+// 2: Don't use.
+[] () { ...; };
+</code></pre></li>
+<li><p>Prefer default capture by value, explicit capture by value, then
capture by reference. To avoid dangling-pointer bugs, <em>never</em> use
default capture by reference:</p>
+
+<pre><code>// 1: OK.
+[=]() { ... }; // Default capture by value.
+[n]() { ... }; // Explicit capture by value.
+[&n]() { ... }; // Explicit capture by reference.
+[=, &n]() { ... }; // Default capture by value, explicit capture by
reference.
+
+// 2: Don't use.
+[&]() { ... }; // Default capture by reference.
+</code></pre></li>
+<li><p>Use <code>mutable</code> only when absolutely necessary.</p>
+
+<pre><code>// 1: OK.
+[]() mutable { ...; };
+</code></pre></li>
+<li><p>Feel free to ignore the return type by default, adding it as necessary
to appease the compiler or be more explicit for the reader.</p>
+
+<pre><code>// 1: OK.
+[]() { return true; };
+[]() -> bool { return ambiguous(); };
+</code></pre></li>
+<li><p>Feel free to use <code>auto</code> when naming a lambda expression:</p>
+
+<pre><code>// 1: OK.
+auto lambda = []() { ...; };
+</code></pre></li>
+<li><p>Format lambdas similar to how we format functions and methods. Feel
free to let lambdas be one-liners:</p>
+
+<pre><code>// 1: OK.
+auto lambda = []() {
+ ...;
+};
+
+// 2: OK.
+auto lambda = []() { ...; };
+</code></pre>
+
+<p>Feel free to inline lambdas within function arguments:</p>
+
+<pre><code>socket.send([]() {
+ ...;
+});
+</code></pre>
+
+<p>Chain function calls on a newline after the closing brace of the lambda and
the closing parenthesis of function call:</p>
+
+<pre><code>// 1: OK.
+instance
+ .method([]() {
+ ...;
+ })
+ .then([]() { ...; })
+ .then([]() {
+ ...;
+ });
+
+// 2: OK (when no chaining, compare to 1).
+instance.method([]() {
+ ...;
+});
+
+// 3: OK (if no 'instance.method').
+function([]() {
+ ...;
+})
+.then([]() { ...; })
+.then([]() {
+ ...;
+});
+
+// 3: OK (but prefer 1).
+instance.method([]() {
+ ...;
+})
+.then([]() { ...; })
+.then([]() {
+ ...;
+});
+</code></pre>
+
+<p>Wrap capture lists indepedently of parameters, <em>use the same formatting
as if the capture list were template parameters</em>:</p>
+
+<pre><code>// 1: OK.
+function([&capture1, &capture2, &capture3](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+});
+
+function(
+ [&capture1, &capture2, &capture3](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+});
+
+auto lambda = [&capture1, &capture2, &capture3](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+};
+
+
+auto lambda =
+ [&capture1, &capture2, &capture3](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+};
+
+// 2: OK (when capture list is longer than 80 characters).
+function([
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1, const T2& p2) {
+ ...;
+});
+
+auto lambda = [
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1, const T2& p2) {
+ ...;
+};
+
+// 3: OK (but prefer 2).
+function([
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](const T1& p1, const T2& t2) {
+ ...;
+});
+
+auto lambda = [
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](const T1& p1, const T2& p2) {
+ ...;
+};
+
+// 3: Don't use.
+function([&capture1,
+ &capture2,
+ &capture3,
+ &capture4](const T1& p1, const T2& p2) {
+ ...;
+});
+
+auto lambda = [&capture1,
+ &capture2,
+ &capture3,
+ &capture4](const T1& p1, const T2& p2) {
+ ...;
+};
+
+// 4: Don't use.
+function([&capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+});
+
+auto lambda = [&capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+};
+
+// 5: Don't use.
+function([&capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3) {
+ ...;
+});
+
+auto lambda = [&capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3) {
+ ...;
+};
+
+// 6: OK (parameter list longer than 80 characters).
+function([&capture1, &capture2, &capture3](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3,
+ const T4& p4) {
+ ...;
+});
+
+auto lambda = [&capture1, &capture2, &capture3](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3,
+ const T4& p4) {
+ ...;
+};
+
+// 7: OK (capture and parameter lists longer than 80 characters).
+function([
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3,
+ const T4& p4) {
+ ...;
+});
+
+auto lambda = [
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3,
+ const T4& p4) {
+ ...;
+};
+</code></pre></li>
+</ul>
+</li>
+<li><p>Unrestricted Union.</p>
+
+<p>Like the pre-existing <code>union</code>, we can overlap storage allocation
for objects that never exist simultaneously. However, with C++11 we are no
longer <em>restricted to having only non-POD types in unions</em>. Adding
non-POD types to unions complicates things, however, because we need to make
sure to properly call constructors and destructors. Therefore, only use
unrestricted unions (i.e., unions with non-POD types) when the union has only a
single field. What does this buy us? Now we can avoid dynamic memory
allocations for “container” like types, e.g., <code>Option</code>,
<code>Try</code>, <code>Result</code>, etc. In effect, we treat the union like
a dynamic allocation, calling <em>placement new</em>, <code>new (&t)
T(...)</code> anyplace we would have just called <code>new T(...)</code> and
the destructor <code>t.~T()</code> anyplace we would have called <code>delete
t</code>.</p></li>
</ul>
Modified: mesos/site/publish/documentation/latest/release-guide/index.html
URL:
http://svn.apache.org/viewvc/mesos/site/publish/documentation/latest/release-guide/index.html?rev=1677682&r1=1677681&r2=1677682&view=diff
==============================================================================
--- mesos/site/publish/documentation/latest/release-guide/index.html (original)
+++ mesos/site/publish/documentation/latest/release-guide/index.html Mon May 4
20:52:03 2015
@@ -180,7 +180,7 @@ version, if there are bugs found.</p></l
<ol>
<li><p>Once a release candidate is deemed worthy to be officially released you
should call a vote on
-the <code>[email protected]</code> (and optionally
<code>[email protected]</code>) mailing list.</p></li>
+the <code>[email protected]</code> (and optionally
<code>[email protected]</code>) mailing list.</p></li>
<li><p>It is recommended to use the <code>support/vote.sh</code> script to
vote the release candidate.</p>
<pre><code> $ ./support/vote.sh X.Y.Z R
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=1677682&r1=1677681&r2=1677682&view=diff
==============================================================================
--- mesos/site/publish/documentation/mesos-c++-style-guide/index.html (original)
+++ mesos/site/publish/documentation/mesos-c++-style-guide/index.html Mon May
4 20:52:03 2015
@@ -215,7 +215,7 @@ allocator->resourcesRecovered(
</ul>
-<pre><code>Try&lt;Duration&gt; failoverTimeout =
+<pre><code>Try<Duration> failoverTimeout =
Duration::create(FrameworkInfo().failover_timeout());
</code></pre>
@@ -230,7 +230,7 @@ allocator->resourcesRecovered(
<h2>C++11</h2>
-<p>We still support older compilers. The whitelist of supported C++11 features
is:</p>
+<p>We support C++11 and require GCC 4.8+ or Clang 3.5+ compilers. The
whitelist of supported C++11 features is:</p>
<ul>
<li>Static assertions.</li>
@@ -252,7 +252,7 @@ shared_ptr<list<string>> nam
// 3: Don't use.
auto authorizer = LocalAuthorizer::create(acls);
// Compare with
-Try&lt;Owned&lt;LocalAuthorizer>> authorizer =
LocalAuthorizer::create();
+Try<Owned<LocalAuthorizer>> authorizer = LocalAuthorizer::create();
</code></pre>
<ul>
@@ -273,6 +273,260 @@ Try&lt;Owned&lt;LocalAuthorizer&
<li><code>shared_from_this()</code></li>
</ul>
</li>
+<li><p>Lambdas!</p>
+
+<ul>
+<li><p>Don’t put a space between the capture list and the parameter
list:</p>
+
+<pre><code>// 1: OK.
+[]() { ...; };
+
+// 2: Don't use.
+[] () { ...; };
+</code></pre></li>
+<li><p>Prefer default capture by value, explicit capture by value, then
capture by reference. To avoid dangling-pointer bugs, <em>never</em> use
default capture by reference:</p>
+
+<pre><code>// 1: OK.
+[=]() { ... }; // Default capture by value.
+[n]() { ... }; // Explicit capture by value.
+[&n]() { ... }; // Explicit capture by reference.
+[=, &n]() { ... }; // Default capture by value, explicit capture by
reference.
+
+// 2: Don't use.
+[&]() { ... }; // Default capture by reference.
+</code></pre></li>
+<li><p>Use <code>mutable</code> only when absolutely necessary.</p>
+
+<pre><code>// 1: OK.
+[]() mutable { ...; };
+</code></pre></li>
+<li><p>Feel free to ignore the return type by default, adding it as necessary
to appease the compiler or be more explicit for the reader.</p>
+
+<pre><code>// 1: OK.
+[]() { return true; };
+[]() -> bool { return ambiguous(); };
+</code></pre></li>
+<li><p>Feel free to use <code>auto</code> when naming a lambda expression:</p>
+
+<pre><code>// 1: OK.
+auto lambda = []() { ...; };
+</code></pre></li>
+<li><p>Format lambdas similar to how we format functions and methods. Feel
free to let lambdas be one-liners:</p>
+
+<pre><code>// 1: OK.
+auto lambda = []() {
+ ...;
+};
+
+// 2: OK.
+auto lambda = []() { ...; };
+</code></pre>
+
+<p>Feel free to inline lambdas within function arguments:</p>
+
+<pre><code>socket.send([]() {
+ ...;
+});
+</code></pre>
+
+<p>Chain function calls on a newline after the closing brace of the lambda and
the closing parenthesis of function call:</p>
+
+<pre><code>// 1: OK.
+instance
+ .method([]() {
+ ...;
+ })
+ .then([]() { ...; })
+ .then([]() {
+ ...;
+ });
+
+// 2: OK (when no chaining, compare to 1).
+instance.method([]() {
+ ...;
+});
+
+// 3: OK (if no 'instance.method').
+function([]() {
+ ...;
+})
+.then([]() { ...; })
+.then([]() {
+ ...;
+});
+
+// 3: OK (but prefer 1).
+instance.method([]() {
+ ...;
+})
+.then([]() { ...; })
+.then([]() {
+ ...;
+});
+</code></pre>
+
+<p>Wrap capture lists indepedently of parameters, <em>use the same formatting
as if the capture list were template parameters</em>:</p>
+
+<pre><code>// 1: OK.
+function([&capture1, &capture2, &capture3](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+});
+
+function(
+ [&capture1, &capture2, &capture3](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+});
+
+auto lambda = [&capture1, &capture2, &capture3](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+};
+
+
+auto lambda =
+ [&capture1, &capture2, &capture3](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+};
+
+// 2: OK (when capture list is longer than 80 characters).
+function([
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1, const T2& p2) {
+ ...;
+});
+
+auto lambda = [
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1, const T2& p2) {
+ ...;
+};
+
+// 3: OK (but prefer 2).
+function([
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](const T1& p1, const T2& t2) {
+ ...;
+});
+
+auto lambda = [
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](const T1& p1, const T2& p2) {
+ ...;
+};
+
+// 3: Don't use.
+function([&capture1,
+ &capture2,
+ &capture3,
+ &capture4](const T1& p1, const T2& p2) {
+ ...;
+});
+
+auto lambda = [&capture1,
+ &capture2,
+ &capture3,
+ &capture4](const T1& p1, const T2& p2) {
+ ...;
+};
+
+// 4: Don't use.
+function([&capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+});
+
+auto lambda = [&capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1, const T2& p2, const T3& p3) {
+ ...;
+};
+
+// 5: Don't use.
+function([&capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3) {
+ ...;
+});
+
+auto lambda = [&capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3) {
+ ...;
+};
+
+// 6: OK (parameter list longer than 80 characters).
+function([&capture1, &capture2, &capture3](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3,
+ const T4& p4) {
+ ...;
+});
+
+auto lambda = [&capture1, &capture2, &capture3](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3,
+ const T4& p4) {
+ ...;
+};
+
+// 7: OK (capture and parameter lists longer than 80 characters).
+function([
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3,
+ const T4& p4) {
+ ...;
+});
+
+auto lambda = [
+ &capture1,
+ &capture2,
+ &capture3,
+ &capture4](
+ const T1& p1,
+ const T2& p2,
+ const T3& p3,
+ const T4& p4) {
+ ...;
+};
+</code></pre></li>
+</ul>
+</li>
+<li><p>Unrestricted Union.</p>
+
+<p>Like the pre-existing <code>union</code>, we can overlap storage allocation
for objects that never exist simultaneously. However, with C++11 we are no
longer <em>restricted to having only non-POD types in unions</em>. Adding
non-POD types to unions complicates things, however, because we need to make
sure to properly call constructors and destructors. Therefore, only use
unrestricted unions (i.e., unions with non-POD types) when the union has only a
single field. What does this buy us? Now we can avoid dynamic memory
allocations for “container” like types, e.g., <code>Option</code>,
<code>Try</code>, <code>Result</code>, etc. In effect, we treat the union like
a dynamic allocation, calling <em>placement new</em>, <code>new (&t)
T(...)</code> anyplace we would have just called <code>new T(...)</code> and
the destructor <code>t.~T()</code> anyplace we would have called <code>delete
t</code>.</p></li>
</ul>
Modified: mesos/site/publish/documentation/release-guide/index.html
URL:
http://svn.apache.org/viewvc/mesos/site/publish/documentation/release-guide/index.html?rev=1677682&r1=1677681&r2=1677682&view=diff
==============================================================================
--- mesos/site/publish/documentation/release-guide/index.html (original)
+++ mesos/site/publish/documentation/release-guide/index.html Mon May 4
20:52:03 2015
@@ -180,7 +180,7 @@ version, if there are bugs found.</p></l
<ol>
<li><p>Once a release candidate is deemed worthy to be officially released you
should call a vote on
-the <code>[email protected]</code> (and optionally
<code>[email protected]</code>) mailing list.</p></li>
+the <code>[email protected]</code> (and optionally
<code>[email protected]</code>) mailing list.</p></li>
<li><p>It is recommended to use the <code>support/vote.sh</code> script to
vote the release candidate.</p>
<pre><code> $ ./support/vote.sh X.Y.Z R