You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/01/30 03:45:41 UTC

[2/2] mesos git commit: Windows:[2/2] Removed references to `os::glob()` from mesos.

Windows:[2/2] Removed references to `os::glob()` from mesos.

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


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

Branch: refs/heads/master
Commit: a0aee4f6c016c7d2ca2034a87a3fe819b1535b98
Parents: 4ad7d2f
Author: Alex Naparu <al...@outlook.com>
Authored: Fri Jan 29 18:10:04 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Fri Jan 29 18:42:20 2016 -0800

----------------------------------------------------------------------
 src/cli/mesos.cpp       | 3 ++-
 src/slave/paths.cpp     | 8 ++++----
 src/tests/zookeeper.cpp | 3 ++-
 3 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a0aee4f6/src/cli/mesos.cpp
----------------------------------------------------------------------
diff --git a/src/cli/mesos.cpp b/src/cli/mesos.cpp
index bd06653..f76d3ed 100644
--- a/src/cli/mesos.cpp
+++ b/src/cli/mesos.cpp
@@ -19,6 +19,7 @@
 #include <iostream>
 #include <list>
 
+#include <stout/fs.hpp>
 #include <stout/option.hpp>
 #include <stout/os.hpp>
 #include <stout/path.hpp>
@@ -41,7 +42,7 @@ void usage(const char* argv0)
 
   if (PATH.isSome()) {
     foreach (const string& path, strings::split(PATH.get(), ":")) {
-      Try<list<string> > matches = os::glob(path::join(path, "mesos-*"));
+      Try<list<string> > matches = fs::list(path::join(path, "mesos-*"));
       if (matches.isSome()) {
         foreach (const string& match, matches.get()) {
           Try<bool> access = os::access(match, X_OK);

http://git-wip-us.apache.org/repos/asf/mesos/blob/a0aee4f6/src/slave/paths.cpp
----------------------------------------------------------------------
diff --git a/src/slave/paths.cpp b/src/slave/paths.cpp
index 5c650c6..77e86a0 100644
--- a/src/slave/paths.cpp
+++ b/src/slave/paths.cpp
@@ -111,7 +111,7 @@ Try<list<string>> getFrameworkPaths(
     const string& rootDir,
     const SlaveID& slaveId)
 {
-  return os::glob(
+  return fs::list(
       path::join(getSlavePath(rootDir, slaveId), "frameworks", "*"));
 }
 
@@ -151,7 +151,7 @@ Try<list<string>> getExecutorPaths(
     const SlaveID& slaveId,
     const FrameworkID& frameworkId)
 {
-  return os::glob(path::join(
+  return fs::list(path::join(
       getFrameworkPath(rootDir, slaveId, frameworkId),
       "executors",
       "*"));
@@ -189,7 +189,7 @@ Try<list<string>> getExecutorRunPaths(
     const FrameworkID& frameworkId,
     const ExecutorID& executorId)
 {
-  return os::glob(path::join(
+  return fs::list(path::join(
       getExecutorPath(rootDir, slaveId, frameworkId, executorId),
       "runs",
       "*"));
@@ -304,7 +304,7 @@ Try<list<string>> getTaskPaths(
     const ExecutorID& executorId,
     const ContainerID& containerId)
 {
-  return os::glob(path::join(
+  return fs::list(path::join(
       getExecutorRunPath(
           rootDir,
           slaveId,

http://git-wip-us.apache.org/repos/asf/mesos/blob/a0aee4f6/src/tests/zookeeper.cpp
----------------------------------------------------------------------
diff --git a/src/tests/zookeeper.cpp b/src/tests/zookeeper.cpp
index 520a300..d29b100 100644
--- a/src/tests/zookeeper.cpp
+++ b/src/tests/zookeeper.cpp
@@ -28,6 +28,7 @@
 #include <jvm/org/apache/log4j.hpp>
 
 #include <stout/check.hpp>
+#include <stout/fs.hpp>
 #include <stout/lambda.hpp>
 #include <stout/path.hpp>
 #include <stout/os.hpp>
@@ -60,7 +61,7 @@ void ZooKeeperTest::SetUpTestCase()
       path::join(zkHome, "zookeeper-" ZOOKEEPER_VERSION ".jar");
 
     // Now add all the libraries in 'lib' too.
-    Try<list<string> > jars = os::glob(path::join(zkHome, "lib", "*.jar"));
+    Try<list<string> > jars = fs::list(path::join(zkHome, "lib", "*.jar"));
 
     CHECK_SOME(jars);