You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/03/29 06:57:36 UTC

[2/3] mesos git commit: Removed unused header includes.

Removed unused header includes.

This mostly targets unnecessary inclusion of stout headers, which can be
quite expensive to compile.

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


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

Branch: refs/heads/master
Commit: e021a01e51476797baf5125c5fa92ac1e24d35a4
Parents: 8b98bce
Author: Neil Conway <ne...@gmail.com>
Authored: Mon Mar 28 21:56:32 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Mon Mar 28 21:56:32 2016 -0700

----------------------------------------------------------------------
 src/credentials/credentials.hpp               | 4 +++-
 src/examples/persistent_volume_framework.cpp  | 2 --
 src/master/contender.cpp                      | 1 -
 src/slave/state.cpp                           | 1 -
 src/tests/fetcher_tests.cpp                   | 2 --
 src/tests/group_tests.cpp                     | 1 -
 src/tests/master_contender_detector_tests.cpp | 2 --
 src/tests/master_quota_tests.cpp              | 1 -
 src/tests/mesos.hpp                           | 2 --
 src/tests/module_tests.cpp                    | 1 -
 src/tests/paths_tests.cpp                     | 1 -
 src/tests/persistent_volume_tests.cpp         | 1 -
 src/tests/script.cpp                          | 1 -
 src/tests/state_tests.cpp                     | 1 -
 src/tests/status_update_manager_tests.cpp     | 4 ----
 src/tests/zookeeper_test_server.hpp           | 2 --
 src/zookeeper/group.cpp                       | 2 --
 17 files changed, 3 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/credentials/credentials.hpp
----------------------------------------------------------------------
diff --git a/src/credentials/credentials.hpp b/src/credentials/credentials.hpp
index 32492f2..35918ef 100644
--- a/src/credentials/credentials.hpp
+++ b/src/credentials/credentials.hpp
@@ -21,11 +21,13 @@
 #include <vector>
 
 #include <stout/option.hpp>
-#include <stout/os.hpp>
 #include <stout/path.hpp>
 #include <stout/protobuf.hpp>
 #include <stout/try.hpp>
 
+#include <stout/os/permissions.hpp>
+#include <stout/os/read.hpp>
+
 namespace mesos {
 namespace internal {
 namespace credentials {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/examples/persistent_volume_framework.cpp
----------------------------------------------------------------------
diff --git a/src/examples/persistent_volume_framework.cpp b/src/examples/persistent_volume_framework.cpp
index 3848e24..9ce43d2 100644
--- a/src/examples/persistent_volume_framework.cpp
+++ b/src/examples/persistent_volume_framework.cpp
@@ -29,11 +29,9 @@
 #include <mesos/authorizer/acls.hpp>
 
 #include <stout/flags.hpp>
-#include <stout/format.hpp>
 #include <stout/json.hpp>
 #include <stout/option.hpp>
 #include <stout/os.hpp>
-#include <stout/path.hpp>
 #include <stout/protobuf.hpp>
 #include <stout/stringify.hpp>
 #include <stout/uuid.hpp>

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/master/contender.cpp
----------------------------------------------------------------------
diff --git a/src/master/contender.cpp b/src/master/contender.cpp
index 9ad49ce..846f516 100644
--- a/src/master/contender.cpp
+++ b/src/master/contender.cpp
@@ -20,7 +20,6 @@
 
 #include <stout/check.hpp>
 #include <stout/lambda.hpp>
-#include <stout/protobuf.hpp>
 
 #include "master/constants.hpp"
 #include "master/contender.hpp"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/slave/state.cpp
----------------------------------------------------------------------
diff --git a/src/slave/state.cpp b/src/slave/state.cpp
index 94b6959..75bdfe1 100644
--- a/src/slave/state.cpp
+++ b/src/slave/state.cpp
@@ -23,7 +23,6 @@
 #include <stout/check.hpp>
 #include <stout/error.hpp>
 #include <stout/foreach.hpp>
-#include <stout/format.hpp>
 #include <stout/none.hpp>
 #include <stout/nothing.hpp>
 #include <stout/numify.hpp>

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/fetcher_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/fetcher_tests.cpp b/src/tests/fetcher_tests.cpp
index bd86c96..84c8d48 100644
--- a/src/tests/fetcher_tests.cpp
+++ b/src/tests/fetcher_tests.cpp
@@ -29,12 +29,10 @@
 
 #include <stout/base64.hpp>
 #include <stout/gtest.hpp>
-#include <stout/json.hpp>
 #include <stout/net.hpp>
 #include <stout/option.hpp>
 #include <stout/os.hpp>
 #include <stout/path.hpp>
-#include <stout/protobuf.hpp>
 #include <stout/strings.hpp>
 #include <stout/try.hpp>
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/group_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/group_tests.cpp b/src/tests/group_tests.cpp
index ed10f1f..acfb148 100644
--- a/src/tests/group_tests.cpp
+++ b/src/tests/group_tests.cpp
@@ -24,7 +24,6 @@
 
 #include <stout/gtest.hpp>
 #include <stout/option.hpp>
-#include <stout/os.hpp>
 
 #include "tests/zookeeper.hpp"
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/master_contender_detector_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_contender_detector_tests.cpp b/src/tests/master_contender_detector_tests.cpp
index bbce379..616a2c7 100644
--- a/src/tests/master_contender_detector_tests.cpp
+++ b/src/tests/master_contender_detector_tests.cpp
@@ -33,9 +33,7 @@
 #include <stout/duration.hpp>
 #include <stout/gtest.hpp>
 #include <stout/nothing.hpp>
-#include <stout/os.hpp>
 #include <stout/path.hpp>
-#include <stout/protobuf.hpp>
 #include <stout/try.hpp>
 
 #include "common/protobuf_utils.hpp"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/master_quota_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_quota_tests.cpp b/src/tests/master_quota_tests.cpp
index c2b46d2..c39e3ea 100644
--- a/src/tests/master_quota_tests.cpp
+++ b/src/tests/master_quota_tests.cpp
@@ -30,7 +30,6 @@
 #include <process/owned.hpp>
 #include <process/pid.hpp>
 
-#include <stout/format.hpp>
 #include <stout/protobuf.hpp>
 #include <stout/stringify.hpp>
 #include <stout/strings.hpp>

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/mesos.hpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp
index f2a29d0..a35371d 100644
--- a/src/tests/mesos.hpp
+++ b/src/tests/mesos.hpp
@@ -56,11 +56,9 @@
 #include <stout/bytes.hpp>
 #include <stout/foreach.hpp>
 #include <stout/gtest.hpp>
-#include <stout/json.hpp>
 #include <stout/lambda.hpp>
 #include <stout/none.hpp>
 #include <stout/option.hpp>
-#include <stout/os.hpp>
 #include <stout/stringify.hpp>
 #include <stout/try.hpp>
 #include <stout/uuid.hpp>

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/module_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/module_tests.cpp b/src/tests/module_tests.cpp
index eddb0e5..950d8e4 100644
--- a/src/tests/module_tests.cpp
+++ b/src/tests/module_tests.cpp
@@ -22,7 +22,6 @@
 #include <mesos/slave/isolator.hpp>
 
 #include <stout/dynamiclibrary.hpp>
-#include <stout/os.hpp>
 
 #include "common/parse.hpp"
 #include "examples/test_module.hpp"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/paths_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/paths_tests.cpp b/src/tests/paths_tests.cpp
index 7952ae2..81498e3 100644
--- a/src/tests/paths_tests.cpp
+++ b/src/tests/paths_tests.cpp
@@ -19,7 +19,6 @@
 #include <stout/check.hpp>
 #include <stout/os.hpp>
 #include <stout/path.hpp>
-#include <stout/protobuf.hpp>
 #include <stout/stringify.hpp>
 #include <stout/strings.hpp>
 #include <stout/uuid.hpp>

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/persistent_volume_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/persistent_volume_tests.cpp b/src/tests/persistent_volume_tests.cpp
index aa097c3..7cb153c 100644
--- a/src/tests/persistent_volume_tests.cpp
+++ b/src/tests/persistent_volume_tests.cpp
@@ -29,7 +29,6 @@
 #include <process/owned.hpp>
 
 #include <stout/foreach.hpp>
-#include <stout/format.hpp>
 #include <stout/fs.hpp>
 #include <stout/path.hpp>
 #include <stout/strings.hpp>

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/script.cpp
----------------------------------------------------------------------
diff --git a/src/tests/script.cpp b/src/tests/script.cpp
index 36ddf40..5f2e272 100644
--- a/src/tests/script.cpp
+++ b/src/tests/script.cpp
@@ -24,7 +24,6 @@
 #include <stout/check.hpp>
 #include <stout/os.hpp>
 #include <stout/path.hpp>
-#include <stout/protobuf.hpp>
 #include <stout/stringify.hpp>
 #include <stout/strings.hpp>
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/state_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/state_tests.cpp b/src/tests/state_tests.cpp
index 8fb2798..0b5a6ab 100644
--- a/src/tests/state_tests.cpp
+++ b/src/tests/state_tests.cpp
@@ -32,7 +32,6 @@
 #include <stout/gtest.hpp>
 #include <stout/option.hpp>
 #include <stout/os.hpp>
-#include <stout/protobuf.hpp>
 #include <stout/try.hpp>
 
 #include <stout/tests/utils.hpp>

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/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 801767b..af989a9 100644
--- a/src/tests/status_update_manager_tests.cpp
+++ b/src/tests/status_update_manager_tests.cpp
@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include <list>
 #include <string>
 #include <vector>
 
@@ -30,8 +29,6 @@
 #include <process/pid.hpp>
 
 #include <stout/none.hpp>
-#include <stout/os.hpp>
-#include <stout/protobuf.hpp>
 #include <stout/result.hpp>
 #include <stout/try.hpp>
 
@@ -56,7 +53,6 @@ using process::Future;
 using process::Owned;
 using process::PID;
 
-using std::list;
 using std::string;
 using std::vector;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/tests/zookeeper_test_server.hpp
----------------------------------------------------------------------
diff --git a/src/tests/zookeeper_test_server.hpp b/src/tests/zookeeper_test_server.hpp
index e2d8218..1f1360e 100644
--- a/src/tests/zookeeper_test_server.hpp
+++ b/src/tests/zookeeper_test_server.hpp
@@ -23,8 +23,6 @@
 
 #include <jvm/org/apache/zookeeper.hpp>
 
-#include <stout/os.hpp>
-
 #include "zookeeper/zookeeper.hpp"
 
 namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e021a01e/src/zookeeper/group.cpp
----------------------------------------------------------------------
diff --git a/src/zookeeper/group.cpp b/src/zookeeper/group.cpp
index 7aa95a7..ca5e99d 100644
--- a/src/zookeeper/group.cpp
+++ b/src/zookeeper/group.cpp
@@ -29,7 +29,6 @@
 #include <stout/error.hpp>
 #include <stout/none.hpp>
 #include <stout/numify.hpp>
-#include <stout/os.hpp>
 #include <stout/path.hpp>
 #include <stout/result.hpp>
 #include <stout/some.hpp>
@@ -46,7 +45,6 @@ using namespace process;
 
 using process::wait; // Necessary on some OS's to disambiguate.
 
-using std::make_pair;
 using std::queue;
 using std::set;
 using std::string;