mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject mesos git commit: Added name to uri fetcher plugins.
Date Tue, 06 Sep 2016 00:29:23 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 1e9e82152 -> d1418bed5


Added name to uri fetcher plugins.

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


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

Branch: refs/heads/master
Commit: d1418bed5e99af5ca7794e990247d0e6a0a436c6
Parents: 1e9e821
Author: Srinivas Brahmaroutu <srbrahma@us.ibm.com>
Authored: Mon Sep 5 17:29:03 2016 -0700
Committer: Jie Yu <yujie.jay@gmail.com>
Committed: Mon Sep 5 17:29:03 2016 -0700

----------------------------------------------------------------------
 include/mesos/uri/fetcher.hpp | 5 +++++
 src/uri/fetchers/copy.cpp     | 6 ++++++
 src/uri/fetchers/copy.hpp     | 2 ++
 src/uri/fetchers/curl.cpp     | 6 ++++++
 src/uri/fetchers/curl.hpp     | 2 ++
 src/uri/fetchers/docker.cpp   | 6 ++++++
 src/uri/fetchers/docker.hpp   | 2 ++
 src/uri/fetchers/hadoop.cpp   | 6 ++++++
 src/uri/fetchers/hadoop.hpp   | 2 ++
 9 files changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d1418bed/include/mesos/uri/fetcher.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/uri/fetcher.hpp b/include/mesos/uri/fetcher.hpp
index 3add35c..e6c1ee0 100644
--- a/include/mesos/uri/fetcher.hpp
+++ b/include/mesos/uri/fetcher.hpp
@@ -56,6 +56,11 @@ public:
     virtual std::set<std::string> schemes() = 0;
 
     /**
+     * Returns the name that this plugin registered with.
+     */
+    virtual std::string name() = 0;
+
+    /**
      * Fetches a URI to the given directory. To avoid blocking or
      * crashing the current thread, this method might choose to fork
      * subprocesses for third party commands.

http://git-wip-us.apache.org/repos/asf/mesos/blob/d1418bed/src/uri/fetchers/copy.cpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/copy.cpp b/src/uri/fetchers/copy.cpp
index f095ad6..6e17628 100644
--- a/src/uri/fetchers/copy.cpp
+++ b/src/uri/fetchers/copy.cpp
@@ -64,6 +64,12 @@ set<string> CopyFetcherPlugin::schemes()
 }
 
 
+string CopyFetcherPlugin::name()
+{
+  return "copy";
+}
+
+
 Future<Nothing> CopyFetcherPlugin::fetch(
     const URI& uri,
     const string& directory)

http://git-wip-us.apache.org/repos/asf/mesos/blob/d1418bed/src/uri/fetchers/copy.hpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/copy.hpp b/src/uri/fetchers/copy.hpp
index 64e686c..711c919 100644
--- a/src/uri/fetchers/copy.hpp
+++ b/src/uri/fetchers/copy.hpp
@@ -38,6 +38,8 @@ public:
 
   virtual std::set<std::string> schemes();
 
+  virtual std::string name();
+
   virtual process::Future<Nothing> fetch(
       const URI& uri,
       const std::string& directory);

http://git-wip-us.apache.org/repos/asf/mesos/blob/d1418bed/src/uri/fetchers/curl.cpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/curl.cpp b/src/uri/fetchers/curl.cpp
index cc3f9ee..06651f4 100644
--- a/src/uri/fetchers/curl.cpp
+++ b/src/uri/fetchers/curl.cpp
@@ -67,6 +67,12 @@ set<string> CurlFetcherPlugin::schemes()
 }
 
 
+string CurlFetcherPlugin::name()
+{
+  return "curl";
+}
+
+
 Future<Nothing> CurlFetcherPlugin::fetch(
     const URI& uri,
     const string& directory)

http://git-wip-us.apache.org/repos/asf/mesos/blob/d1418bed/src/uri/fetchers/curl.hpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/curl.hpp b/src/uri/fetchers/curl.hpp
index 447e01b..da35a4a 100644
--- a/src/uri/fetchers/curl.hpp
+++ b/src/uri/fetchers/curl.hpp
@@ -38,6 +38,8 @@ public:
 
   virtual std::set<std::string> schemes();
 
+  virtual std::string name();
+
   virtual process::Future<Nothing> fetch(
       const URI& uri,
       const std::string& directory);

http://git-wip-us.apache.org/repos/asf/mesos/blob/d1418bed/src/uri/fetchers/docker.cpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/docker.cpp b/src/uri/fetchers/docker.cpp
index 72f70b8..2b43f8f 100644
--- a/src/uri/fetchers/docker.cpp
+++ b/src/uri/fetchers/docker.cpp
@@ -374,6 +374,12 @@ set<string> DockerFetcherPlugin::schemes()
 }
 
 
+string DockerFetcherPlugin::name()
+{
+  return "docker";
+}
+
+
 Future<Nothing> DockerFetcherPlugin::fetch(
     const URI& uri,
     const string& directory)

http://git-wip-us.apache.org/repos/asf/mesos/blob/d1418bed/src/uri/fetchers/docker.hpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/docker.hpp b/src/uri/fetchers/docker.hpp
index 6cb57be..a6148f0 100644
--- a/src/uri/fetchers/docker.hpp
+++ b/src/uri/fetchers/docker.hpp
@@ -48,6 +48,8 @@ public:
 
   virtual std::set<std::string> schemes();
 
+  virtual std::string name();
+
   virtual process::Future<Nothing> fetch(
       const URI& uri,
       const std::string& directory);

http://git-wip-us.apache.org/repos/asf/mesos/blob/d1418bed/src/uri/fetchers/hadoop.cpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/hadoop.cpp b/src/uri/fetchers/hadoop.cpp
index 3c69d43..7b92d24 100644
--- a/src/uri/fetchers/hadoop.cpp
+++ b/src/uri/fetchers/hadoop.cpp
@@ -67,6 +67,12 @@ set<string> HadoopFetcherPlugin::schemes()
 }
 
 
+string HadoopFetcherPlugin::name()
+{
+  return "hadoop";
+}
+
+
 Future<Nothing> HadoopFetcherPlugin::fetch(
     const URI& uri,
     const string& directory)

http://git-wip-us.apache.org/repos/asf/mesos/blob/d1418bed/src/uri/fetchers/hadoop.hpp
----------------------------------------------------------------------
diff --git a/src/uri/fetchers/hadoop.hpp b/src/uri/fetchers/hadoop.hpp
index 1689f60..e47fee8 100644
--- a/src/uri/fetchers/hadoop.hpp
+++ b/src/uri/fetchers/hadoop.hpp
@@ -51,6 +51,8 @@ public:
 
   virtual std::set<std::string> schemes();
 
+  virtual std::string name();
+
   virtual process::Future<Nothing> fetch(
       const URI& uri,
       const std::string& directory);


Mime
View raw message