You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2015/06/25 16:55:18 UTC

mesos git commit: Making markup doxygen-friendly.

Repository: mesos
Updated Branches:
  refs/heads/master 05ea6bc1e -> b0823c20b


Making markup doxygen-friendly.

Review: https://reviews.apache.org/r/35843


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b0823c20
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b0823c20
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b0823c20

Branch: refs/heads/master
Commit: b0823c20b17e386a2881981bf8c125efeb14d6b7
Parents: 05ea6bc
Author: Artem Harutyunyan <ar...@harutyunyan.am>
Authored: Wed Jun 24 21:04:45 2015 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Thu Jun 25 07:55:12 2015 -0700

----------------------------------------------------------------------
 docs/allocation-module.md               |   4 +-
 docs/app-framework-development-guide.md | 383 ++++++++++---------
 docs/clang-format.md                    |  52 ++-
 docs/mesos-c++-style-guide.md           | 550 +++++++++++++--------------
 docs/mesos-doxygen-style-guide.md       |  90 ++---
 docs/mesos-markdown-style-guide.md      |   3 +-
 docs/mesos-testing-patterns.md          |  68 ++--
 docs/modules.md                         | 273 +++++++------
 docs/network-monitoring.md              | 114 +++---
 docs/reconciliation.md                  |  23 +-
 docs/release-guide.md                   |  31 +-
 docs/upgrades.md                        |  49 ++-
 12 files changed, 800 insertions(+), 840 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/allocation-module.md
----------------------------------------------------------------------
diff --git a/docs/allocation-module.md b/docs/allocation-module.md
index 5db4aa2..4ba5ba8 100644
--- a/docs/allocation-module.md
+++ b/docs/allocation-module.md
@@ -33,7 +33,7 @@ Once a custom allocator has been written, the next step is to override the built
 
 An allocator module is a factory function and a module description, as defined in `mesos/module/allocator.hpp`. Assuming the allocation logic is implemented by the `ExternalAllocator` class declared in `external_allocator.hpp`, the following snippet describes the implementation of an allocator module named `ExternalAllocatorModule`:
 
-```
+~~~{.cpp}
 #include <mesos/master/allocator.hpp>
 #include <mesos/module/allocator.hpp>
 #include <stout/try.hpp>
@@ -63,6 +63,6 @@ mesos::modules::Module<Allocator> ExternalAllocatorModule(
     "External Allocator module.",
     NULL,
     createExternalAllocator);
-```
+~~~
 
 Refer to the [Mesos Modules documentation](http://mesos.apache.org/documentation/latest/modules/) for instructions how to compile and load a module in Mesos master.

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/app-framework-development-guide.md
----------------------------------------------------------------------
diff --git a/docs/app-framework-development-guide.md b/docs/app-framework-development-guide.md
index d651ec8..e340a6c 100644
--- a/docs/app-framework-development-guide.md
+++ b/docs/app-framework-development-guide.md
@@ -15,118 +15,117 @@ You can write a framework scheduler in C, C++, Java/Scala, or Python. Your frame
 ### Scheduler API
 
 Declared in `MESOS_HOME/include/mesos/scheduler.hpp`
-
-```
-  /**
-   * Empty virtual destructor (necessary to instantiate subclasses).
-   */
-  virtual ~Scheduler() {}
-
-  /**
-   * Invoked when the scheduler successfully registers with a Mesos
-   * master. A unique ID (generated by the master) used for
-   * distinguishing this framework from others and MasterInfo
-   * with the ip and port of the current master are provided as arguments.
-   */
-  virtual void registered(SchedulerDriver* driver,
-                          const FrameworkID& frameworkId,
+~~~{.cpp}
+/*
+ * Empty virtual destructor (necessary to instantiate subclasses).
+ */
+virtual ~Scheduler() {}
+
+/*
+ * Invoked when the scheduler successfully registers with a Mesos
+ * master. A unique ID (generated by the master) used for
+ * distinguishing this framework from others and MasterInfo
+ * with the ip and port of the current master are provided as arguments.
+ */
+virtual void registered(SchedulerDriver* driver,
+                        const FrameworkID& frameworkId,
+                        const MasterInfo& masterInfo) = 0;
+
+/*
+ * Invoked when the scheduler re-registers with a newly elected Mesos master.
+ * This is only called when the scheduler has previously been registered.
+ * MasterInfo containing the updated information about the elected master
+ * is provided as an argument.
+ */
+virtual void reregistered(SchedulerDriver* driver,
                           const MasterInfo& masterInfo) = 0;
 
-  /**
-   * Invoked when the scheduler re-registers with a newly elected Mesos master.
-   * This is only called when the scheduler has previously been registered.
-   * MasterInfo containing the updated information about the elected master
-   * is provided as an argument.
-   */
-  virtual void reregistered(SchedulerDriver* driver,
-                            const MasterInfo& masterInfo) = 0;
-
-  /**
-   * Invoked when the scheduler becomes "disconnected" from the master
-   * (e.g., the master fails and another is taking over).
-   */
-  virtual void disconnected(SchedulerDriver* driver) = 0;
-
-  /**
-   * Invoked when resources have been offered to this framework. A
-   * single offer will only contain resources from a single slave.
-   * Resources associated with an offer will not be re-offered to
-   * _this_ framework until either (a) this framework has rejected
-   * those resources (see SchedulerDriver::launchTasks) or (b) those
-   * resources have been rescinded (see Scheduler::offerRescinded).
-   * Note that resources may be concurrently offered to more than one
-   * framework at a time (depending on the allocator being used). In
-   * that case, the first framework to launch tasks using those
-   * resources will be able to use them while the other frameworks
-   * will have those resources rescinded (or if a framework has
-   * already launched tasks with those resources then those tasks will
-   * fail with a TASK_LOST status and a message saying as much).
-   */
-  virtual void resourceOffers(SchedulerDriver* driver,
-                              const std::vector<Offer>& offers) = 0;
-
-  /**
-   * Invoked when an offer is no longer valid (e.g., the slave was
-   * lost or another framework used resources in the offer). If for
-   * whatever reason an offer is never rescinded (e.g., dropped
-   * message, failing over framework, etc.), a framwork that attempts
-   * to launch tasks using an invalid offer will receive TASK_LOST
-   * status updats for those tasks (see Scheduler::resourceOffers).
-   */
-  virtual void offerRescinded(SchedulerDriver* driver,
-                              const OfferID& offerId) = 0;
-
-  /**
-   * Invoked when the status of a task has changed (e.g., a slave is
-   * lost and so the task is lost, a task finishes and an executor
-   * sends a status update saying so, etc). If implicit
-   * acknowledgements are being used, then returning from this
-   * callback _acknowledges_ receipt of this status update! If for
-   * whatever reason the scheduler aborts during this callback (or
-   * the process exits) another status update will be delivered (note,
-   * however, that this is currently not true if the slave sending the
-   * status update is lost/fails during that time). If explicit
-   * acknowledgements are in use, the scheduler must acknowledge this
-   * status on the driver.
-   */
-  virtual void statusUpdate(SchedulerDriver* driver,
-                            const TaskStatus& status) = 0;
-
-  /**
-   * Invoked when an executor sends a message. These messages are best
-   * effort; do not expect a framework message to be retransmitted in
-   * any reliable fashion.
-   */
-  virtual void frameworkMessage(SchedulerDriver* driver,
-                                const ExecutorID& executorId,
-                                const SlaveID& slaveId,
-                                const std::string& data) = 0;
-
-  /**
-   * Invoked when a slave has been determined unreachable (e.g.,
-   * machine failure, network partition). Most frameworks will need to
-   * reschedule any tasks launched on this slave on a new slave.
-   */
-  virtual void slaveLost(SchedulerDriver* driver,
-                         const SlaveID& slaveId) = 0;
-
-  /**
-   * Invoked when an executor has exited/terminated. Note that any
-   * tasks running will have TASK_LOST status updates automagically
-   * generated.
-   */
-  virtual void executorLost(SchedulerDriver* driver,
-                            const ExecutorID& executorId,
-                            const SlaveID& slaveId,
-                            int status) = 0;
-
-  /**
-   * Invoked when there is an unrecoverable error in the scheduler or
-   * scheduler driver. The driver will be aborted BEFORE invoking this
-   * callback.
-   */
-  virtual void error(SchedulerDriver* driver, const std::string& message) = 0;
-```
+/*
+ * Invoked when the scheduler becomes "disconnected" from the master
+ * (e.g., the master fails and another is taking over).
+ */
+virtual void disconnected(SchedulerDriver* driver) = 0;
+
+/*
+ * Invoked when resources have been offered to this framework. A
+ * single offer will only contain resources from a single slave.
+ * Resources associated with an offer will not be re-offered to
+ * _this_ framework until either (a) this framework has rejected
+ * those resources (see SchedulerDriver::launchTasks) or (b) those
+ * resources have been rescinded (see Scheduler::offerRescinded).
+ * Note that resources may be concurrently offered to more than one
+ * framework at a time (depending on the allocator being used). In
+ * that case, the first framework to launch tasks using those
+ * resources will be able to use them while the other frameworks
+ * will have those resources rescinded (or if a framework has
+ * already launched tasks with those resources then those tasks will
+ * fail with a TASK_LOST status and a message saying as much).
+ */
+virtual void resourceOffers(SchedulerDriver* driver,
+                            const std::vector<Offer>& offers) = 0;
+
+/*
+ * Invoked when an offer is no longer valid (e.g., the slave was
+ * lost or another framework used resources in the offer). If for
+ * whatever reason an offer is never rescinded (e.g., dropped
+ * message, failing over framework, etc.), a framwork that attempts
+ * to launch tasks using an invalid offer will receive TASK_LOST
+ * status updats for those tasks (see Scheduler::resourceOffers).
+ */
+virtual void offerRescinded(SchedulerDriver* driver,
+                            const OfferID& offerId) = 0;
+
+/*
+ * Invoked when the status of a task has changed (e.g., a slave is
+ * lost and so the task is lost, a task finishes and an executor
+ * sends a status update saying so, etc). If implicit
+ * acknowledgements are being used, then returning from this
+ * callback _acknowledges_ receipt of this status update! If for
+ * whatever reason the scheduler aborts during this callback (or
+ * the process exits) another status update will be delivered (note,
+ * however, that this is currently not true if the slave sending the
+ * status update is lost/fails during that time). If explicit
+ * acknowledgements are in use, the scheduler must acknowledge this
+ * status on the driver.
+ */
+virtual void statusUpdate(SchedulerDriver* driver,
+                          const TaskStatus& status) = 0;
+
+/*
+ * Invoked when an executor sends a message. These messages are best
+ * effort; do not expect a framework message to be retransmitted in
+ * any reliable fashion.
+ */
+virtual void frameworkMessage(SchedulerDriver* driver,
+                              const ExecutorID& executorId,
+                              const SlaveID& slaveId,
+                              const std::string& data) = 0;
+
+/*
+ * Invoked when a slave has been determined unreachable (e.g.,
+ * machine failure, network partition). Most frameworks will need to
+ * reschedule any tasks launched on this slave on a new slave.
+ */
+virtual void slaveLost(SchedulerDriver* driver,
+                       const SlaveID& slaveId) = 0;
+
+/*
+ * Invoked when an executor has exited/terminated. Note that any
+ * tasks running will have TASK_LOST status updates automagically
+ * generated.
+ */
+virtual void executorLost(SchedulerDriver* driver,
+                          const ExecutorID& executorId,
+                          const SlaveID& slaveId,
+                          int status) = 0;
+
+/*
+ * Invoked when there is an unrecoverable error in the scheduler or
+ * scheduler driver. The driver will be aborted BEFORE invoking this
+ * callback.
+ */
+virtual void error(SchedulerDriver* driver, const std::string& message) = 0;
+~~~
 
 ## Create your Framework Executor
 
@@ -136,73 +135,73 @@ Your framework executor must inherit from the Executor class. It must override t
 
 Declared in `MESOS_HOME/include/mesos/executor.hpp`
 
-```
-  /**
-   * Invoked once the executor driver has been able to successfully
-   * connect with Mesos. In particular, a scheduler can pass some
-   * data to it's executors through the FrameworkInfo.ExecutorInfo's
-   * data field.
-   */
-  virtual void registered(ExecutorDriver* driver,
-                          const ExecutorInfo& executorInfo,
-                          const FrameworkInfo& frameworkInfo,
+~~~{.cpp}
+/*
+ * Invoked once the executor driver has been able to successfully
+ * connect with Mesos. In particular, a scheduler can pass some
+ * data to it's executors through the FrameworkInfo.ExecutorInfo's
+ * data field.
+ */
+virtual void registered(ExecutorDriver* driver,
+                        const ExecutorInfo& executorInfo,
+                        const FrameworkInfo& frameworkInfo,
+                        const SlaveInfo& slaveInfo) = 0;
+
+/*
+ * Invoked when the executor re-registers with a restarted slave.
+ */
+virtual void reregistered(ExecutorDriver* driver,
                           const SlaveInfo& slaveInfo) = 0;
 
-  /**
-   * Invoked when the executor re-registers with a restarted slave.
-   */
-  virtual void reregistered(ExecutorDriver* driver,
-                            const SlaveInfo& slaveInfo) = 0;
-
-  /**
-   * Invoked when the executor becomes "disconnected" from the slave
-   * (e.g., the slave is being restarted due to an upgrade).
-   */
-  virtual void disconnected(ExecutorDriver* driver) = 0;
-
-  /**
-   * Invoked when a task has been launched on this executor (initiated
-   * via Scheduler::launchTasks). Note that this task can be realized
-   * with a thread, a process, or some simple computation, however, no
-   * other callbacks will be invoked on this executor until this
-   * callback has returned.
-   */
-  virtual void launchTask(ExecutorDriver* driver,
-                          const TaskInfo& task) = 0;
-
-  /**
-   * Invoked when a task running within this executor has been killed
-   * (via SchedulerDriver::killTask). Note that no status update will
-   * be sent on behalf of the executor, the executor is responsible
-   * for creating a new TaskStatus (i.e., with TASK_KILLED) and
-   * invoking ExecutorDriver::sendStatusUpdate.
-   */
-  virtual void killTask(ExecutorDriver* driver, const TaskID& taskId) = 0;
-
-  /**
-   * Invoked when a framework message has arrived for this
-   * executor. These messages are best effort; do not expect a
-   * framework message to be retransmitted in any reliable fashion.
-   */
-    virtual void frameworkMessage(ExecutorDriver* driver,
-                                  const std::string& data) = 0;
-
-  /**
-   * Invoked when the executor should terminate all of it's currently
-   * running tasks. Note that after a Mesos has determined that an
-   * executor has terminated any tasks that the executor did not send
-   * terminal status updates for (e.g., TASK_KILLED, TASK_FINISHED,
-   * TASK_FAILED, etc) a TASK_LOST status update will be created.
-   */
-  virtual void shutdown(ExecutorDriver* driver) = 0;
-
-  /**
-   * Invoked when a fatal error has occurred with the executor and/or
-   * executor driver. The driver will be aborted BEFORE invoking this
-   * callback.
-   */
-  virtual void error(ExecutorDriver* driver, const std::string& message) = 0;
-```
+/*
+ * Invoked when the executor becomes "disconnected" from the slave
+ * (e.g., the slave is being restarted due to an upgrade).
+ */
+virtual void disconnected(ExecutorDriver* driver) = 0;
+
+/*
+ * Invoked when a task has been launched on this executor (initiated
+ * via Scheduler::launchTasks). Note that this task can be realized
+ * with a thread, a process, or some simple computation, however, no
+ * other callbacks will be invoked on this executor until this
+ * callback has returned.
+ */
+virtual void launchTask(ExecutorDriver* driver,
+                        const TaskInfo& task) = 0;
+
+/*
+ * Invoked when a task running within this executor has been killed
+ * (via SchedulerDriver::killTask). Note that no status update will
+ * be sent on behalf of the executor, the executor is responsible
+ * for creating a new TaskStatus (i.e., with TASK_KILLED) and
+ * invoking ExecutorDriver::sendStatusUpdate.
+ */
+virtual void killTask(ExecutorDriver* driver, const TaskID& taskId) = 0;
+
+/*
+ * Invoked when a framework message has arrived for this
+ * executor. These messages are best effort; do not expect a
+ * framework message to be retransmitted in any reliable fashion.
+ */
+virtual void frameworkMessage(ExecutorDriver* driver,
+                              const std::string& data) = 0;
+
+/*
+ * Invoked when the executor should terminate all of it's currently
+ * running tasks. Note that after a Mesos has determined that an
+ * executor has terminated any tasks that the executor did not send
+ * terminal status updates for (e.g., TASK_KILLED, TASK_FINISHED,
+ * TASK_FAILED, etc) a TASK_LOST status update will be created.
+ */
+virtual void shutdown(ExecutorDriver* driver) = 0;
+
+/*
+ * Invoked when a fatal error has occurred with the executor and/or
+ * executor driver. The driver will be aborted BEFORE invoking this
+ * callback.
+ */
+virtual void error(ExecutorDriver* driver, const std::string& message) = 0;
+~~~
 
 ## Install your Framework
 
@@ -216,23 +215,23 @@ When your framework registers an executor or launches a task, it can provide add
 
 The optional `DiscoveryInfo` message for `TaskInfo` and `ExecutorInfo` is declared in  `MESOS_HOME/include/mesos/mesos.proto`
 
-```
-message DiscoveryInfo {
-  enum Visibility {
-    FRAMEWORK = 0;
-    CLUSTER = 1;
-    EXTERNAL = 2;
-  }
-
-  required Visibility visibility = 1;
-  optional string name = 2;
-  optional string environment = 3;
-  optional string location = 4;
-  optional string version = 5;
-  optional Ports ports = 6;
-  optional Labels labels = 7;
-}
-```
+
+    message DiscoveryInfo {
+      enum Visibility {
+        FRAMEWORK = 0;
+        CLUSTER = 1;
+        EXTERNAL = 2;
+      }
+
+      required Visibility visibility = 1;
+      optional string name = 2;
+      optional string environment = 3;
+      optional string location = 4;
+      optional string version = 5;
+      optional Ports ports = 6;
+      optional Labels labels = 7;
+    }
+
 
 `Visibility` is the key parameter that instructs the service discovery system whether a service should be discoverable. We currently differentiate between three cases:
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/clang-format.md
----------------------------------------------------------------------
diff --git a/docs/clang-format.md b/docs/clang-format.md
index 909a253..3824ec0 100644
--- a/docs/clang-format.md
+++ b/docs/clang-format.md
@@ -14,25 +14,25 @@ layout: documentation
 
 #### Ubuntu 14.04
 
-```bash
-# Ensure apt-get is up to date.
-sudo apt-get update
 
-# Install clang-format-3.5
-sudo apt-get install clang-format-3.5
-```
+    # Ensure apt-get is up to date.
+    sudo apt-get update
+
+    # Install clang-format-3.5
+    sudo apt-get install clang-format-3.5
+
 
 #### OS X Yosemite
 
-```bash
-# Install clang-3.5. The binaries are suffixed with '-3.5', e.g. 'clang++-3.5'.
-$ brew install llvm35 --with-clang
 
-# Download and install the clang-format scripts.
-$ wget http://llvm.org/releases/3.5.1/cfe-3.5.1.src.tar.xz
-$ tar -xzf cfe-3.5.1.src.tar.xz
-$ cp cfe-3.5.1.src/tools/clang-format/clang-format* `brew --cellar`/llvm35/3.5.1/share/clang-3.5
-```
+    # Install clang-3.5. The binaries are suffixed with '-3.5', e.g. 'clang++-3.5'.
+    $ brew install llvm35 --with-clang
+
+    # Download and install the clang-format scripts.
+    $ wget http://llvm.org/releases/3.5.1/cfe-3.5.1.src.tar.xz
+    $ tar -xzf cfe-3.5.1.src.tar.xz
+    $ cp cfe-3.5.1.src/tools/clang-format/clang-format* `brew --cellar`/llvm35/3.5.1/share/clang-3.5
+
 
 ### Formatting Configuration
 
@@ -52,17 +52,13 @@ Add the following to your `.vimrc`:
 
 Ubuntu:
 
-```
-map <C-K> :pyf /usr/share/vim/addons/syntax/clang-format-3.5.py<cr>
-imap <C-K> <c-o>:pyf /usr/share/vim/addons/syntax/clang-format-3.5.py<cr>
-```
+    map <C-K> :pyf /usr/share/vim/addons/syntax/clang-format-3.5.py<cr>
+    imap <C-K> <c-o>:pyf /usr/share/vim/addons/syntax/clang-format-3.5.py<cr>
 
 OS X:
 
-```
-map <C-K> :pyf /usr/local/share/clang-3.5/clang-format.py<cr>
-imap <C-K> <c-o>:pyf /usr/local/share/clang-3.5/clang-format.py<cr>
-```
+    map <C-K> :pyf /usr/local/share/clang-3.5/clang-format.py<cr>
+    imap <C-K> <c-o>:pyf /usr/local/share/clang-3.5/clang-format.py<cr>
 
 The first line enables clang-format for `NORMAL` and `VISUAL` mode, the second line adds support for `INSERT` mode. Change `C-K` to another binding if you need clang-format on a different key (`C-K` stands for `Ctrl+k`).
 
@@ -78,17 +74,13 @@ Add the following to your `.emacs`:
 
 Ubuntu:
 
-```
-(load "/usr/share/emacs/site-lisp/clang-format-3.5/clang-format.el")
-(global-set-key [C-M-tab] 'clang-format-region)
-```
+    (load "/usr/share/emacs/site-lisp/clang-format-3.5/clang-format.el")
+    (global-set-key [C-M-tab] 'clang-format-region)
 
 OS X:
 
-```
-(load "/usr/local/share/clang-3.5/clang-format.el")
-(global-set-key [C-M-tab] 'clang-format-region)
-```
+    (load "/usr/local/share/clang-3.5/clang-format.el")
+    (global-set-key [C-M-tab] 'clang-format-region)
 
 This binds the function `clang-format-region` to `C-M-tab`, which then formats the current line or selected region.
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/mesos-c++-style-guide.md
----------------------------------------------------------------------
diff --git a/docs/mesos-c++-style-guide.md b/docs/mesos-c++-style-guide.md
index 94107ed..a8bec8e 100644
--- a/docs/mesos-c++-style-guide.md
+++ b/docs/mesos-c++-style-guide.md
@@ -12,16 +12,16 @@ The Mesos codebase follows the [Google C++ Style Guide](http://google-styleguide
 * We use [lowerCamelCase](http://en.wikipedia.org/wiki/CamelCase#Variations_and_synonyms) for variable names (Google uses snake_case, and their class member variables have trailing underscores).
 * We prepend constructor and function arguments with a leading underscore to avoid ambiguity and / or shadowing:
 
-```
+~~~{.cpp}
 Try(State _state, T* _t = NULL, const std::string& _message = "")
   : state(_state), t(_t), message(_message) {}
-```
+~~~
 
 * Prefer trailing underscores for use as member fields (but not required). Some trailing underscores are used to distinguish between similar variables in the same scope (think prime symbols), *but this should be avoided as much as possible, including removing existing instances in the code base.*
 
 * If you find yourself creating a copy of an argument passed by const reference, consider passing it by value instead (if you don't want to use a leading underscore and copy in the body of the function):
 
-```
+~~~{.cpp}
 // You can pass-by-value in ProtobufProcess::install() handlers.
 void Slave::statusUpdate(StatusUpdate update, const UPID& pid)
 {
@@ -30,8 +30,7 @@ void Slave::statusUpdate(StatusUpdate update, const UPID& pid)
       pid == UPID() ? TaskStatus::SOURCE_SLAVE : TaskStatus::SOURCE_EXECUTOR);
   ...
 }
-```
-
+~~~
 
 ### Constant Names
 * We use [SCREAMING_SNAKE_CASE](http://en.wikipedia.org/wiki/Letter_case#Special_case_styles) for constant names (Google uses a `k` followed by mixed case, e.g. `kDaysInAWeek`).
@@ -64,7 +63,7 @@ void Slave::statusUpdate(StatusUpdate update, const UPID& pid)
 * Newline when calling or defining a function: indent with 4 spaces.
 * We do not follow Google's style of wrapping on the open parenthesis, the general goal is to reduce visual "jaggedness" in the code. Prefer (1), (4), (5), sometimes (3), never (2):
 
-```
+~~~{.cpp}
 // 1: OK.
 allocator->resourcesRecovered(frameworkId, slaveId, resources, filters);
 
@@ -93,15 +92,15 @@ allocator->resourcesRecovered(
 // 5: OK.
 allocator->resourcesRecovered(
     frameworkId, slaveId, resources, filters);
-```
+~~~
 
 ### Continuation
 * Newline for an assignment statement: indent with 2 spaces.
 
-```
+~~~{.cpp}
 Try<Duration> failoverTimeout =
   Duration::create(FrameworkInfo().failover_timeout());
-```
+~~~
 
 ## Empty Lines
 * 1 blank line at the end of the file.
@@ -112,7 +111,7 @@ Try<Duration> failoverTimeout =
 
 We disallow capturing **temporaries** by reference. See [MESOS-2629](https://issues.apache.org/jira/browse/MESOS-2629) for the rationale.
 
-```
+~~~{.cpp}
 Future<Nothing> f() { return Nothing(); }
 Future<bool> g() { return false; }
 
@@ -150,7 +149,7 @@ const T& t_ = t.member();
 
 // 4: Can also use.
 const T t = T("Hello").member();
-```
+~~~
 
 We allow capturing non-temporaries by *constant reference* when the intent is to **alias**.
 
@@ -160,7 +159,7 @@ The goal is to make code more concise and improve readability. Use this if an ex
 * Would benefit from a concise name to provide context for readability.
 * Will **not** be invalidated during the lifetime of the alias. Otherwise document this explicitly.
 
-```
+~~~{.cpp}
 hashmap<string, hashset<int>> index;
 
 // 1: Ok.
@@ -185,49 +184,46 @@ string& s = strings[0];
 strings.erase(strings.begin());
 
 s += "world"; // THIS IS A DANGLING REFERENCE!
-```
+~~~
 
 ## File Headers
 
 * Mesos source files must contain the "ASF" header:
 
-```
-/**
- * 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.
- */
-```
+        /**
+         * 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.
+         */
+
 
 * Stout and libprocess source files must contain the "Apache License Version 2.0" header:
 
-```
-/**
- * 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
- */
-```
+        /**
+         * 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
+         */
 
 ## C++11
 
@@ -237,7 +233,7 @@ We support C++11 and require GCC 4.8+ or Clang 3.5+ compilers. The whitelist of
 * Multiple right angle brackets.
 * Type inference (`auto` and `decltype`). The main goal is to increase code readability. This is safely the case if the exact same type omitted on the left is already fully stated on the right. Here are several examples:
 
-```
+~~~{.cpp}
 // 1: OK.
 const auto& i = values.find(keys.front());
 // Compare with
@@ -252,7 +248,7 @@ shared_ptr<list<string>> names = shared_ptr<list<string>>(new list<string>());
 auto authorizer = LocalAuthorizer::create(acls);
 // Compare with
 Try<Owned<LocalAuthorizer>> authorizer = LocalAuthorizer::create();
-```
+~~~
 
 * Rvalue references.
 * Explicitly-defaulted functions.
@@ -268,265 +264,263 @@ Try<Owned<LocalAuthorizer>> authorizer = LocalAuthorizer::create();
 * Lambdas!
   * Don't put a space between the capture list and the parameter list:
 
-    ```
-    // 1: OK.
-    []() { ...; };
+~~~{.cpp}
+// 1: OK.
+[]() { ...; };
 
-    // 2: Don't use.
-    [] () { ...; };
-    ```
+// 2: Don't use.
+[] () { ...; };
+~~~
 
   * Prefer default capture by value, explicit capture by value, then capture by reference. To avoid dangling-pointer bugs, *never* use default capture by reference:
 
-    ```
-    // 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.
+~~~{.cpp}
+// 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.
-    ```
+// 2: Don't use.
+[&]() { ... }; // Default capture by reference.
+~~~
 
   * Use `mutable` only when absolutely necessary.
 
-    ```
-    // 1: OK.
-    []() mutable { ...; };
-    ```
+~~~{.cpp}
+// 1: OK.
+[]() mutable { ...; };
+~~~
 
   * Feel free to ignore the return type by default, adding it as necessary to appease the compiler or be more explicit for the reader.
 
-    ```
-    // 1: OK.
-    []() { return true; };
-    []() -> bool { return ambiguous(); };
-    ```
+~~~{.cpp}
+// 1: OK.
+[]() { return true; };
+[]() -> bool { return ambiguous(); };
+~~~
 
   * Feel free to use `auto` when naming a lambda expression:
 
-    ```
-    // 1: OK.
-    auto lambda = []() { ...; };
-    ```
+~~~{.cpp}
+// 1: OK.
+auto lambda = []() { ...; };
+~~~
 
   * Format lambdas similar to how we format functions and methods. Feel free to let lambdas be one-liners:
 
-    ```
-    // 1: OK.
-    auto lambda = []() {
-      ...;
-    };
-
-    // 2: OK.
-    auto lambda = []() { ...; };
-    ```
-
-    Feel free to inline lambdas within function arguments:
-
-    ```
-    instance.method([]() {
-      ...;
-    });
-    ```
-
-    Chain function calls on a newline after the closing brace of the lambda and the closing parenthesis of function call:
-
-    ```
-    // 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([]() {
-      ...;
-    });
-    ```
-
-    Wrap capture lists indepedently of parameters, *use the same formatting as if the capture list were template parameters*:
-
-
-    ```
-    // 1: OK.
-    function([&capture1, &capture2, &capture3](
-        const T1& p1, const T2& p2, const T3& p3) {
-      ...;
-    });
+~~~{.cpp}
+// 1: OK.
+auto lambda = []() {
+  ...;
+};
 
-    function(
-        [&capture1, &capture2, &capture3](
-            const T1& p1, const T2& p2, const T3& p3) {
-      ...;
-    });
+// 2: OK.
+auto lambda = []() { ...; };
+~~~
 
-    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) {
-      ...;
-    });
+  * Feel free to inline lambdas within function arguments:
+
+~~~{.cpp}
+instance.method([]() {
+  ...;
+});
+~~~
 
-    auto lambda = [&capture1,
-                   &capture2,
-                   &capture3,
-                   &capture4](
+  * Chain function calls on a newline after the closing brace of the lambda and the closing parenthesis of function call:
+
+~~~{.cpp}
+// 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([]() {
+  ...;
+});
+~~~
+
+  * Wrap capture lists indepedently of parameters, *use the same formatting as if the capture list were template parameters*:
+
+~~~{.cpp}
+// 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) {
-      ...;
-    };
-
-    // 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) {
-      ...;
-    };
+  ...;
+});
+
+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) {
+  ...;
+};
 
-    // 6: OK (parameter list longer than 80 characters).
-    function([&capture1, &capture2, &capture3](
+// 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](
+  ...;
+});
+
+auto lambda = [
+    &capture1,
+    &capture2,
+    &capture3,
+    &capture4](
         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) {
-      ...;
-    };
-    ```
+  ...;
+};
+~~~
 
 * Unrestricted Union.
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/mesos-doxygen-style-guide.md
----------------------------------------------------------------------
diff --git a/docs/mesos-doxygen-style-guide.md b/docs/mesos-doxygen-style-guide.md
index 93a5e70..be9b012 100644
--- a/docs/mesos-doxygen-style-guide.md
+++ b/docs/mesos-doxygen-style-guide.md
@@ -48,23 +48,23 @@ Example:
 
 This is the allowed set of doxygen tags that can be used.
 
-* [@param](http://doxygen.org/manual/commands.html#cmdparam) Describes function parameters.
-* [@return](http://doxygen.org/manual/commands.html#cmdreturn) Describes return values.
-* [@see](http://doxygen.org/manual/commands.html#cmdsa) Describes a cross-reference to classes, functions, methods, variables, files or URL.
-* [@file](http://doxygen.org/manual/commands.html#cmdfile) Describes a refence to a file. It is required when documenting global functions, variables, typedefs, or enums in separate files.
-* [@link](http://doxygen.org/manual/commands.html#cmdlink) and [@endlink](http://doxygen.org/manual/commands.html#cmdendlink) Describes a link to a file, class, or member.
-* [@example](http://doxygen.org/manual/commands.html#cmdexample) Describes source code examples.
-* [@todo](http://doxygen.org/manual/commands.html#cmdtodo) Describes a TODO item.
-* [@image](http://doxygen.org/manual/commands.html#cmdimage) Describes an image.
+ * [\@param](http://doxygen.org/manual/commands.html#cmdparam) Describes function parameters.
+ * [\@return](http://doxygen.org/manual/commands.html#cmdreturn) Describes return values.
+ * [\@see](http://doxygen.org/manual/commands.html#cmdsa) Describes a cross-reference to classes, functions, methods, variables, files or URL.
+ * [\@file](http://doxygen.org/manual/commands.html#cmdfile) Describes a refence to a file. It is required when documenting global functions, variables, typedefs, or enums in separate files.
+ * [\@link](http://doxygen.org/manual/commands.html#cmdlink) and [\@endlink](http://doxygen.org/manual/commands.html#cmdendlink) Describes a link to a file, class, or member.
+ * [\@example](http://doxygen.org/manual/commands.html#cmdexample) Describes source code examples.
+ * [\@todo](http://doxygen.org/manual/commands.html#cmdtodo) Describes a TODO item.
+ * [\@image](http://doxygen.org/manual/commands.html#cmdimage) Describes an image.
 
-*When following these links be aware that the doxygen documentation is using another syntax in that @param is explained as \param.*
+ * When following these links be aware that the doxygen documentation is using another syntax in that \@param is explained as \\param.
 
 
 ### Wrapping
 
 We wrap long descriptions using four spaces on the next line.
 
-~~~
+~~~{.cpp}
 @param uncompressed The input string that requires
     a very long description and an even longer
     description on this line as well.
@@ -77,10 +77,10 @@ Example:
 
 ~~~{.cpp}
 /**
-  * Prefix used to name Docker containers in order to distinguish
-  * those created by Mesos from those created manually.
-  */
-  extern const std::string DOCKER_NAME_PREFIX;
+ * Prefix used to name Docker containers in order to distinguish
+ * those created by Mesos from those created manually.
+ */
+extern const std::string DOCKER_NAME_PREFIX;
 ~~~
 
 
@@ -94,7 +94,7 @@ Example:
  * If the mode is not PIPE, None will be stored.
  * @note: stdin is a macro on some systems, hence this name instead.
  */
- Option<int> in;
+Option<int> in;
 ~~~
 
 
@@ -119,8 +119,9 @@ Example:
  * @param out Redirection specification for stdout.
  * @param err Redirection specification for stderr.
  * @param flags Flags to be stringified and appended to 'argv'.
- * @param environment Environment variables to add or overwrite
- *     existing environment variables.
+ * @param environment Environment variables to use for the new
+ *     subprocess or if None (the default) then the new subprocess
+ *     will inherit the environment of the current process.
  * @param setup Function to be invoked after forking but before
  *     exec'ing. NOTE: Take extra care not to invoke any
  *     async unsafe code in the body of this function.
@@ -129,16 +130,16 @@ Example:
  * @return The subprocess or an error if one occurred.
  */
 Try<Subprocess> subprocess(
-   const std::string& path,
-   std::vector<std::string> argv,
-   const Subprocess::IO& in = Subprocess::FD(STDIN_FILENO),
-   const Subprocess::IO& out = Subprocess::FD(STDOUT_FILENO),
-   const Subprocess::IO& err = Subprocess::FD(STDERR_FILENO),
-   const Option<flags::FlagsBase>& flags = None(),
-   const Option<std::map<std::string, std::string>>& environment = None(),
-   const Option<lambda::function<int()>>& setup = None(),
-   const Option<lambda::function<
-       pid_t(const lambda::function<int()>&)>>& clone = None());
+    const std::string& path,
+    std::vector<std::string> argv,
+    const Subprocess::IO& in = Subprocess::FD(STDIN_FILENO),
+    const Subprocess::IO& out = Subprocess::FD(STDOUT_FILENO),
+    const Subprocess::IO& err = Subprocess::FD(STDERR_FILENO),
+    const Option<flags::FlagsBase>& flags = None(),
+    const Option<std::map<std::string, std::string>>& environment = None(),
+    const Option<lambda::function<int()>>& setup = None(),
+    const Option<lambda::function<
+        pid_t(const lambda::function<int()>&)>>& clone = None());
 ~~~
 
 
@@ -148,14 +149,16 @@ Example:
 
 ~~~{.cpp}
 /**
-* Represents a fork() exec()ed subprocess. Access is provided to the
-* input / output of the process, as well as the exit status. The
-* input / output file descriptors are only closed after:
-*   1. The subprocess has terminated.
-*   2. There are no longer any references to the associated
-*      Subprocess object.
-*/
+ * Represents a fork() exec()ed subprocess. Access is provided to the
+ * input / output of the process, as well as the exit status. The
+ * input / output file descriptors are only closed after:
+ *   1. The subprocess has terminated.
+ *   2. There are no longer any references to the associated
+ *      Subprocess object.
+ */
 class Subprocess
+{
+public:
 ~~~
 
 
@@ -171,22 +174,21 @@ This page must be located in the top directory of the library/component and name
 The first line in such a document must be a section heading bearing the title which will appear in the generated Doxygen index.
 Example: "# Libprocess Developer Guide"
 
-
 ### Example Code
 
-Code examples must be enclosed by '~~~{.Language}'
-
+C++ code examples should be enclosed by '~~~{.cpp}'.
 
 Example:
-~~~{.text}
-    ~~~{.cpp}
-    int main(int argc, char** argv)
-    {
-      ....
-    }
-    ~~~
+
+~~~{.cpp}
+int main(int argc, char** argv)
+{
+  ...
+}
 ~~~
 
+**NOTE**: Because of shortcomings of Doxygen's markdown parser we currently use indentation for wrapping all non C++ code blocks.
+
 
 ## Building Doxygen Documentation
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/mesos-markdown-style-guide.md
----------------------------------------------------------------------
diff --git a/docs/mesos-markdown-style-guide.md b/docs/mesos-markdown-style-guide.md
index 7ea0b1d..d5b7804 100644
--- a/docs/mesos-markdown-style-guide.md
+++ b/docs/mesos-markdown-style-guide.md
@@ -23,15 +23,14 @@ These should be reflected in `configuration.md`!
 
 Code examples should be specified as follows:
 
-~~~{.txt}
     ~~~{.cpp}
     int main(int argc, char** argv)
     {
       ....
     }
     ~~~
-~~~
 
+**NOTE**: Because of shortcomings of Doxygen's markdown parser we currently use indentation for wrapping all non C++ code blocks.
 
 ## Notes/Emphasis
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/mesos-testing-patterns.md
----------------------------------------------------------------------
diff --git a/docs/mesos-testing-patterns.md b/docs/mesos-testing-patterns.md
index 6383786..d0d92ff 100644
--- a/docs/mesos-testing-patterns.md
+++ b/docs/mesos-testing-patterns.md
@@ -13,51 +13,51 @@ Scheduling a sequence of events in an asynchronous environment is not easy: a fu
 Every message enqueued in a libprocess process' (or actor's, to avoid ambiguity with OS processes) mailbox is processed by `ProcessManager` (right now there is a single instance of `ProcessManager` per OS process, but this may change in the future). `ProcessManager` fetches actors from the runnable actors list and services all events from the actor's mailbox. Using `Clock::settle()` call we can block the calling thread until `ProcessManager` empties mailboxes of all actors. Here is the example of this pattern:
 
 ~~~{.cpp}
-  // As Master::killTask isn't doing anything, we shouldn't get a status update.
-  EXPECT_CALL(sched, statusUpdate(&driver, _))
-    .Times(0);
+// As Master::killTask isn't doing anything, we shouldn't get a status update.
+EXPECT_CALL(sched, statusUpdate(&driver, _))
+  .Times(0);
 
-  // Set expectation that Master receives killTask message.
-  Future<KillTaskMessage> killTaskMessage =
-    FUTURE_PROTOBUF(KillTaskMessage(), _, master.get());
+// Set expectation that Master receives killTask message.
+Future<KillTaskMessage> killTaskMessage =
+  FUTURE_PROTOBUF(KillTaskMessage(), _, master.get());
 
-  // Attempt to kill unknown task while slave is transitioning.
-  TaskID unknownTaskId;
-  unknownTaskId.set_value("2");
+// Attempt to kill unknown task while slave is transitioning.
+TaskID unknownTaskId;
+unknownTaskId.set_value("2");
 
-  // Stop the clock.
-  Clock::pause();
+// Stop the clock.
+Clock::pause();
 
-  // Initiate an action.
-  driver.killTask(unknownTaskId);
+// Initiate an action.
+driver.killTask(unknownTaskId);
 
-  // Make sure the event associated with the action has been queued.
-  AWAIT_READY(killTaskMessage);
+// Make sure the event associated with the action has been queued.
+AWAIT_READY(killTaskMessage);
 
-  // Wait for all messages to be dispatched and processed completely to satisfy
-  // the expectation that we didn't receive a status update.
-  Clock::settle();
+// Wait for all messages to be dispatched and processed completely to satisfy
+// the expectation that we didn't receive a status update.
+Clock::settle();
 
-  Clock::resume();
+Clock::resume();
 ~~~
 
 ## Intercepting a message sent to a different OS process
 Intercepting messages sent between libprocess processes (let's call them actors to avoid ambiguity with OS processes) that live in the same OS process is easy, e.g.:
 
 ~~~{.cpp}
-  Future<SlaveReregisteredMessage> slaveReregisteredMessage =
-    FUTURE_PROTOBUF(SlaveReregisteredMessage(), _, _);
-  ...
-  AWAIT_READY(slaveReregisteredMessage);
+Future<SlaveReregisteredMessage> slaveReregisteredMessage =
+  FUTURE_PROTOBUF(SlaveReregisteredMessage(), _, _);
+...
+AWAIT_READY(slaveReregisteredMessage);
 ~~~
 
 However, this won't work if we want to intercept a message sent to an actor (technically a `UPID`) that lives in another OS process. For example, `CommandExecutor` spawned by a slave will live in a separate OS process, though master and slave instances live in the same OS process together with our test (see `mesos/src/tests/cluster.hpp`). The wait in this code will fail:
 
 ~~~{.cpp}
-  Future<ExecutorRegisteredMessage> executorRegisteredMessage =
-    FUTURE_PROTOBUF(ExecutorRegisteredMessage(), _, _);
-  ...
-  AWAIT_READY(executorRegisteredMessage);
+Future<ExecutorRegisteredMessage> executorRegisteredMessage =
+  FUTURE_PROTOBUF(ExecutorRegisteredMessage(), _, _);
+...
+AWAIT_READY(executorRegisteredMessage);
 ~~~
 
 ### Why messages sent outside the OS process are not intercepted?
@@ -71,11 +71,11 @@ Consider setting expectations on corresponding incoming messages ensuring they a
 For the aforementioned example, instead of intercepting `ExecutorRegisteredMessage`, we can intercept `RegisterExecutorMessage` and wait until its processed, which includes sending `ExecutorRegisteredMessage` (see `Slave::registerExecutor()`):
 
 ~~~{.cpp}
-  Future<RegisterExecutorMessage> registerExecutorMessage =
-    FUTURE_PROTOBUF(RegisterExecutorMessage(), _, _);
-  ...
-  AWAIT_READY(registerExecutorMessage);
-  Clock::pause();
-  Clock::settle();
-  Clock::resume();
+Future<RegisterExecutorMessage> registerExecutorMessage =
+  FUTURE_PROTOBUF(RegisterExecutorMessage(), _, _);
+...
+AWAIT_READY(registerExecutorMessage);
+Clock::pause();
+Clock::settle();
+Clock::resume();
 ~~~

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/modules.md
----------------------------------------------------------------------
diff --git a/docs/modules.md b/docs/modules.md
index d323f2a..12ee839 100644
--- a/docs/modules.md
+++ b/docs/modules.md
@@ -47,57 +47,53 @@ Use `--modules="{...}"` to specify the list of modules inline.
 1. Load a library `libfoo.so` with two modules `org_apache_mesos_bar` and
    `org_apache_mesos_baz`.
 
-   ```
-   {
-     "libraries": [
-       {
-         "file": "/path/to/libfoo.so",
-         "modules": [
-           {
-             "name": "org_apache_mesos_bar",
-           },
-           {
-             "name": "org_apache_mesos_baz"
-           }
-         ]
-       }
-     ]
-   }
-   ```
+        {
+          "libraries": [
+            {
+              "file": "/path/to/libfoo.so",
+              "modules": [
+                {
+                  "name": "org_apache_mesos_bar",
+                },
+                {
+                  "name": "org_apache_mesos_baz"
+                }
+              ]
+            }
+          ]
+        }
+
 
 2. Load the module `org_apache_mesos_bar` from the library `foo` and pass
    the command-line argument `X` with value `Y` (module `org_apache_mesos_baz`
    is loaded without any command-line parameters):
 
-   ```
-   {
-     "libraries": [
-       {
-         "name": "foo",
-         "modules": [
-           {
-             "name": "org_apache_mesos_bar"
-             "parameters": [
-               {
-                 "key": "X",
-                 "value": "Y",
-               }
-             ]
-           },
-           {
-             "name": "org_apache_mesos_bar"
-           }
-         ]
-       }
-     ]
-   }
-   ```
+        {
+          "libraries": [
+            {
+              "name": "foo",
+              "modules": [
+                {
+                  "name": "org_apache_mesos_bar"
+                  "parameters": [
+                    {
+                      "key": "X",
+                      "value": "Y",
+                    }
+                  ]
+                },
+                {
+                  "name": "org_apache_mesos_bar"
+                }
+              ]
+            }
+          ]
+        }
 
 3. Specifying modules inline:
 
-   ```
-   --modules='{"libraries":[{"file":"/path/to/libfoo.so", "modules":[{"name":"org_apache_mesos_bar"}]}]}'
-   ```
+        --modules='{"libraries":[{"file":"/path/to/libfoo.so", "modules":[{"name":"org_apache_mesos_bar"}]}]}'
+
 
 ### Library names
 
@@ -131,9 +127,8 @@ To load a custom allocator into Mesos master, you need to:
 
 For example, the following command will run the Mesos master with `ExternalAllocatorModule` (see [this section](#Example-JSON-strings) for JSON format):
 
-```
-./bin/mesos-master.sh --work_dir=m/work --modules="file://<modules-including-allocator>.json" --allocator=ExternalAllocatorModule
-```
+    ./bin/mesos-master.sh --work_dir=m/work --modules="file://<modules-including-allocator>.json" --allocator=ExternalAllocatorModule
+
 
 ### Anonymous
 
@@ -208,9 +203,8 @@ To load a hook into Mesos, you need to
 For example, the following command will run the Mesos slave with the
 `TestTaskHook` hook:
 
-```
-./bin/mesos-slave.sh --master=<IP>:<PORT> --modules="file://<path-to-modules-config>.json" --hooks=TestTaskHook
-```
+    ./bin/mesos-slave.sh --master=<IP>:<PORT> --modules="file://<path-to-modules-config>.json" --hooks=TestTaskHook
+
 
 ### Isolator
 
@@ -225,62 +219,61 @@ for GPGPU hardware, networking, etc.
 The following snippet describes the implementation of a module named
 "org_apache_mesos_bar" of "TestModule" kind:
 
-```
-  #include <iostream>
-  #include "test_module.hpp"
+~~~{.cpp}
+#include <iostream>
+#include "test_module.hpp"
 
-  class TestModuleImpl : public TestModule
+class TestModuleImpl : public TestModule
+{
+public:
+  TestModuleImpl()
   {
-  public:
-    TestModuleImpl()
-    {
-      std::cout << "HelloWorld!" << std::endl;
-    }
-
-    virtual int foo(char a, long b)
-    {
-      return a + b;
-    }
-
-    virtual int bar(float a, double b)
-    {
-      return a * b;
-    }
-  };
+    std::cout << "HelloWorld!" << std::endl;
+  }
 
-  static TestModule* create()
+  virtual int foo(char a, long b)
   {
-      return new TestModule();
+    return a + b;
   }
 
-  static bool compatible()
+  virtual int bar(float a, double b)
   {
-    return true;
+    return a * b;
   }
-
-  // Declares a module named 'org_apache_mesos_TestModule' of
-  // 'TestModule' kind.
-  // Mesos core binds the module instance pointer as needed.
-  // The compatible() hook is provided by the module for compatibility checks.
-  // The create() hook returns an object of type 'TestModule'.
-  mesos::modules::Module<TestModule> org_apache_mesos_TestModule(
-      MESOS_MODULE_API_VERSION,
-      MESOS_VERSION,
-      "Apache Mesos",
-      "modules@mesos.apache.org",
-      "This is a test module.",
-      compatible,
-      create);
-```
+};
+
+static TestModule* create()
+{
+    return new TestModule();
+}
+
+static bool compatible()
+{
+  return true;
+}
+
+// Declares a module named 'org_apache_mesos_TestModule' of
+// 'TestModule' kind.
+// Mesos core binds the module instance pointer as needed.
+// The compatible() hook is provided by the module for compatibility checks.
+// The create() hook returns an object of type 'TestModule'.
+mesos::modules::Module<TestModule> org_apache_mesos_TestModule(
+    MESOS_MODULE_API_VERSION,
+    MESOS_VERSION,
+    "Apache Mesos",
+    "modules@mesos.apache.org",
+    "This is a test module.",
+    compatible,
+    create);
+~~~
 
 ### Building a module
 
   The following assumes that Mesos is installed in the standard location, i.e.
   the Mesos dynamic library and header files are available.
-```
-  g++ -lmesos -fpic -o test_module.o test_module.cpp
-  $ gcc -shared -o libtest_module.so test_module.o
-```
+
+    g++ -lmesos -fpic -o test_module.o test_module.cpp
+    $ gcc -shared -o libtest_module.so test_module.o
 
 ### Testing a modules
 
@@ -288,9 +281,9 @@ Apart from testing the module by hand with explicit use of --modules flag, one
 can run the entire mesos test suite with the given module. For example, the
 following command will run the mesos test suite with the
 `org_apache_mesos_TestCpuIsolator` module selected for isolation:
-```
-./bin/mesos-tests.sh --modules="/home/kapil/mesos/isolator-module/modules.json" --isolation="org_apache_mesos_TestCpuIsolator"
-```
+
+    ./bin/mesos-tests.sh --modules="/home/kapil/mesos/isolator-module/modules.json" --isolation="org_apache_mesos_TestCpuIsolator"
+
 
 ### Module naming convention
 Each module name should be unique.  Having duplicate module names in the Json
@@ -371,7 +364,6 @@ must exist between the various versions:
 
 <tr>
 <td>0.29.0 </td> <td> 0.21.0 </td> <td> 0.18.0  </td> <td> NO </td> <td> Module/Library older than the kind version supported by Mesos. </td>
-<tr>
 </tr>
 
 <tr>
@@ -394,54 +386,51 @@ Initial version of the modules API.
 ## Appendix:
 ### JSON Schema:
 
-```
-  {
-    "type":"object",
-    "required":false,
-    "properties":{
-      "libraries": {
-        "type":"array",
-        "required":false,
-        "items":
-        {
-          "type":"object",
+    {
+      "type":"object",
+      "required":false,
+      "properties":{
+        "libraries":{
+          "type":"array",
           "required":false,
-          "properties":{
-            "file": {
-              "type":"string",
-              "required":false
-            },
-            "name": {
-              "type":"string",
-              "required":false
-            },
-            "modules": {
-              "type":"array",
-              "required":false,
-              "items":
-              {
-                "type":"object",
+          "items":{
+            "type":"object",
+            "required":false,
+            "properties":{
+              "file":{
+                "type":"string",
+                "required":false
+              },
+              "name":{
+                "type":"string",
+                "required":false
+              },
+              "modules":{
+                "type":"array",
                 "required":false,
-                "properties":{
-                  "name": {
-                    "type":"string",
-                    "required":true
-                  },
-                  "parameters": {
-                    "type":"array",
-                    "required":false,
-                    "items":
-                    {
-                      "type":"object",
+                "items":{
+                  "type":"object",
+                  "required":false,
+                  "properties":{
+                    "name":{
+                      "type":"string",
+                      "required":true
+                    },
+                    "parameters":{
+                      "type":"array",
                       "required":false,
-                      "properties":{
-                        "key": {
-                          "type":"string",
-                          "required":true
-                        },
-                        "value": {
-                          "type":"string",
-                          "required":true
+                      "items":{
+                        "type":"object",
+                        "required":false,
+                        "properties":{
+                          "key":{
+                            "type":"string",
+                            "required":true
+                          },
+                          "value":{
+                            "type":"string",
+                            "required":true
+                          }
                         }
                       }
                     }
@@ -453,5 +442,3 @@ Initial version of the modules API.
         }
       }
     }
-  }
-```

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/network-monitoring.md
----------------------------------------------------------------------
diff --git a/docs/network-monitoring.md b/docs/network-monitoring.md
index 680f771..8889fb1 100644
--- a/docs/network-monitoring.md
+++ b/docs/network-monitoring.md
@@ -34,10 +34,9 @@ On the build machine, you need to install the following packages:
 
 Network monitoring will NOT be built in by default. To build Mesos with network monitoring support, you need to add a configure option:
 
-```
-$ ./configure --with-network-isolator
-$ make
-```
+    $ ./configure --with-network-isolator
+    $ make
+
 
 ### Host ephemeral ports squeeze
 
@@ -47,24 +46,22 @@ For non-ephemeral ports (e.g, listening ports), Mesos already exposes that to th
 
 For ephemeral ports, without network monitoring, all executors/tasks running on the slave share the same ephemeral port range of the host. The default ephemeral port range on most Linux distributions is [32768, 61000]. With network monitoring, for each container, we need to reserve a range for ports on the host which will be used as the ephemeral port range for the container network stack (these ports are directly mapped into the container). We need to ensure none of the host processes are using those ports. Because of that, you may want to squeeze the host ephemeral port range in order to support more containers on each slave. To do that, you can use the following command (need root permission). A host reboot is required to ensure there are no connections using ports outside the new ephemeral range.
 
-```
-# This sets the host ephemeral port range to [57345, 61000].
-$ echo "57345 61000" > /proc/sys/net/ipv4/ip_local_port_range
-```
+    # This sets the host ephemeral port range to [57345, 61000].
+    $ echo "57345 61000" > /proc/sys/net/ipv4/ip_local_port_range
+
 
 ### Turn on network monitoring
 
 After the host ephemeral ports squeeze and reboot, you can turn on network monitoring by appending `network/port_mapping` to the isolation flag. Notice that you need specify the `ephemeral_ports` resource (via --resources flag). It tells the slave which ports on the host are reserved for containers. It must NOT overlap with the host ephemeral port range. You can also specify how many ephemeral ports you want to allocate to each container. It is recommended but not required that this number is power of 2 aligned (e.g., 512, 1024). If not, there will be some performance impact for classifying packets. The maximum number of containers on the slave will be limited by approximately |ephemeral_ports|/ephemeral_ports_per_container, subject to alignment etc.
 
-```
-mesos-slave \
-	--checkpoint \
-	--log_dir=/var/log/mesos \
-	--work_dir=/var/lib/mesos \
-	--isolation=cgroups/cpu,cgroups/mem,network/port_mapping \
-	--resources=cpus:22;mem:62189;ports:[31000-32000];disk:400000;ephemeral_ports:[32768-57344] \
-	--ephemeral_ports_per_container=1024
-```
+    mesos-slave \
+        --checkpoint \
+        --log_dir=/var/log/mesos \
+        --work_dir=/var/lib/mesos \
+        --isolation=cgroups/cpu,cgroups/mem,network/port_mapping \
+        --resources=cpus:22;mem:62189;ports:[31000-32000];disk:400000;ephemeral_ports:[32768-57344] \
+        --ephemeral_ports_per_container=1024
+
 
 ## How to get statistics?
 
@@ -81,40 +78,39 @@ Currently, we report the following network statistics:
 
 For example, these are the statistics you will get by hitting the `/monitor/statistics.json` endpoint on a slave with network monitoring turned on:
 
-```
-$ curl -s http://localhost:5051/monitor/statistics.json | python2.6
--mjson.tool
-[
-    {
-        "executor_id": "sample_executor_id-ebd8fa62-757d-489e-9e23-678a21d078d6",
-        "executor_name": "sample_executor",
-        "framework_id": "201103282247-0000000019-0000",
-        "source": "sample_executor",
-        "statistics": {
-            "cpus_limit": 0.35,
-            "cpus_nr_periods": 520883,
-            "cpus_nr_throttled": 2163,
-            "cpus_system_time_secs": 154.42,
-            "cpus_throttled_time_secs": 145.96,
-            "cpus_user_time_secs": 258.74,
-            "mem_anon_bytes": 109137920,
-            "mem_file_bytes": 30613504,
-            "mem_limit_bytes": 167772160,
-            "mem_mapped_file_bytes": 8192,
-            "mem_rss_bytes": 140341248,
-            "net_rx_bytes": 2402099,
-            "net_rx_dropped": 0,
-            "net_rx_errors": 0,
-            "net_rx_packets": 33273,
-            "net_tx_bytes": 1507798,
-            "net_tx_dropped": 0,
-            "net_tx_errors": 0,
-            "net_tx_packets": 17726,
-            "timestamp": 1408043826.91626
+    $ curl -s http://localhost:5051/monitor/statistics.json | python2.6
+    -mjson.tool
+    [
+        {
+            "executor_id": "sample_executor_id-ebd8fa62-757d-489e-9e23-678a21d078d6",
+            "executor_name": "sample_executor",
+            "framework_id": "201103282247-0000000019-0000",
+            "source": "sample_executor",
+            "statistics": {
+                "cpus_limit": 0.35,
+                "cpus_nr_periods": 520883,
+                "cpus_nr_throttled": 2163,
+                "cpus_system_time_secs": 154.42,
+                "cpus_throttled_time_secs": 145.96,
+                "cpus_user_time_secs": 258.74,
+                "mem_anon_bytes": 109137920,
+                "mem_file_bytes": 30613504,
+                "mem_limit_bytes": 167772160,
+                "mem_mapped_file_bytes": 8192,
+                "mem_rss_bytes": 140341248,
+                "net_rx_bytes": 2402099,
+                "net_rx_dropped": 0,
+                "net_rx_errors": 0,
+                "net_rx_packets": 33273,
+                "net_tx_bytes": 1507798,
+                "net_tx_dropped": 0,
+                "net_tx_errors": 0,
+                "net_tx_packets": 17726,
+                "timestamp": 1408043826.91626
+            }
         }
-    }
-]
-```
+    ]
+
 
 # Network Egress Rate Limit
 
@@ -124,13 +120,11 @@ Mesos 0.21.0 adds an optional feature to limit the egress network bandwidth for
 
 Egress Rate Limit requires Network Monitoring. To enable it, please follow all the steps in the [previous section](#Network_Monitoring) to enable the Network Monitoring first, and then use the newly introduced `egress_rate_limit_per_container` flag to specify the rate limit for each container. Note that this flag expects a `Bytes` type like the following:
 
-```
-mesos-slave \
-	--checkpoint \
-	--log_dir=/var/log/mesos \
-	--work_dir=/var/lib/mesos \
-	--isolation=cgroups/cpu,cgroups/mem,network/port_mapping \
-	--resources=cpus:22;mem:62189;ports:[31000-32000];disk:400000;ephemeral_ports:[32768-57344] \
-	--ephemeral_ports_per_container=1024 \
-	--egress_rate_limit_per_container=37500KB # Convert to ~300Mbits/s.
-```
+    mesos-slave \
+        --checkpoint \
+        --log_dir=/var/log/mesos \
+        --work_dir=/var/lib/mesos \
+        --isolation=cgroups/cpu,cgroups/mem,network/port_mapping \
+        --resources=cpus:22;mem:62189;ports:[31000-32000];disk:400000;ephemeral_ports:[32768-57344] \
+        --ephemeral_ports_per_container=1024 \
+        --egress_rate_limit_per_container=37500KB # Convert to ~300Mbits/s.

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/reconciliation.md
----------------------------------------------------------------------
diff --git a/docs/reconciliation.md b/docs/reconciliation.md
index ae4a99c..17537ba 100644
--- a/docs/reconciliation.md
+++ b/docs/reconciliation.md
@@ -54,17 +54,16 @@ reconciliation in a framework scheduler.
 
 Frameworks send a list of `TaskStatus` messages to the master:
 
-```
-  // Allows the framework to query the status for non-terminal tasks.
-  // This causes the master to send back the latest task status for
-  // each task in 'statuses', if possible. Tasks that are no longer
-  // known will result in a TASK_LOST update. If statuses is empty,
-  // then the master will send the latest status for each task
-  // currently known.
-  message Reconcile {
-    repeated TaskStatus statuses = 1; // Should be non-terminal only.
-  }
-```
+    // Allows the framework to query the status for non-terminal tasks.
+    // This causes the master to send back the latest task status for
+    // each task in 'statuses', if possible. Tasks that are no longer
+    // known will result in a TASK_LOST update. If statuses is empty,
+    // then the master will send the latest status for each task
+    // currently known.
+    message Reconcile {
+      repeated TaskStatus statuses = 1; // Should be non-terminal only.
+    }
+
 
 Currently, the master will only examine two fields in `TaskStatus`:
 
@@ -105,4 +104,4 @@ Offers are reconciled automatically after a failure:
 
 * Offers do not persist beyond the lifetime of a Master.
 * If a disconnection occurs, offers are no longer valid.
-* Offers are rescinded and regenerated each time the framework (re-)registers.
\ No newline at end of file
+* Offers are rescinded and regenerated each time the framework (re-)registers.

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/release-guide.md
----------------------------------------------------------------------
diff --git a/docs/release-guide.md b/docs/release-guide.md
index 38ecbec..28a5c92 100644
--- a/docs/release-guide.md
+++ b/docs/release-guide.md
@@ -27,22 +27,21 @@ This guide describes the process of doing an official release of Mesos.
    you can get from running `mvn --encrypt-password` (NOTE: you may
    need to first generate a [master
    password](http://maven.apache.org/guides/mini/guide-encryption.html).
-```
-<settings>
-  <servers>
-    <server>
-      <id>apache.snapshots.https</id>
-      <username>APACHE USERNAME</username>
-      <password>APACHE ENCRYPTED PASSWORD</password>
-    </server>
-    <server>
-      <id>apache.releases.https</id>
-      <username>APACHE USERNAME</username>
-      <password>APACHE ENCRYPTED PASSWORD</password>
-    </server>
-  </servers>
-</settings>
-```
+
+        <settings>
+          <servers>
+            <server>
+              <id>apache.snapshots.https</id>
+              <username>APACHE USERNAME</username>
+              <password>APACHE ENCRYPTED PASSWORD</password>
+            </server>
+            <server>
+              <id>apache.releases.https</id>
+              <username>APACHE USERNAME</username>
+              <password>APACHE ENCRYPTED PASSWORD</password>
+            </server>
+          </servers>
+        </settings>
 
 6. Use `gpg-agent` to avoid typing your passphrase repeatedly.
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b0823c20/docs/upgrades.md
----------------------------------------------------------------------
diff --git a/docs/upgrades.md b/docs/upgrades.md
index 355307a..73e503c 100644
--- a/docs/upgrades.md
+++ b/docs/upgrades.md
@@ -23,12 +23,11 @@ Please refer to the metrics/snapshot endpoint.
 
 **NOTE**: The Authentication API has changed slightly in this release to support additional authentication mechanisms. The change from 'string' to 'bytes' for AuthenticationStartMessage.data has no impact on C++ or the over-the-wire representation, so it only impacts pure language bindings for languages like Java and Python that use different types for UTF-8 strings vs. byte arrays.
 
-```
-message AuthenticationStartMessage {
-  required string mechanism = 1;
-  optional bytes data = 2;
-}
-```
+    message AuthenticationStartMessage {
+      required string mechanism = 1;
+      optional bytes data = 2;
+    }
+
 
 **NOTE** All Mesos arguments can now be passed using file:// to read them out of a file (either an absolute or relative path). The --credentials, --whitelist, and any flags that expect JSON backed arguments (such as --modules) behave as before, although support for just passing a absolute path for any JSON flags rather than file:// has been deprecated and will produce a warning (and the absolute path behavior will be removed in a future release).
 
@@ -59,25 +58,23 @@ In order to upgrade a running cluster:
 
 **NOTE**: The Mesos API has been changed slightly in this release. The CommandInfo has been changed (see below), which makes launching a command more flexible. The 'value' field has been changed from _required_ to _optional_. However, it will not cause any issue during the upgrade (since the existing schedulers always set this field).
 
-```
-message CommandInfo {
-  ...
-  // There are two ways to specify the command:
-  // 1) If 'shell == true', the command will be launched via shell
-  //    (i.e., /bin/sh -c 'value'). The 'value' specified will be
-  //    treated as the shell command. The 'arguments' will be ignored.
-  // 2) If 'shell == false', the command will be launched by passing
-  //    arguments to an executable. The 'value' specified will be
-  //    treated as the filename of the executable. The 'arguments'
-  //    will be treated as the arguments to the executable. This is
-  //    similar to how POSIX exec families launch processes (i.e.,
-  //    execlp(value, arguments(0), arguments(1), ...)).
-  optional bool shell = 6 [default = true];
-  optional string value = 3;
-  repeated string arguments = 7;
-  ...
-}
-```
+    message CommandInfo {
+      ...
+      // There are two ways to specify the command:
+      // 1) If 'shell == true', the command will be launched via shell
+      //    (i.e., /bin/sh -c 'value'). The 'value' specified will be
+      //    treated as the shell command. The 'arguments' will be ignored.
+      // 2) If 'shell == false', the command will be launched by passing
+      //    arguments to an executable. The 'value' specified will be
+      //    treated as the filename of the executable. The 'arguments'
+      //    will be treated as the arguments to the executable. This is
+      //    similar to how POSIX exec families launch processes (i.e.,
+      //    execlp(value, arguments(0), arguments(1), ...)).
+      optional bool shell = 6 [default = true];
+      optional string value = 3;
+      repeated string arguments = 7;
+      ...
+    }
 
 **NOTE**: The Python bindings are also changing in this release. There are now sub-modules which allow you to use either the interfaces and/or the native driver.
 
@@ -86,7 +83,6 @@ message CommandInfo {
 
 To ensure a smooth upgrade, we recommend to upgrade your python framework and executor first. You will be able to either import using the new configuration or the old. Replace the existing imports with something like the following:
 
-```
     try:
         from mesos.native import MesosExecutorDriver, MesosSchedulerDriver
         from mesos.interface import Executor, Scheduler
@@ -94,7 +90,6 @@ To ensure a smooth upgrade, we recommend to upgrade your python framework and ex
     except ImportError:
         from mesos import Executor, MesosExecutorDriver, MesosSchedulerDriver, Scheduler
         import mesos_pb2
-```
 
 **NOTE**: If you're using a pure language binding, please ensure that it sends status update acknowledgements through the master before upgrading.