You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by nn...@apache.org on 2014/09/10 07:13:04 UTC

git commit: Fixed line comments end punctuation in Mesos source.

Repository: mesos
Updated Branches:
  refs/heads/master fd798ffbe -> e736d0310


Fixed line comments end punctuation in Mesos source.

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


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

Branch: refs/heads/master
Commit: e736d0310fb51bfe38623a09c27eb0ea5ad54c95
Parents: fd798ff
Author: Timothy Chen <tn...@apache.org>
Authored: Tue Sep 9 21:44:57 2014 -0700
Committer: Niklas Q. Nielsen <ni...@mesosphere.io>
Committed: Tue Sep 9 21:44:57 2014 -0700

----------------------------------------------------------------------
 src/common/factory.hpp                          |  2 +-
 src/exec/exec.cpp                               |  2 +-
 src/launcher/executor.cpp                       |  4 +--
 src/launcher/fetcher.cpp                        |  6 ++--
 src/linux/routing/filter/handle.hpp             |  1 +
 src/master/constants.hpp                        |  2 +-
 src/master/master.cpp                           |  4 +--
 src/master/master.hpp                           |  2 +-
 src/master/registrar.cpp                        |  2 +-
 .../mesos/native/mesos_executor_driver_impl.cpp | 14 ++++-----
 .../mesos/native/mesos_executor_driver_impl.hpp |  2 +-
 .../native/mesos_scheduler_driver_impl.cpp      |  4 +--
 .../native/mesos_scheduler_driver_impl.hpp      |  2 +-
 src/python/native/src/mesos/native/module.cpp   |  6 ++--
 src/python/native/src/mesos/native/module.hpp   |  2 +-
 .../native/src/mesos/native/proxy_executor.cpp  | 10 +++---
 .../native/src/mesos/native/proxy_scheduler.cpp | 22 +++++++-------
 src/slave/containerizer/composing.cpp           |  2 +-
 .../isolators/network/port_mapping.cpp          |  4 +--
 src/slave/containerizer/linux_launcher.cpp      |  4 +--
 src/slave/slave.cpp                             |  6 ++--
 src/tests/allocator_tests.cpp                   |  2 +-
 src/tests/credentials_tests.cpp                 |  2 +-
 src/tests/external_containerizer_test.cpp       |  2 +-
 src/tests/fault_tolerance_tests.cpp             |  2 +-
 src/tests/mesos.cpp                             |  4 +--
 src/tests/port_mapping_tests.cpp                |  2 +-
 src/tests/rate_limiting_tests.cpp               |  2 +-
 src/tests/shutdown_tests.cpp                    |  2 +-
 src/tests/slave_recovery_tests.cpp              | 32 +++++++++++---------
 30 files changed, 78 insertions(+), 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/common/factory.hpp
----------------------------------------------------------------------
diff --git a/src/common/factory.hpp b/src/common/factory.hpp
index ade0503..bdddcf8 100644
--- a/src/common/factory.hpp
+++ b/src/common/factory.hpp
@@ -74,7 +74,7 @@
 
 
 
-// Helper classes for the factory macros
+// Helper classes for the factory macros.
 
 namespace mesos { namespace internal { namespace factory {
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/exec/exec.cpp
----------------------------------------------------------------------
diff --git a/src/exec/exec.cpp b/src/exec/exec.cpp
index 36d1778..e15f834 100644
--- a/src/exec/exec.cpp
+++ b/src/exec/exec.cpp
@@ -593,7 +593,7 @@ MesosExecutorDriver::MesosExecutorDriver(Executor* _executor)
     return;
   }
 
-  // Create mutex and condition variable
+  // Create mutex and condition variable.
   pthread_mutexattr_t attr;
   pthread_mutexattr_init(&attr);
   pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/launcher/executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/executor.cpp b/src/launcher/executor.cpp
index 12ac14b..cbc8750 100644
--- a/src/launcher/executor.cpp
+++ b/src/launcher/executor.cpp
@@ -153,7 +153,7 @@ public:
       abort();
     }
 
-    // Set the FD_CLOEXEC flags on these pipes
+    // Set the FD_CLOEXEC flags on these pipes.
     Try<Nothing> cloexec = os::cloexec(pipes[0]);
     if (cloexec.isError()) {
       cerr << "Failed to cloexec(pipe[0]): " << cloexec.error() << endl;
@@ -290,7 +290,7 @@ public:
   {
     shutdown(driver);
     if (healthPid != -1) {
-      // Cleanup health check process
+      // Cleanup health check process.
       ::kill(healthPid, SIGKILL);
     }
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/launcher/fetcher.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/fetcher.cpp b/src/launcher/fetcher.cpp
index 50e9918..9323c28 100644
--- a/src/launcher/fetcher.cpp
+++ b/src/launcher/fetcher.cpp
@@ -201,9 +201,9 @@ int main(int argc, char* argv[])
   foreach (const std::string& token, strings::tokenize(uris, " ")) {
     // Delimiter between URI, execute permission and extract options
     // Expected format: {URI}+[01][XN]
-    //  {URI} - The actual URI for the asset to fetch
-    //  [01]  - 1 if the execute permission should be set else 0
-    //  [XN]  - X if we should extract the URI (if it's compressed) else N
+    //  {URI} - The actual URI for the asset to fetch.
+    //  [01]  - 1 if the execute permission should be set else 0.
+    //  [XN]  - X if we should extract the URI (if it's compressed) else N.
     size_t pos = token.rfind("+");
     CHECK(pos != std::string::npos)
       << "Invalid executor uri token in env " << token;

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/linux/routing/filter/handle.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/filter/handle.hpp b/src/linux/routing/filter/handle.hpp
index 0381933..1901774 100644
--- a/src/linux/routing/filter/handle.hpp
+++ b/src/linux/routing/filter/handle.hpp
@@ -55,6 +55,7 @@ public:
   // |   htid     |  hash  |    node    |
   // +------------+--------+------------+
   //     12 bits    8 bits     12 bits
+  // NOLINT(readability/ending_punctuation)
   U32Handle(uint32_t htid, uint32_t hash, uint32_t node)
     : Handle(((htid & 0xfff) << 20) + ((hash & 0xff) << 12) + (node & 0xfff)) {}
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/master/constants.hpp
----------------------------------------------------------------------
diff --git a/src/master/constants.hpp b/src/master/constants.hpp
index ce7995b..a8298bc 100644
--- a/src/master/constants.hpp
+++ b/src/master/constants.hpp
@@ -95,7 +95,7 @@ extern const uint32_t MAX_COMPLETED_TASKS_PER_FRAMEWORK;
 // Time interval to check for updated watchers list.
 extern const Duration WHITELIST_WATCH_INTERVAL;
 
-// Default number of tasks (limit) for /master/tasks.json endpoint
+// Default number of tasks (limit) for /master/tasks.json endpoint.
 extern const uint32_t TASK_LIMIT;
 
 // Label used by the Leader Contender and Detector.

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index c6393b2..d5db24e 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -471,7 +471,7 @@ void Master::initialize()
   // Initialize the allocator.
   allocator->initialize(flags, self(), roleInfos);
 
-  // Parse the white list
+  // Parse the white list.
   whitelistWatcher = new WhitelistWatcher(flags.whitelist, allocator);
   spawn(whitelistWatcher);
 
@@ -3713,7 +3713,7 @@ void Master::authenticationTimeout(Future<Option<string> > future)
 }
 
 
-// Return connected frameworks that are not in the process of being removed
+// Return connected frameworks that are not in the process of being removed.
 vector<Framework*> Master::getActiveFrameworks() const
 {
   vector <Framework*> result;

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/master/master.hpp
----------------------------------------------------------------------
diff --git a/src/master/master.hpp b/src/master/master.hpp
index f502df3..b492600 100644
--- a/src/master/master.hpp
+++ b/src/master/master.hpp
@@ -285,7 +285,7 @@ protected:
   void fileAttached(const process::Future<Nothing>& result,
                     const std::string& path);
 
-  // Return connected frameworks that are not in the process of being removed
+  // Return connected frameworks that are not in the process of being removed.
   std::vector<Framework*> getActiveFrameworks() const;
 
   // Invoked when the contender has entered the contest.

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/master/registrar.cpp
----------------------------------------------------------------------
diff --git a/src/master/registrar.cpp b/src/master/registrar.cpp
index 5c74471..3f9b9cf 100644
--- a/src/master/registrar.cpp
+++ b/src/master/registrar.cpp
@@ -162,7 +162,7 @@ private:
     Timer<Milliseconds> state_store;
   } metrics;
 
-  // Gauge handlers
+  // Gauge handlers.
   double _queued_operations()
   {
     return operations.size();

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/python/native/src/mesos/native/mesos_executor_driver_impl.cpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/mesos_executor_driver_impl.cpp b/src/python/native/src/mesos/native/mesos_executor_driver_impl.cpp
index 16b9bc1..46b6bb8 100644
--- a/src/python/native/src/mesos/native/mesos_executor_driver_impl.cpp
+++ b/src/python/native/src/mesos/native/mesos_executor_driver_impl.cpp
@@ -243,7 +243,7 @@ PyObject* MesosExecutorDriverImpl_start(MesosExecutorDriverImpl* self)
   }
 
   Status status = self->driver->start();
-  return PyInt_FromLong(status); // Sets an exception if creating the int fails
+  return PyInt_FromLong(status); // Sets an exception if creating the int fails.
 }
 
 
@@ -255,7 +255,7 @@ PyObject* MesosExecutorDriverImpl_stop(MesosExecutorDriverImpl* self)
   }
 
   Status status = self->driver->stop();
-  return PyInt_FromLong(status); // Sets an exception if creating the int fails
+  return PyInt_FromLong(status); // Sets an exception if creating the int fails.
 }
 
 
@@ -267,7 +267,7 @@ PyObject* MesosExecutorDriverImpl_abort(MesosExecutorDriverImpl* self)
   }
 
   Status status = self->driver->abort();
-  return PyInt_FromLong(status); // Sets an exception if creating the int fails
+  return PyInt_FromLong(status); // Sets an exception if creating the int fails.
 }
 
 
@@ -282,7 +282,7 @@ PyObject* MesosExecutorDriverImpl_join(MesosExecutorDriverImpl* self)
   Py_BEGIN_ALLOW_THREADS
   status = self->driver->join();
   Py_END_ALLOW_THREADS
-  return PyInt_FromLong(status); // Sets an exception if creating the int fails
+  return PyInt_FromLong(status); // Sets an exception if creating the int fails.
 }
 
 
@@ -297,7 +297,7 @@ PyObject* MesosExecutorDriverImpl_run(MesosExecutorDriverImpl* self)
   Py_BEGIN_ALLOW_THREADS
   status = self->driver->run();
   Py_END_ALLOW_THREADS
-  return PyInt_FromLong(status); // Sets an exception if creating the int fails
+  return PyInt_FromLong(status); // Sets an exception if creating the int fails.
 }
 
 
@@ -322,7 +322,7 @@ PyObject* MesosExecutorDriverImpl_sendStatusUpdate(
   }
 
   Status status = self->driver->sendStatusUpdate(taskStatus);
-  return PyInt_FromLong(status); // Sets an exception if creating the int fails
+  return PyInt_FromLong(status); // Sets an exception if creating the int fails.
 }
 
 
@@ -342,7 +342,7 @@ PyObject* MesosExecutorDriverImpl_sendFrameworkMessage(
   }
 
   Status status = self->driver->sendFrameworkMessage(string(data, length));
-  return PyInt_FromLong(status); // Sets an exception if creating the int fails
+  return PyInt_FromLong(status); // Sets an exception if creating the int fails.
 }
 
 } // namespace python {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/python/native/src/mesos/native/mesos_executor_driver_impl.hpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/mesos_executor_driver_impl.hpp b/src/python/native/src/mesos/native/mesos_executor_driver_impl.hpp
index 7245414..9d47167 100644
--- a/src/python/native/src/mesos/native/mesos_executor_driver_impl.hpp
+++ b/src/python/native/src/mesos/native/mesos_executor_driver_impl.hpp
@@ -80,7 +80,7 @@ int MesosExecutorDriverImpl_traverse(MesosExecutorDriverImpl* self,
  */
 int MesosExecutorDriverImpl_clear(MesosExecutorDriverImpl* self);
 
-// MesosExecutorDriverImpl methods
+// MesosExecutorDriverImpl methods.
 PyObject* MesosExecutorDriverImpl_start(MesosExecutorDriverImpl* self);
 
 PyObject* MesosExecutorDriverImpl_stop(MesosExecutorDriverImpl* self);

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.cpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.cpp b/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.cpp
index e014eed..1badf55 100644
--- a/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.cpp
+++ b/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.cpp
@@ -387,7 +387,7 @@ PyObject* MesosSchedulerDriverImpl_requestResources(
   for (int i = 0; i < len; i++) {
     PyObject* requestObj = PyList_GetItem(requestsObj, i);
     if (requestObj == NULL) {
-      return NULL; // Exception will have been set by PyList_GetItem
+      return NULL; // Exception will have been set by PyList_GetItem.
     }
     Request request;
     if (!readPythonProtobuf(requestObj, &request)) {
@@ -455,7 +455,7 @@ PyObject* MesosSchedulerDriverImpl_launchTasks(MesosSchedulerDriverImpl* self,
   for (int i = 0; i < len; i++) {
     PyObject* taskObj = PyList_GetItem(tasksObj, i);
     if (taskObj == NULL) {
-      return NULL; // Exception will have been set by PyList_GetItem
+      return NULL; // Exception will have been set by PyList_GetItem.
     }
     TaskInfo task;
     if (!readPythonProtobuf(taskObj, &task)) {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.hpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.hpp b/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.hpp
index 8c285ae..d15dfb9 100644
--- a/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.hpp
+++ b/src/python/native/src/mesos/native/mesos_scheduler_driver_impl.hpp
@@ -80,7 +80,7 @@ int MesosSchedulerDriverImpl_traverse(MesosSchedulerDriverImpl* self,
  */
 int MesosSchedulerDriverImpl_clear(MesosSchedulerDriverImpl* self);
 
-// MesosSchedulerDriverImpl methods
+// MesosSchedulerDriverImpl methods.
 PyObject* MesosSchedulerDriverImpl_start(MesosSchedulerDriverImpl* self);
 
 PyObject* MesosSchedulerDriverImpl_stop(

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/python/native/src/mesos/native/module.cpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/module.cpp b/src/python/native/src/mesos/native/module.cpp
index 6d0de5f..b295b08 100644
--- a/src/python/native/src/mesos/native/module.cpp
+++ b/src/python/native/src/mesos/native/module.cpp
@@ -75,7 +75,7 @@ PyMethodDef MODULE_METHODS[] = {
  */
 PyMODINIT_FUNC init_mesos(void)
 {
-  // Ensure that the interpreter's threading support is enabled
+  // Ensure that the interpreter's threading support is enabled.
   PyEval_InitThreads();
 
   // Import the mesos_pb2 module (on which we depend for protobuf classes)
@@ -83,13 +83,13 @@ PyMODINIT_FUNC init_mesos(void)
   if (mesos_pb2 == NULL)
     return;
 
-  // Initialize our Python types
+  // Initialize our Python types.
   if (PyType_Ready(&MesosSchedulerDriverImplType) < 0)
     return;
   if (PyType_Ready(&MesosExecutorDriverImplType) < 0)
     return;
 
-  // Create the _mesos module and add our types to it
+  // Create the _mesos module and add our types to it.
   PyObject* module = Py_InitModule("_mesos", MODULE_METHODS);
   Py_INCREF(&MesosSchedulerDriverImplType);
   PyModule_AddObject(module,

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/python/native/src/mesos/native/module.hpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/module.hpp b/src/python/native/src/mesos/native/module.hpp
index 1c35e2e..31da47b 100644
--- a/src/python/native/src/mesos/native/module.hpp
+++ b/src/python/native/src/mesos/native/module.hpp
@@ -124,7 +124,7 @@ PyObject* createPythonProtobuf(const T& t, const char* typeName)
     return NULL;
   }
 
-  // Propagates any exception that might happen in FromString
+  // Propagates any exception that might happen in FromString.
   return PyObject_CallMethod(type,
                              (char*) "FromString",
                              (char*) "s#",

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/python/native/src/mesos/native/proxy_executor.cpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/proxy_executor.cpp b/src/python/native/src/mesos/native/proxy_executor.cpp
index 5e8637e..a85fd36 100644
--- a/src/python/native/src/mesos/native/proxy_executor.cpp
+++ b/src/python/native/src/mesos/native/proxy_executor.cpp
@@ -56,7 +56,7 @@ void ProxyExecutor::registered(ExecutorDriver* driver,
   if (executorInfoObj == NULL ||
       frameworkInfoObj == NULL ||
       slaveInfoObj == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonExecutor,
@@ -94,7 +94,7 @@ void ProxyExecutor::reregistered(ExecutorDriver* driver,
   slaveInfoObj = createPythonProtobuf(slaveInfo, "SlaveInfo");
 
   if (slaveInfoObj == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonExecutor,
@@ -147,7 +147,7 @@ void ProxyExecutor::launchTask(ExecutorDriver* driver,
 
   taskObj = createPythonProtobuf(task, "TaskInfo");
   if (taskObj == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonExecutor,
@@ -180,7 +180,7 @@ void ProxyExecutor::killTask(ExecutorDriver* driver,
 
   taskIdObj = createPythonProtobuf(taskId, "TaskID");
   if (taskIdObj == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonExecutor,
@@ -266,7 +266,7 @@ void ProxyExecutor::error(ExecutorDriver* driver, const string& message)
 cleanup:
   if (PyErr_Occurred()) {
     PyErr_Print();
-    // No need for driver.stop(); it should stop itself
+    // No need for driver.stop(); it should stop itself.
   }
   Py_XDECREF(res);
 }

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/python/native/src/mesos/native/proxy_scheduler.cpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/proxy_scheduler.cpp b/src/python/native/src/mesos/native/proxy_scheduler.cpp
index 95b09cf..a6e1d24 100644
--- a/src/python/native/src/mesos/native/proxy_scheduler.cpp
+++ b/src/python/native/src/mesos/native/proxy_scheduler.cpp
@@ -49,12 +49,12 @@ void ProxyScheduler::registered(SchedulerDriver* driver,
 
   fid = createPythonProtobuf(frameworkId, "FrameworkID");
   if (fid == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   minfo = createPythonProtobuf(masterInfo, "MasterInfo");
   if (minfo == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonScheduler,
@@ -89,7 +89,7 @@ void ProxyScheduler::reregistered(SchedulerDriver* driver,
 
   minfo = createPythonProtobuf(masterInfo, "MasterInfo");
   if (minfo == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonScheduler,
@@ -153,7 +153,7 @@ void ProxyScheduler::resourceOffers(SchedulerDriver* driver,
     if (offer == NULL) {
       goto cleanup;
     }
-    PyList_SetItem(list, i, offer); // Steals the reference to offer
+    PyList_SetItem(list, i, offer); // Steals the reference to offer.
   }
 
   res = PyObject_CallMethod(impl->pythonScheduler,
@@ -187,7 +187,7 @@ void ProxyScheduler::offerRescinded(SchedulerDriver* driver,
 
   oid = createPythonProtobuf(offerId, "OfferID");
   if (oid == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonScheduler,
@@ -220,7 +220,7 @@ void ProxyScheduler::statusUpdate(SchedulerDriver* driver,
 
   stat = createPythonProtobuf(status, "TaskStatus");
   if (stat == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonScheduler,
@@ -256,12 +256,12 @@ void ProxyScheduler::frameworkMessage(SchedulerDriver* driver,
 
   eid = createPythonProtobuf(executorId, "ExecutorID");
   if (eid == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   sid = createPythonProtobuf(slaveId, "SlaveID");
   if (sid == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonScheduler,
@@ -297,7 +297,7 @@ void ProxyScheduler::slaveLost(SchedulerDriver* driver, const SlaveID& slaveId)
 
   sid = createPythonProtobuf(slaveId, "SlaveID");
   if (sid == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonScheduler,
@@ -335,7 +335,7 @@ void ProxyScheduler::executorLost(SchedulerDriver* driver,
   slaveIdObj = createPythonProtobuf(slaveId, "SlaveID");
 
   if (executorIdObj == NULL || slaveIdObj == NULL) {
-    goto cleanup; // createPythonProtobuf will have set an exception
+    goto cleanup; // createPythonProtobuf will have set an exception.
   }
 
   res = PyObject_CallMethod(impl->pythonScheduler,
@@ -377,7 +377,7 @@ void ProxyScheduler::error(SchedulerDriver* driver, const string& message)
 cleanup:
   if (PyErr_Occurred()) {
     PyErr_Print();
-    // No need for driver.stop(); it should stop itself
+    // No need for driver.stop(); it should stop itself.
   }
   Py_XDECREF(res);
 }

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/slave/containerizer/composing.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/composing.cpp b/src/slave/containerizer/composing.cpp
index 9b36d91..9022700 100644
--- a/src/slave/containerizer/composing.cpp
+++ b/src/slave/containerizer/composing.cpp
@@ -523,7 +523,7 @@ void ComposingContainerizerProcess::destroy(const ContainerID& containerId)
 }
 
 
-// TODO(benh): Move into stout/hashset.hpp
+// TODO(benh): Move into stout/hashset.hpp.
 template <typename Elem>
 hashset<Elem> merge(const std::list<hashset<Elem> >& list)
 {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/slave/containerizer/isolators/network/port_mapping.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/network/port_mapping.cpp b/src/slave/containerizer/isolators/network/port_mapping.cpp
index 938782a..3b8e74f 100644
--- a/src/slave/containerizer/isolators/network/port_mapping.cpp
+++ b/src/slave/containerizer/isolators/network/port_mapping.cpp
@@ -2194,7 +2194,7 @@ Try<Nothing> PortMappingIsolatorProcess::removeHostIPFilters(
   // removed is important. We need to remove filters on host eth0 and
   // host lo first before we remove filters on veth.
 
-  // Remove the IP packet filter from host eth0 to veth of the container
+  // Remove the IP packet filter from host eth0 to veth of the container.
   Try<bool> hostEth0ToVeth = filter::ip::remove(
       eth0,
       ingress::HANDLE,
@@ -2213,7 +2213,7 @@ Try<Nothing> PortMappingIsolatorProcess::removeHostIPFilters(
                << " to " << veth << " does not exist";
   }
 
-  // Remove the IP packet filter from host lo to veth of the container
+  // Remove the IP packet filter from host lo to veth of the container.
   Try<bool> hostLoToVeth = filter::ip::remove(
       lo,
       ingress::HANDLE,

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/slave/containerizer/linux_launcher.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/linux_launcher.cpp b/src/slave/containerizer/linux_launcher.cpp
index ea6ddba..d5ef1d6 100644
--- a/src/slave/containerizer/linux_launcher.cpp
+++ b/src/slave/containerizer/linux_launcher.cpp
@@ -192,8 +192,8 @@ static pid_t clone(const lambda::function<int()>& func, int namespaces)
 
   return ::clone(
       childMain,
-      &stack[sizeof(stack)/sizeof(stack[0]) - 1],  // stack grows down
-      namespaces | SIGCHLD,   // Specify SIGCHLD as child termination signal
+      &stack[sizeof(stack)/sizeof(stack[0]) - 1],  // stack grows down.
+      namespaces | SIGCHLD,   // Specify SIGCHLD as child termination signal.
       (void*) &func);
 }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index bd31831..c9ea070 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -637,7 +637,7 @@ void Slave::detected(const Future<Option<MasterInfo> >& _master)
       delay(duration,
             self(),
             &Slave::doReliableRegistration,
-            flags.registration_backoff_factor * 2); // Backoff
+            flags.registration_backoff_factor * 2); // Backoff.
     }
   }
 
@@ -3499,7 +3499,7 @@ Slave::Metrics::Metrics(const Slave& slave)
 
 Slave::Metrics::~Metrics()
 {
-  // TODO(dhamon): Check return values of unregistered metrics
+  // TODO(dhamon): Check return values of unregistered metrics.
   process::metrics::remove(uptime_secs);
   process::metrics::remove(registered);
 
@@ -3629,7 +3629,7 @@ Executor* Framework::launchExecutor(
     // when it has registered to the slave.
     launch = slave->containerizer->launch(
         containerId,
-        executorInfo_, // modified to include the task's resources
+        executorInfo_, // modified to include the task's resources.
         executor->directory,
         slave->flags.switch_user ? Option<string>(user) : None(),
         slave->info.id(),

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/tests/allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/allocator_tests.cpp b/src/tests/allocator_tests.cpp
index 774528a..49e36f9 100644
--- a/src/tests/allocator_tests.cpp
+++ b/src/tests/allocator_tests.cpp
@@ -292,7 +292,7 @@ TEST_F(DRFAllocatorTest, DRFAllocatorProcess)
   AWAIT_READY(offers5);
 
   // Even though framework4 doesn't have any resources, user2 has a
-  // lower share than user1, so framework2 receives slave4's resources
+  // lower share than user1, so framework2 receives slave4's resources.
   EXPECT_THAT(offers5.get(), OfferEq(1, 512));
 
   // Shut everything down.

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/tests/credentials_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/credentials_tests.cpp b/src/tests/credentials_tests.cpp
index c2e2ee7..5878e57 100644
--- a/src/tests/credentials_tests.cpp
+++ b/src/tests/credentials_tests.cpp
@@ -69,7 +69,7 @@ TEST_F(CredentialsTest, authenticatedSlave)
 
 // Test verifing well executed credential authentication
 // using text formatted credentials so as to test
-// backwards compatibility
+// backwards compatibility.
 TEST_F(CredentialsTest, authenticatedSlaveText)
 {
   master::Flags flags = CreateMasterFlags();

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/tests/external_containerizer_test.cpp
----------------------------------------------------------------------
diff --git a/src/tests/external_containerizer_test.cpp b/src/tests/external_containerizer_test.cpp
index 2f6aa50..45cdeb5 100644
--- a/src/tests/external_containerizer_test.cpp
+++ b/src/tests/external_containerizer_test.cpp
@@ -193,7 +193,7 @@ TEST_F(ExternalContainerizerTest, DISABLED_Launch)
   Future<TaskStatus> status;
   EXPECT_CALL(sched, statusUpdate(&driver, _))
     .WillOnce(FutureArg<1>(&status))
-    .WillRepeatedly(Return()); // Ignore rest for now
+    .WillRepeatedly(Return()); // Ignore rest for now.
 
   Future<ContainerID> containerId;
   EXPECT_CALL(containerizer, launch(_, _, _, _, _, _, _, _))

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/tests/fault_tolerance_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/fault_tolerance_tests.cpp b/src/tests/fault_tolerance_tests.cpp
index b0e74b9..fd49fb6 100644
--- a/src/tests/fault_tolerance_tests.cpp
+++ b/src/tests/fault_tolerance_tests.cpp
@@ -719,7 +719,7 @@ TEST_F(FaultToleranceTest, ReregisterCompletedFrameworks)
   TaskInfo task =
     createTask(offers.get()[0], "sleep 10000", DEFAULT_EXECUTOR_ID);
   vector<TaskInfo> tasks;
-  tasks.push_back(task); // Long lasting task
+  tasks.push_back(task); // Long lasting task.
 
   EXPECT_CALL(executor, registered(_, _, _, _));
   EXPECT_CALL(executor, launchTask(_, _))

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/tests/mesos.cpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.cpp b/src/tests/mesos.cpp
index 0f759a7..10a45e3 100644
--- a/src/tests/mesos.cpp
+++ b/src/tests/mesos.cpp
@@ -99,7 +99,7 @@ master::Flags MesosTest::CreateMasterFlags()
 
   CHECK_SOME(fd);
 
-  // JSON default format for credentials
+  // JSON default format for credentials.
   Credentials credentials;
   Credential* credential = credentials.add_credentials();
   credential->set_principal(DEFAULT_CREDENTIAL.principal());
@@ -474,7 +474,7 @@ void ContainerizerTest<slave::MesosContainerizer>::TearDown()
       CHECK_SOME(cgroups);
 
       foreach (const string& cgroup, cgroups.get()) {
-        // Remove any cgroups that start with TEST_CGROUPS_ROOT
+        // Remove any cgroups that start with TEST_CGROUPS_ROOT.
         if (strings::startsWith(cgroup, TEST_CGROUPS_ROOT)) {
           AWAIT_READY(cgroups::destroy(hierarchy, cgroup));
         }

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/tests/port_mapping_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/port_mapping_tests.cpp b/src/tests/port_mapping_tests.cpp
index a990da3..fdb23b2 100644
--- a/src/tests/port_mapping_tests.cpp
+++ b/src/tests/port_mapping_tests.cpp
@@ -1394,7 +1394,7 @@ TEST_F(PortMappingMesosTest, ROOT_RecoverMixedContainersTest)
   TaskInfo task2 = createTask(offer2, "sleep 1000");
 
   vector<TaskInfo> tasks2;
-  tasks2.push_back(task2); // Long-running task
+  tasks2.push_back(task2); // Long-running task.
 
   EXPECT_CALL(sched1, statusUpdate(_, _));
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/tests/rate_limiting_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/rate_limiting_tests.cpp b/src/tests/rate_limiting_tests.cpp
index 4adebd1..e1fd3c2 100644
--- a/src/tests/rate_limiting_tests.cpp
+++ b/src/tests/rate_limiting_tests.cpp
@@ -872,7 +872,7 @@ TEST_F(RateLimitingTest, SchedulerFailover)
   EXPECT_CALL(sched1, error(&driver1, "Framework failed over"))
     .WillOnce(FutureSatisfy(&sched1Error));
 
-  // Grab the stuff we need to replay the ReregisterFrameworkMessage
+  // Grab the stuff we need to replay the ReregisterFrameworkMessage.
   Future<process::Message> frameworkRegisteredMessage = FUTURE_MESSAGE(
       Eq(FrameworkRegisteredMessage().GetTypeName()), master.get(), _);
   Future<ReregisterFrameworkMessage> reregisterFrameworkMessage =

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/tests/shutdown_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/shutdown_tests.cpp b/src/tests/shutdown_tests.cpp
index 12ebef4..bb48ee0 100644
--- a/src/tests/shutdown_tests.cpp
+++ b/src/tests/shutdown_tests.cpp
@@ -293,7 +293,7 @@ TEST_F(ShutdownTest, ShutdownEndpointNoHeader)
   ASSERT_EQ(DRIVER_RUNNING, driver.start());
 
   AWAIT_READY(frameworkId);
-    
+
   Future<Response> response = process::http::post(
       master.get(),
       "shutdown",

http://git-wip-us.apache.org/repos/asf/mesos/blob/e736d031/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index 357edfc..5818e0f 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -1052,12 +1052,12 @@ TYPED_TEST(SlaveRecoveryTest, RemoveNonCheckpointingFramework)
   Offer offer1 = offer;
   offer1.mutable_resources()->CopyFrom(
       Resources::parse("cpus:1;mem:512").get());
-  tasks.push_back(createTask(offer1, "sleep 1000")); // Long-running task
+  tasks.push_back(createTask(offer1, "sleep 1000")); // Long-running task.
 
   Offer offer2 = offer;
   offer2.mutable_resources()->CopyFrom(
       Resources::parse("cpus:1;mem:512").get());
-  tasks.push_back(createTask(offer2, "sleep 1000")); // Long-running task
+  tasks.push_back(createTask(offer2, "sleep 1000")); // Long-running task,
 
   ASSERT_LE(Resources(offer1.resources()) + Resources(offer2.resources()),
             Resources(offer.resources()));
@@ -1153,7 +1153,7 @@ TYPED_TEST(SlaveRecoveryTest, NonCheckpointingFramework)
 
   TaskInfo task = createTask(offers.get()[0], "sleep 1000");
   vector<TaskInfo> tasks;
-  tasks.push_back(task); // Long-running task
+  tasks.push_back(task); // Long-running task.
 
   Future<Nothing> update;
   EXPECT_CALL(sched, statusUpdate(_, _))
@@ -1292,7 +1292,7 @@ TYPED_TEST(SlaveRecoveryTest, KillTask)
 
   TaskInfo task = createTask(offers1.get()[0], "sleep 1000");
   vector<TaskInfo> tasks;
-  tasks.push_back(task); // Long-running task
+  tasks.push_back(task); // Long-running task.
 
   EXPECT_CALL(sched, statusUpdate(_, _));
 
@@ -1417,7 +1417,7 @@ TYPED_TEST(SlaveRecoveryTest, Reboot)
 
   TaskInfo task = createTask(offers1.get()[0], "sleep 1000");
   vector<TaskInfo> tasks;
-  tasks.push_back(task); // Long-running task
+  tasks.push_back(task); // Long-running task.
 
   // Capture the slave and framework ids.
   SlaveID slaveId = offers1.get()[0].slave_id();
@@ -1553,7 +1553,7 @@ TYPED_TEST(SlaveRecoveryTest, GCExecutor)
 
   TaskInfo task = createTask(offers1.get()[0], "sleep 1000");
   vector<TaskInfo> tasks;
-  tasks.push_back(task); // Long-running task
+  tasks.push_back(task); // Long-running task.
 
   // Capture the slave and framework ids.
   SlaveID slaveId = offers1.get()[0].slave_id();
@@ -1926,7 +1926,7 @@ TYPED_TEST(SlaveRecoveryTest, RegisterDisconnectedSlave)
 
   TaskInfo task = createTask(offers.get()[0], "sleep 1000");
   vector<TaskInfo> tasks;
-  tasks.push_back(task); // Long-running task
+  tasks.push_back(task); // Long-running task.
 
   // Capture the slave and framework ids.
   SlaveID slaveId = offers.get()[0].slave_id();
@@ -2035,13 +2035,14 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileKillTask)
 
   TaskInfo task = createTask(offers1.get()[0], "sleep 1000");
   vector<TaskInfo> tasks;
-  tasks.push_back(task); // Long-running task
+  tasks.push_back(task); // Long-running task.
 
   // Capture the slave and framework ids.
   SlaveID slaveId = offers1.get()[0].slave_id();
   FrameworkID frameworkId = offers1.get()[0].framework_id();
 
-  EXPECT_CALL(sched, statusUpdate(_, _)); // TASK_RUNNING
+  // Expecting TASK_RUNNING status.
+  EXPECT_CALL(sched, statusUpdate(_, _));
 
   Future<Nothing> _statusUpdateAcknowledgement =
     FUTURE_DISPATCH(_, &Slave::_statusUpdateAcknowledgement);
@@ -2138,14 +2139,15 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileShutdownFramework)
   SlaveID slaveId = offers.get()[0].slave_id();
   FrameworkID frameworkId = offers.get()[0].framework_id();
 
-  EXPECT_CALL(sched, statusUpdate(_, _)); // TASK_RUNNING
+  // Expecting TASK_RUNNING status.
+  EXPECT_CALL(sched, statusUpdate(_, _));
 
   Future<Nothing> _statusUpdateAcknowledgement =
     FUTURE_DISPATCH(_, &Slave::_statusUpdateAcknowledgement);
 
   TaskInfo task = createTask(offers.get()[0], "sleep 1000");
   vector<TaskInfo> tasks;
-  tasks.push_back(task); // Long-running task
+  tasks.push_back(task); // Long-running task.
 
   driver.launchTasks(offers.get()[0].id(), tasks);
 
@@ -2246,7 +2248,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileTasksMissingFromSlave)
   // re-registers by wiping the relevant meta directory.
   TaskInfo task = createTask(offers1.get()[0], "sleep 10");
   vector<TaskInfo> tasks;
-  tasks.push_back(task); // Long-running task
+  tasks.push_back(task); // Long-running task.
 
   EXPECT_CALL(sched, statusUpdate(_, _));
 
@@ -2705,7 +2707,7 @@ TYPED_TEST(SlaveRecoveryTest, MasterFailover)
 
   TaskInfo task = createTask(offers1.get()[0], "sleep 1000");
   vector<TaskInfo> tasks;
-  tasks.push_back(task); // Long-running task
+  tasks.push_back(task); // Long-running task.
 
   EXPECT_CALL(sched, statusUpdate(_, _));
 
@@ -2855,7 +2857,7 @@ TYPED_TEST(SlaveRecoveryTest, MultipleFrameworks)
   // Framework 1 launches a task.
   TaskInfo task1 = createTask(offer1, "sleep 1000");
   vector<TaskInfo> tasks1;
-  tasks1.push_back(task1); // Long-running task
+  tasks1.push_back(task1); // Long-running task.
 
   EXPECT_CALL(sched1, statusUpdate(_, _));
 
@@ -2894,7 +2896,7 @@ TYPED_TEST(SlaveRecoveryTest, MultipleFrameworks)
   TaskInfo task2 = createTask(offers2.get()[0], "sleep 1000");
 
   vector<TaskInfo> tasks2;
-  tasks2.push_back(task2); // Long-running task
+  tasks2.push_back(task2); // Long-running task.
 
   EXPECT_CALL(sched2, statusUpdate(_, _));