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 2014/05/03 04:36:24 UTC

[7/7] git commit: Updated Mesos to satisfy whitespace/line_length.

Updated Mesos to satisfy whitespace/line_length.

Also enabled the whitespace/line_length cpplint rule.

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


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

Branch: refs/heads/master
Commit: f88d5dc1f3e160d13f6b8f87a78efd790df22918
Parents: 33b1a6a
Author: Adam B <ad...@mesosphere.io>
Authored: Fri May 2 19:29:58 2014 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Fri May 2 19:33:05 2014 -0700

----------------------------------------------------------------------
 include/mesos/resources.hpp                     |  3 ++-
 include/mesos/values.hpp                        | 12 ++++++----
 src/common/resources.cpp                        |  3 ++-
 src/jvm/java/net.hpp                            |  3 ++-
 src/jvm/org/apache/zookeeper.hpp                |  4 ++--
 src/linux/cgroups.cpp                           | 21 ++++++++++------
 src/log/coordinator.cpp                         |  3 ++-
 src/logging/logging.cpp                         |  4 ++--
 src/master/detector.cpp                         |  3 ++-
 src/master/flags.hpp                            |  2 +-
 src/master/hierarchical_allocator_process.hpp   |  7 +++---
 src/master/master.cpp                           |  8 +++----
 .../native/mesos_scheduler_driver_impl.cpp      | 13 ++++++----
 .../native/mesos_scheduler_driver_impl.hpp      | 25 ++++++++++++--------
 .../containerizer/external_containerizer.hpp    |  3 ++-
 src/slave/containerizer/mesos_containerizer.cpp |  3 ++-
 src/slave/containerizer/mesos_containerizer.hpp |  3 ++-
 src/slave/slave.cpp                             |  7 ++++--
 src/state/zookeeper.cpp                         |  3 ++-
 src/tests/allocator_tests.cpp                   |  4 ++--
 src/tests/cgroups_tests.cpp                     |  5 +++-
 src/tests/containerizer_tests.cpp               |  9 ++++---
 src/tests/gc_tests.cpp                          |  3 ++-
 src/tests/master_tests.cpp                      |  6 +++--
 src/tests/mesos.hpp                             |  3 ++-
 src/tests/resource_offers_tests.cpp             |  6 +++--
 src/tests/resources_tests.cpp                   | 21 ++++++++++------
 src/tests/script.cpp                            |  3 ++-
 src/tests/slave_recovery_tests.cpp              |  9 ++++---
 src/tests/status_update_manager_tests.cpp       |  8 +++----
 src/zookeeper/detector.cpp                      |  3 ++-
 src/zookeeper/group.cpp                         |  4 +++-
 support/mesos-style.py                          |  1 +
 33 files changed, 136 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/include/mesos/resources.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/resources.hpp b/include/mesos/resources.hpp
index 70d8731..8fc347e 100644
--- a/include/mesos/resources.hpp
+++ b/include/mesos/resources.hpp
@@ -304,7 +304,8 @@ public:
   Option<double> cpus() const;
   Option<Bytes> mem() const;
   Option<Bytes> disk() const;
-  Option<Value::Ranges> ports() const; // TODO(vinod): Provide a Ranges abstraction.
+  // TODO(vinod): Provide a Ranges abstraction.
+  Option<Value::Ranges> ports() const;
 
   typedef google::protobuf::RepeatedPtrField<Resource>::iterator
   iterator;

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/include/mesos/values.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/values.hpp b/include/mesos/values.hpp
index 64c138c..1bbf2ca 100644
--- a/include/mesos/values.hpp
+++ b/include/mesos/values.hpp
@@ -28,16 +28,20 @@ namespace mesos {
 std::ostream& operator << (std::ostream& stream, const Value::Scalar& scalar);
 bool operator == (const Value::Scalar& left, const Value::Scalar& right);
 bool operator <= (const Value::Scalar& left, const Value::Scalar& right);
-Value::Scalar operator + (const Value::Scalar& left, const Value::Scalar& right);
-Value::Scalar operator - (const Value::Scalar& left, const Value::Scalar& right);
+Value::Scalar operator + (const Value::Scalar& left,
+                          const Value::Scalar& right);
+Value::Scalar operator - (const Value::Scalar& left,
+                          const Value::Scalar& right);
 Value::Scalar& operator += (Value::Scalar& left, const Value::Scalar& right);
 Value::Scalar& operator -= (Value::Scalar& left, const Value::Scalar& right);
 
 std::ostream& operator << (std::ostream& stream, const Value::Ranges& ranges);
 bool operator == (const Value::Ranges& left, const Value::Ranges& right);
 bool operator <= (const Value::Ranges& left, const Value::Ranges& right);
-Value::Ranges operator + (const Value::Ranges& left, const Value::Ranges& right);
-Value::Ranges operator - (const Value::Ranges& left, const Value::Ranges& right);
+Value::Ranges operator + (const Value::Ranges& left,
+                          const Value::Ranges& right);
+Value::Ranges operator - (const Value::Ranges& left,
+                          const Value::Ranges& right);
 Value::Ranges& operator += (Value::Ranges& left, const Value::Ranges& right);
 Value::Ranges& operator -= (Value::Ranges& left, const Value::Ranges& right);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/common/resources.cpp
----------------------------------------------------------------------
diff --git a/src/common/resources.cpp b/src/common/resources.cpp
index 61c5bda..512dabf 100644
--- a/src/common/resources.cpp
+++ b/src/common/resources.cpp
@@ -243,7 +243,8 @@ Option<Resources> Resources::find(
             Resource potential_ = potential;
             potential_.set_role(remaining.role());
             if (remaining <= potential_) {
-              // We can satisfy the remaining requirements for this resource type.
+              // We can satisfy the remaining requirements for this
+              // resource type.
               Resource found = remaining;
               found.set_role(potential.role());
               foundResources += found;

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/jvm/java/net.hpp
----------------------------------------------------------------------
diff --git a/src/jvm/java/net.hpp b/src/jvm/java/net.hpp
index c9c1b19..cabb3e5 100644
--- a/src/jvm/java/net.hpp
+++ b/src/jvm/java/net.hpp
@@ -6,7 +6,8 @@
 namespace java {
 namespace net {
 
-class InetSocketAddress : public Jvm::Object // TODO(benh): Extends SocketAddress.
+// TODO(benh): Extends SocketAddress.
+class InetSocketAddress : public Jvm::Object
 {
 public:
   explicit InetSocketAddress(int port)

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/jvm/org/apache/zookeeper.hpp
----------------------------------------------------------------------
diff --git a/src/jvm/org/apache/zookeeper.hpp b/src/jvm/org/apache/zookeeper.hpp
index 392e749..0797d47 100644
--- a/src/jvm/org/apache/zookeeper.hpp
+++ b/src/jvm/org/apache/zookeeper.hpp
@@ -58,7 +58,7 @@ public:
     {
       static Jvm::Constructor constructor = Jvm::get()->findConstructor(
           Jvm::Class::named(
-              "org/apache/zookeeper/server/ZooKeeperServer$BasicDataTreeBuilder")
+              "org/apache/zookeeper/server/ZooKeeperServer$BasicDataTreeBuilder") // NOLINT(whitespace/line_length)
           .constructor());
 
       object = Jvm::get()->invoke(constructor);
@@ -78,7 +78,7 @@ public:
                 "org/apache/zookeeper/server/persistence/FileTxnSnapLog"))
         .parameter(
             Jvm::Class::named(
-                "org/apache/zookeeper/server/ZooKeeperServer$DataTreeBuilder")));
+                "org/apache/zookeeper/server/ZooKeeperServer$DataTreeBuilder"))); // NOLINT(whitespace/line_length)
 
     object = Jvm::get()->invoke(
         constructor, (jobject) txnLogFactory, (jobject) treeBuilder);

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/linux/cgroups.cpp
----------------------------------------------------------------------
diff --git a/src/linux/cgroups.cpp b/src/linux/cgroups.cpp
index 8202c28..8999724 100644
--- a/src/linux/cgroups.cpp
+++ b/src/linux/cgroups.cpp
@@ -1744,13 +1744,20 @@ private:
     // ignore the return values of freeze, kill, and thaw because,
     // provided there are no errors, we'll just retry the chain as
     // long as tasks still exist.
-    chain = kill(SIGSTOP)                        // Send stop signal to all tasks.
-      .then(defer(self(), &Self::kill, SIGKILL)) // Now send kill signal.
-      .then(defer(self(), &Self::empty))         // Wait until cgroup is empty.
-      .then(defer(self(), &Self::freeze))        // Freeze cgroug.
-      .then(defer(self(), &Self::kill, SIGKILL)) // Send kill signal to any remaining tasks.
-      .then(defer(self(), &Self::thaw))          // Thaw cgroup to deliver signals.
-      .then(defer(self(), &Self::empty));        // Wait until cgroup is empty.
+    // Send stop signal to all tasks.
+    chain = kill(SIGSTOP)
+      // Now send kill signal.
+      .then(defer(self(), &Self::kill, SIGKILL))
+      // Wait until cgroup is empty.
+      .then(defer(self(), &Self::empty))
+      // Freeze cgroup.
+      .then(defer(self(), &Self::freeze))
+      // Send kill signal to any remaining tasks.
+      .then(defer(self(), &Self::kill, SIGKILL))
+      // Thaw cgroup to deliver signals.
+      .then(defer(self(), &Self::thaw))
+      // Wait until cgroup is empty.
+      .then(defer(self(), &Self::empty));
 
     chain.onAny(defer(self(), &Self::finished, lambda::_1));
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/log/coordinator.cpp
----------------------------------------------------------------------
diff --git a/src/log/coordinator.cpp b/src/log/coordinator.cpp
index 50b7363..fe0c5f9 100644
--- a/src/log/coordinator.cpp
+++ b/src/log/coordinator.cpp
@@ -83,7 +83,8 @@ private:
   Future<PromiseResponse> runPromisePhase();
   Future<Option<uint64_t> > checkPromisePhase(const PromiseResponse& response);
   Future<IntervalSet<uint64_t> > getMissingPositions();
-  Future<Nothing> catchupMissingPositions(const IntervalSet<uint64_t>& positions);
+  Future<Nothing> catchupMissingPositions(
+      const IntervalSet<uint64_t>& positions);
   Future<Option<uint64_t> > updateIndexAfterElected();
   void electingFinished(const Option<uint64_t>& position);
   void electingFailed();

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/logging/logging.cpp
----------------------------------------------------------------------
diff --git a/src/logging/logging.cpp b/src/logging/logging.cpp
index 176e49a..f07d223 100644
--- a/src/logging/logging.cpp
+++ b/src/logging/logging.cpp
@@ -171,8 +171,8 @@ void initialize(
   if (flags.quiet) {
     FLAGS_stderrthreshold = 3; // FATAL.
 
-    // FLAGS_stderrthreshold is ignored when logging to stderr instead of log files.
-    // Setting the minimum log level gets around this issue.
+    // FLAGS_stderrthreshold is ignored when logging to stderr instead
+    // of log files. Setting the minimum log level gets around this issue.
     if (FLAGS_logtostderr) {
       FLAGS_minloglevel = 3; // FATAL.
     }

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/master/detector.cpp
----------------------------------------------------------------------
diff --git a/src/master/detector.cpp b/src/master/detector.cpp
index 2de1fd4..ea8011f 100644
--- a/src/master/detector.cpp
+++ b/src/master/detector.cpp
@@ -65,7 +65,8 @@ public:
   ~StandaloneMasterDetectorProcess();
 
   void appoint(const Option<MasterInfo>& leader);
-  Future<Option<MasterInfo> > detect(const Option<MasterInfo>& previous = None());
+  Future<Option<MasterInfo> > detect(
+      const Option<MasterInfo>& previous = None());
 
 private:
   Option<MasterInfo> leader; // The appointed master.

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/master/flags.hpp
----------------------------------------------------------------------
diff --git a/src/master/flags.hpp b/src/master/flags.hpp
index 60606ac..3e23eca 100644
--- a/src/master/flags.hpp
+++ b/src/master/flags.hpp
@@ -200,7 +200,7 @@ public:
     add(&Flags::credentials,
         "credentials",
         "Path to a file with a list of credentials.\n"
-        "Each line contains a 'principal' and 'secret' separated by whitespace.\n"
+        "Each line contains 'principal' and 'secret' separated by whitespace.\n"
         "Path could be of the form 'file:///path/to/file' or '/path/to/file'.");
   }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/master/hierarchical_allocator_process.hpp
----------------------------------------------------------------------
diff --git a/src/master/hierarchical_allocator_process.hpp b/src/master/hierarchical_allocator_process.hpp
index b094fe1..0c5e2e0 100644
--- a/src/master/hierarchical_allocator_process.hpp
+++ b/src/master/hierarchical_allocator_process.hpp
@@ -262,13 +262,13 @@ public:
 
 
 template <class RoleSorter, class FrameworkSorter>
-HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::HierarchicalAllocatorProcess()
+HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::HierarchicalAllocatorProcess() // NOLINT(whitespace/line_length)
   : ProcessBase(process::ID::generate("hierarchical-allocator")),
     initialized(false) {}
 
 
 template <class RoleSorter, class FrameworkSorter>
-HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::~HierarchicalAllocatorProcess()
+HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::~HierarchicalAllocatorProcess() // NOLINT(whitespace/line_length)
 {}
 
 
@@ -276,8 +276,7 @@ template <class RoleSorter, class FrameworkSorter>
 process::PID<HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter> >
 HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::self()
 {
-  return
-    process::PID<HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter> >(this);
+  return process::PID<HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter> >(this); // NOLINT(whitespace/line_length)
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 9baab90..c79fdaf 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -1471,10 +1471,10 @@ struct ResourceUsageChecker : TaskInfoVisitor
         if (!slave.hasExecutor(framework.id, task.executor().executor_id())) {
           taskResources += task.executor().resources();
           if (!((usedResources + taskResources) <= resources)) {
-            return "Task " + stringify(task.task_id()) + " + executor attempted" +
-                " to use " + stringify(taskResources) + " combined with" +
-                " already used " + stringify(usedResources) + " is greater" +
-                " than offered " + stringify(resources);
+            return "Task " + stringify(task.task_id()) +
+                   " + executor attempted to use " + stringify(taskResources) +
+                   " combined with already used " + stringify(usedResources) +
+                   " is greater than offered " + stringify(resources);
           }
         }
         executors.insert(task.executor().executor_id());

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/python/native/mesos_scheduler_driver_impl.cpp
----------------------------------------------------------------------
diff --git a/src/python/native/mesos_scheduler_driver_impl.cpp b/src/python/native/mesos_scheduler_driver_impl.cpp
index 19ce6a4..1c82532 100644
--- a/src/python/native/mesos_scheduler_driver_impl.cpp
+++ b/src/python/native/mesos_scheduler_driver_impl.cpp
@@ -146,7 +146,7 @@ PyMethodDef MesosSchedulerDriverImpl_methods[] = {
   { "reconcileTasks",
     (PyCFunction) MesosSchedulerDriverImpl_reconcileTasks,
     METH_VARARGS,
-    "Master sends status updates if task status is different from last known state."
+    "Master sends status updates if task status is different from expected"
   },
   { NULL }  /* Sentinel */
 };
@@ -198,7 +198,8 @@ int MesosSchedulerDriverImpl_init(MesosSchedulerDriverImpl* self,
   FrameworkInfo framework;
   if (frameworkObj != NULL) {
     if (!readPythonProtobuf(frameworkObj, &framework)) {
-      PyErr_Format(PyExc_Exception, "Could not deserialize Python FrameworkInfo");
+      PyErr_Format(PyExc_Exception,
+                   "Could not deserialize Python FrameworkInfo");
       return -1;
     }
   }
@@ -363,8 +364,9 @@ PyObject* MesosSchedulerDriverImpl_run(MesosSchedulerDriverImpl* self)
 }
 
 
-PyObject* MesosSchedulerDriverImpl_requestResources(MesosSchedulerDriverImpl* self,
-                                                    PyObject* args)
+PyObject* MesosSchedulerDriverImpl_requestResources(
+    MesosSchedulerDriverImpl* self,
+    PyObject* args)
 {
   if (self->driver == NULL) {
     PyErr_Format(PyExc_Exception, "MesosSchedulerDriverImpl.driver is NULL");
@@ -379,7 +381,8 @@ PyObject* MesosSchedulerDriverImpl_requestResources(MesosSchedulerDriverImpl* se
   }
 
   if (!PyList_Check(requestsObj)) {
-    PyErr_Format(PyExc_Exception, "Parameter 2 to requestsResources is not a list");
+    PyErr_Format(PyExc_Exception,
+                 "Parameter 2 to requestsResources is not a list");
     return NULL;
   }
   Py_ssize_t len = PyList_Size(requestsObj);

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/python/native/mesos_scheduler_driver_impl.hpp
----------------------------------------------------------------------
diff --git a/src/python/native/mesos_scheduler_driver_impl.hpp b/src/python/native/mesos_scheduler_driver_impl.hpp
index 9fb4867..772227e 100644
--- a/src/python/native/mesos_scheduler_driver_impl.hpp
+++ b/src/python/native/mesos_scheduler_driver_impl.hpp
@@ -83,8 +83,9 @@ int MesosSchedulerDriverImpl_clear(MesosSchedulerDriverImpl* self);
 // MesosSchedulerDriverImpl methods
 PyObject* MesosSchedulerDriverImpl_start(MesosSchedulerDriverImpl* self);
 
-PyObject* MesosSchedulerDriverImpl_stop(MesosSchedulerDriverImpl* self,
-                                        PyObject* args);
+PyObject* MesosSchedulerDriverImpl_stop(
+    MesosSchedulerDriverImpl* self,
+    PyObject* args);
 
 PyObject* MesosSchedulerDriverImpl_abort(MesosSchedulerDriverImpl* self);
 
@@ -92,17 +93,21 @@ PyObject* MesosSchedulerDriverImpl_join(MesosSchedulerDriverImpl* self);
 
 PyObject* MesosSchedulerDriverImpl_run(MesosSchedulerDriverImpl* self);
 
-PyObject* MesosSchedulerDriverImpl_requestResources(MesosSchedulerDriverImpl* self,
-                                                    PyObject* args);
+PyObject* MesosSchedulerDriverImpl_requestResources(
+    MesosSchedulerDriverImpl* self,
+    PyObject* args);
 
-PyObject* MesosSchedulerDriverImpl_launchTasks(MesosSchedulerDriverImpl* self,
-                                               PyObject* args);
+PyObject* MesosSchedulerDriverImpl_launchTasks(
+    MesosSchedulerDriverImpl* self,
+    PyObject* args);
 
-PyObject* MesosSchedulerDriverImpl_killTask(MesosSchedulerDriverImpl* self,
-                                            PyObject* args);
+PyObject* MesosSchedulerDriverImpl_killTask(
+    MesosSchedulerDriverImpl* self,
+    PyObject* args);
 
-PyObject* MesosSchedulerDriverImpl_declineOffer(MesosSchedulerDriverImpl* self,
-                                                PyObject* args);
+PyObject* MesosSchedulerDriverImpl_declineOffer(
+    MesosSchedulerDriverImpl* self,
+    PyObject* args);
 
 PyObject* MesosSchedulerDriverImpl_reviveOffers(MesosSchedulerDriverImpl* self);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/slave/containerizer/external_containerizer.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/external_containerizer.hpp b/src/slave/containerizer/external_containerizer.hpp
index eb3ff96..8fdf097 100644
--- a/src/slave/containerizer/external_containerizer.hpp
+++ b/src/slave/containerizer/external_containerizer.hpp
@@ -249,7 +249,8 @@ private:
       const Sandbox& sandbox,
       const google::protobuf::Message& message,
       const std::map<std::string, std::string>& environment =
-        (std::map<std::string, std::string>())); // Wrapped in parens due to: http://llvm.org/bugs/show_bug.cgi?id=13657
+        // Default in parens due to: http://llvm.org/bugs/show_bug.cgi?id=13657
+        (std::map<std::string, std::string>()));
 };
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/slave/containerizer/mesos_containerizer.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos_containerizer.cpp b/src/slave/containerizer/mesos_containerizer.cpp
index df57e54..71b6108 100644
--- a/src/slave/containerizer/mesos_containerizer.cpp
+++ b/src/slave/containerizer/mesos_containerizer.cpp
@@ -108,7 +108,8 @@ MesosContainerizer::~MesosContainerizer()
 }
 
 
-Future<Nothing> MesosContainerizer::recover(const Option<state::SlaveState>& state)
+Future<Nothing> MesosContainerizer::recover(
+    const Option<state::SlaveState>& state)
 {
   return dispatch(process, &MesosContainerizerProcess::recover, state);
 }

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/slave/containerizer/mesos_containerizer.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos_containerizer.hpp b/src/slave/containerizer/mesos_containerizer.hpp
index a5eb247..5353450 100644
--- a/src/slave/containerizer/mesos_containerizer.hpp
+++ b/src/slave/containerizer/mesos_containerizer.hpp
@@ -89,7 +89,8 @@ private:
 };
 
 
-class MesosContainerizerProcess : public process::Process<MesosContainerizerProcess>
+class MesosContainerizerProcess
+  : public process::Process<MesosContainerizerProcess>
 {
 public:
   MesosContainerizerProcess(

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index cb80609..10619b1 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -377,7 +377,9 @@ void Slave::initialize()
   install("PING", &Slave::ping);
 
   // Setup HTTP routes.
-  route("/health", Http::HEALTH_HELP, lambda::bind(&Http::health, http, lambda::_1));
+  route("/health",
+        Http::HEALTH_HELP,
+        lambda::bind(&Http::health, http, lambda::_1));
   route("/stats.json", None(), lambda::bind(&Http::stats, http, lambda::_1));
   route("/state.json", None(), lambda::bind(&Http::state, http, lambda::_1));
 
@@ -2675,7 +2677,8 @@ void Slave::shutdownExecutorTimeout(
     return;
   }
 
-  if (executor->containerId != containerId) { // Make sure this timeout is valid.
+  // Make sure this timeout is valid.
+  if (executor->containerId != containerId) {
     LOG(INFO) << "A new executor '" << executorId
               << "' of framework " << frameworkId
               << " with run " << executor->containerId

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/state/zookeeper.cpp
----------------------------------------------------------------------
diff --git a/src/state/zookeeper.cpp b/src/state/zookeeper.cpp
index 689d7d1..d355bd7 100644
--- a/src/state/zookeeper.cpp
+++ b/src/state/zookeeper.cpp
@@ -457,7 +457,8 @@ Result<Option<Entry> > ZooKeeperStorageProcess::doGet(const string& name)
 }
 
 
-Result<bool> ZooKeeperStorageProcess::doSet(const Entry& entry, const UUID& uuid)
+Result<bool> ZooKeeperStorageProcess::doSet(const Entry& entry,
+                                            const UUID& uuid)
 {
   CHECK(error.isNone()) << ": " << error.get();
   CHECK(state == CONNECTED);

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/allocator_tests.cpp b/src/tests/allocator_tests.cpp
index 11ed908..6b7b097 100644
--- a/src/tests/allocator_tests.cpp
+++ b/src/tests/allocator_tests.cpp
@@ -527,8 +527,8 @@ TEST_F(ReservationAllocatorTest, ResourcesReturned)
       allocator.real, &HierarchicalDRFAllocatorProcess::slaveAdded);
 
   slave::Flags flags1 = CreateSlaveFlags();
-  flags1.resources = Option<string>("cpus(role1):1;mem(role1):200;cpus(role2):2;"
-                                    "mem(role2):600;cpus:1;mem:200;disk:0");
+  flags1.resources = Some("cpus(role1):1;mem(role1):200;cpus(role2):2;"
+                          "mem(role2):600;cpus:1;mem:200;disk:0");
   Try<PID<Slave> > slave1 = StartSlave(&exec, flags1);
   ASSERT_SOME(slave1);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/cgroups_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cgroups_tests.cpp b/src/tests/cgroups_tests.cpp
index 6ba9de6..a051af8 100644
--- a/src/tests/cgroups_tests.cpp
+++ b/src/tests/cgroups_tests.cpp
@@ -427,7 +427,10 @@ TEST_F(CgroupsAnyHierarchyTest, ROOT_CGROUPS_Write)
 
   // In parent process.
   ASSERT_SOME(
-      cgroups::write(hierarchy, TEST_CGROUPS_ROOT, "cgroup.procs", stringify(pid)));
+      cgroups::write(hierarchy,
+                     TEST_CGROUPS_ROOT,
+                     "cgroup.procs",
+                     stringify(pid)));
 
   Try<std::set<pid_t> > pids = cgroups::processes(hierarchy, TEST_CGROUPS_ROOT);
   ASSERT_SOME(pids);

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer_tests.cpp b/src/tests/containerizer_tests.cpp
index 1c956bb..517859f 100644
--- a/src/tests/containerizer_tests.cpp
+++ b/src/tests/containerizer_tests.cpp
@@ -287,7 +287,8 @@ public:
   }
 
 
-  Try<MesosContainerizer*> CreateContainerizer(const Option<CommandInfo>& prepare)
+  Try<MesosContainerizer*> CreateContainerizer(
+      const Option<CommandInfo>& prepare)
   {
     vector<Option<CommandInfo> > prepares;
     prepares.push_back(prepare);
@@ -365,7 +366,8 @@ TEST_F(MesosContainerizerIsolatorPreparationTest, ScriptFails) {
   AWAIT_READY(launch);
 
   // Wait for the child (preparation script + executor) to complete.
-  Future<containerizer::Termination> wait = containerizer.get()->wait(containerId);
+  Future<containerizer::Termination> wait =
+    containerizer.get()->wait(containerId);
   AWAIT_READY(wait);
 
   // Check the child failed to exit correctly.
@@ -416,7 +418,8 @@ TEST_F(MesosContainerizerIsolatorPreparationTest, MultipleScripts) {
   AWAIT_READY(launch);
 
   // Wait for the child (preparation script(s) + executor) to complete.
-  Future<containerizer::Termination> wait = containerizer.get()->wait(containerId);
+  Future<containerizer::Termination> wait =
+    containerizer.get()->wait(containerId);
   AWAIT_READY(wait);
 
   // Check the child failed to exit correctly.

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/gc_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/gc_tests.cpp b/src/tests/gc_tests.cpp
index 95ade0f..19648fd 100644
--- a/src/tests/gc_tests.cpp
+++ b/src/tests/gc_tests.cpp
@@ -397,7 +397,8 @@ TEST_F(GarbageCollectorIntegrationTest, ExitedFramework)
     .WillOnce(FutureArg<1>(&status))
     .WillRepeatedly(Return());      // Ignore subsequent updates.
 
-  Future<Nothing> executorLaunched = FUTURE_DISPATCH(_, &Slave::executorLaunched);
+  Future<Nothing> executorLaunched =
+    FUTURE_DISPATCH(_, &Slave::executorLaunched);
 
   driver.start();
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/master_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 746668a..939a08d 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -624,14 +624,16 @@ TEST_F(MasterTest, MultipleExecutors)
   task1.set_name("");
   task1.mutable_task_id()->set_value("1");
   task1.mutable_slave_id()->MergeFrom(offers.get()[0].slave_id());
-  task1.mutable_resources()->MergeFrom(Resources::parse("cpus:1;mem:512").get());
+  task1.mutable_resources()->MergeFrom(
+      Resources::parse("cpus:1;mem:512").get());
   task1.mutable_executor()->MergeFrom(executor1);
 
   TaskInfo task2;
   task2.set_name("");
   task2.mutable_task_id()->set_value("2");
   task2.mutable_slave_id()->MergeFrom(offers.get()[0].slave_id());
-  task2.mutable_resources()->MergeFrom(Resources::parse("cpus:1;mem:512").get());
+  task2.mutable_resources()->MergeFrom(
+      Resources::parse("cpus:1;mem:512").get());
   task2.mutable_executor()->MergeFrom(executor2);
 
   vector<TaskInfo> tasks;

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/mesos.hpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp
index ae14caf..335b23a 100644
--- a/src/tests/mesos.hpp
+++ b/src/tests/mesos.hpp
@@ -757,7 +757,8 @@ private:
 };
 
 
-inline const ::testing::Matcher<const std::vector<Offer>& > OfferEq(int cpus, int mem)
+inline
+const ::testing::Matcher<const std::vector<Offer>& > OfferEq(int cpus, int mem)
 {
   return MakeMatcher(new OfferEqMatcher(cpus, mem));
 }

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/resource_offers_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resource_offers_tests.cpp b/src/tests/resource_offers_tests.cpp
index f82fa06..56682de 100644
--- a/src/tests/resource_offers_tests.cpp
+++ b/src/tests/resource_offers_tests.cpp
@@ -554,7 +554,8 @@ TEST_F(MultipleExecutorsTest, TasksExecutorInfoDiffers)
   task1.set_name("");
   task1.mutable_task_id()->set_value("1");
   task1.mutable_slave_id()->MergeFrom(offers.get()[0].slave_id());
-  task1.mutable_resources()->MergeFrom(Resources::parse("cpus:1;mem:512").get());
+  task1.mutable_resources()->MergeFrom(
+      Resources::parse("cpus:1;mem:512").get());
   task1.mutable_executor()->MergeFrom(executor);
 
   executor.mutable_command()->set_value("exit 2");
@@ -563,7 +564,8 @@ TEST_F(MultipleExecutorsTest, TasksExecutorInfoDiffers)
   task2.set_name("");
   task2.mutable_task_id()->set_value("2");
   task2.mutable_slave_id()->MergeFrom(offers.get()[0].slave_id());
-  task2.mutable_resources()->MergeFrom(Resources::parse("cpus:1;mem:512").get());
+  task2.mutable_resources()->MergeFrom(
+      Resources::parse("cpus:1;mem:512").get());
   task2.mutable_executor()->MergeFrom(executor);
 
   vector<TaskInfo> tasks;

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/resources_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resources_tests.cpp b/src/tests/resources_tests.cpp
index 964a1b6..b5f2e8b 100644
--- a/src/tests/resources_tests.cpp
+++ b/src/tests/resources_tests.cpp
@@ -376,7 +376,8 @@ TEST(ResourcesTest, ScalarSubtraction2)
 TEST(ResourcesTest, RangesEquals)
 {
   Resource ports1 = Resources::parse("ports", "[20-40]", "*").get();
-  Resource ports2 = Resources::parse("ports", "[20-30, 31-39, 40-40]", "*").get();
+  Resource ports2 =
+    Resources::parse("ports", "[20-30, 31-39, 40-40]", "*").get();
 
   Resources r1;
   r1 += ports1;
@@ -505,7 +506,8 @@ TEST(ResourcesTest, RangesAdditon3)
 
 TEST(ResourcesTest, RangesAddition4)
 {
-  Resource ports1 = Resources::parse("ports", "[1-4, 9-10, 20-22, 26-30]", "*").get();
+  Resource ports1 =
+    Resources::parse("ports", "[1-4, 9-10, 20-22, 26-30]", "*").get();
   Resource ports2 = Resources::parse("ports", "[5-8, 23-25]", "*").get();
 
   Resources r;
@@ -523,7 +525,8 @@ TEST(ResourcesTest, RangesAddition4)
 TEST(ResourcesTest, RangesSubtraction)
 {
   Resource ports1 = Resources::parse("ports", "[20000-40000]", "*").get();
-  Resource ports2 = Resources::parse("ports", "[10000-20000, 30000-50000]", "*").get();
+  Resource ports2 =
+    Resources::parse("ports", "[10000-20000, 30000-50000]", "*").get();
 
   Resources r;
   r += ports1;
@@ -610,7 +613,8 @@ TEST(ResourcesTest, RangesSubtraction4)
 
 TEST(ResourcesTest, RangesSubtraction5)
 {
-  Resource ports1 = Resources::parse("ports", "[1-10, 20-30, 40-50]", "*").get();
+  Resource ports1 =
+    Resources::parse("ports", "[1-10, 20-30, 40-50]", "*").get();
   Resource ports2 = Resources::parse("ports", "[2-9, 15-45, 48-50]", "*").get();
 
   Resources r;
@@ -659,7 +663,8 @@ TEST(ResourcesTest, SetEquals)
 TEST(ResourcesTest, SetSubset)
 {
   Resource disks1 = Resources::parse("disks", "{sda1,sda2}", "*").get();
-  Resource disks2 = Resources::parse("disks", "{sda1,sda3,sda4,sda2}", "*").get();
+  Resource disks2 =
+    Resources::parse("disks", "{sda1,sda3,sda4,sda2}", "*").get();
 
   Resources r1;
   r1 += disks1;
@@ -677,7 +682,8 @@ TEST(ResourcesTest, SetSubset)
 TEST(ResourcesTest, SetAddition)
 {
   Resource disks1 = Resources::parse("disks", "{sda1,sda2,sda3}", "*").get();
-  Resource disks2 = Resources::parse("disks", "{sda1,sda2,sda3,sda4}", "*").get();
+  Resource disks2 =
+    Resources::parse("disks", "{sda1,sda2,sda3,sda4}", "*").get();
 
   Resources r;
   r += disks1;
@@ -693,7 +699,8 @@ TEST(ResourcesTest, SetAddition)
 
 TEST(ResourcesTest, SetSubtraction)
 {
-  Resource disks1 = Resources::parse("disks", "{sda1,sda2,sda3,sda4}", "*").get();
+  Resource disks1 =
+    Resources::parse("disks", "{sda1,sda2,sda3,sda4}", "*").get();
   Resource disks2 = Resources::parse("disks", "{sda2,sda3,sda4}", "*").get();
 
   Resources r;

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/script.cpp
----------------------------------------------------------------------
diff --git a/src/tests/script.cpp b/src/tests/script.cpp
index bf5e1e3..e5885ee 100644
--- a/src/tests/script.cpp
+++ b/src/tests/script.cpp
@@ -86,7 +86,8 @@ void execute(const string& script)
 
     // Start by cd'ing into the temporary directory.
     if (!os::chdir(directory.get())) {
-      std::cerr << "Failed to chdir to '" << directory.get() << "'" << std::endl;
+      std::cerr << "Failed to chdir to '" << directory.get() << "'"
+                << std::endl;
       abort();
     }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index 2d6b8d4..7e1c31e 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -1051,11 +1051,13 @@ TYPED_TEST(SlaveRecoveryTest, RemoveNonCheckpointingFramework)
   Offer offer = offers.get()[0];
 
   Offer offer1 = offer;
-  offer1.mutable_resources()->CopyFrom(Resources::parse("cpus:1;mem:512").get());
+  offer1.mutable_resources()->CopyFrom(
+      Resources::parse("cpus:1;mem:512").get());
   tasks.push_back(createTask(offer1, "sleep 1000")); // Long-running task
 
   Offer offer2 = offer;
-  offer2.mutable_resources()->CopyFrom(Resources::parse("cpus:1;mem:512").get());
+  offer2.mutable_resources()->CopyFrom(
+      Resources::parse("cpus:1;mem:512").get());
   tasks.push_back(createTask(offer2, "sleep 1000")); // Long-running task
 
   ASSERT_LE(Resources(offer1.resources()) + Resources(offer2.resources()),
@@ -3050,7 +3052,8 @@ TYPED_TEST(SlaveRecoveryTest, ResourceStatistics)
   // Set up so we can wait until the new slave updates the container's
   // resources (this occurs after the executor has re-registered).
   // TODO(idownes): This assumes the containerizer is a MesosContainerizer.
-  Future<Nothing> update = FUTURE_DISPATCH(_, &MesosContainerizerProcess::update);
+  Future<Nothing> update =
+    FUTURE_DISPATCH(_, &MesosContainerizerProcess::update);
 
   // Restart the slave (use same flags) with a new containerizer.
   Try<Containerizer*> containerizer2 = Containerizer::create(flags, true);

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/tests/status_update_manager_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/status_update_manager_tests.cpp b/src/tests/status_update_manager_tests.cpp
index 07aa2ce..8cbfb83 100644
--- a/src/tests/status_update_manager_tests.cpp
+++ b/src/tests/status_update_manager_tests.cpp
@@ -517,7 +517,7 @@ TEST_F(StatusUpdateManagerTest, DuplicateTerminalUpdateBeforeAck)
     .WillOnce(FutureArg<1>(&status));
 
   // Drop the first ACK from the scheduler to the slave.
-  Future<StatusUpdateAcknowledgementMessage> statusUpdateAcknowledgementMessage =
+  Future<StatusUpdateAcknowledgementMessage> statusUpdateAckMessage =
     DROP_PROTOBUF(StatusUpdateAcknowledgementMessage(), _, slave.get());
 
   Future<Nothing> _statusUpdate =
@@ -531,7 +531,7 @@ TEST_F(StatusUpdateManagerTest, DuplicateTerminalUpdateBeforeAck)
 
   EXPECT_EQ(TASK_FINISHED, status.get().state());
 
-  AWAIT_READY(statusUpdateAcknowledgementMessage);
+  AWAIT_READY(statusUpdateAckMessage);
 
   // At this point the status update manager has enqueued
   // TASK_FINISHED update.
@@ -731,7 +731,7 @@ TEST_F(StatusUpdateManagerTest, DuplicateUpdateBeforeAck)
     .WillOnce(FutureArg<1>(&status));
 
   // Drop the first ACK from the scheduler to the slave.
-  Future<StatusUpdateAcknowledgementMessage> statusUpdateAcknowledgementMessage =
+  Future<StatusUpdateAcknowledgementMessage> statusUpdateAckMessage =
     DROP_PROTOBUF(StatusUpdateAcknowledgementMessage(), _, slave.get());
 
   Clock::pause();
@@ -744,7 +744,7 @@ TEST_F(StatusUpdateManagerTest, DuplicateUpdateBeforeAck)
 
   EXPECT_EQ(TASK_RUNNING, status.get().state());
 
-  AWAIT_READY(statusUpdateAcknowledgementMessage);
+  AWAIT_READY(statusUpdateAckMessage);
 
   Future<Nothing> _statusUpdate =
     FUTURE_DISPATCH(slave.get(), &Slave::_statusUpdate);

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/zookeeper/detector.cpp
----------------------------------------------------------------------
diff --git a/src/zookeeper/detector.cpp b/src/zookeeper/detector.cpp
index 1c859b7..62128a0 100644
--- a/src/zookeeper/detector.cpp
+++ b/src/zookeeper/detector.cpp
@@ -97,7 +97,8 @@ void LeaderDetectorProcess::watch(const set<Group::Membership>& expected)
 }
 
 
-void LeaderDetectorProcess::watched(const Future<set<Group::Membership> >& memberships)
+void LeaderDetectorProcess::watched(
+    const Future<set<Group::Membership> >& memberships)
 {
   CHECK(!memberships.isDiscarded());
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/src/zookeeper/group.cpp
----------------------------------------------------------------------
diff --git a/src/zookeeper/group.cpp b/src/zookeeper/group.cpp
index 3b7f974..46f638d 100644
--- a/src/zookeeper/group.cpp
+++ b/src/zookeeper/group.cpp
@@ -732,7 +732,9 @@ Try<bool> GroupProcess::cache()
     }
   }
 
-  foreachpair (int32_t sequence, Promise<bool>* cancelled, utils::copy(unowned)) {
+  foreachpair (int32_t sequence,
+               Promise<bool>* cancelled,
+               utils::copy(unowned)) {
     if (!sequences.contains(sequence)) {
       cancelled->set(false);
       unowned.erase(sequence); // Okay since iterating over a copy.

http://git-wip-us.apache.org/repos/asf/mesos/blob/f88d5dc1/support/mesos-style.py
----------------------------------------------------------------------
diff --git a/support/mesos-style.py b/support/mesos-style.py
index d404432..bd7dcdb 100755
--- a/support/mesos-style.py
+++ b/support/mesos-style.py
@@ -17,6 +17,7 @@ active_rules = ['build/class',
                 'whitespace/ending_newline',
                 'whitespace/forcolon',
                 'whitespace/indent',
+                'whitespace/line_length',
                 'whitespace/tab',
                 'whitespace/todo']