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/10/31 23:09:12 UTC
mesos git commit: Added parsers for 'SlaveID',
'ExecutorID' and 'FrameworkID'.
Repository: mesos
Updated Branches:
refs/heads/master 2e9ab0321 -> 0d116e099
Added parsers for 'SlaveID', 'ExecutorID' and 'FrameworkID'.
Review: https://reviews.apache.org/r/53197/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0d116e09
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0d116e09
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0d116e09
Branch: refs/heads/master
Commit: 0d116e099b6568dd0b99a973df57f3581b81a8a4
Parents: 2e9ab03
Author: Gast�n Kleiman <ga...@mesosphere.com>
Authored: Mon Oct 31 16:09:04 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Mon Oct 31 16:09:04 2016 -0700
----------------------------------------------------------------------
src/common/parse.hpp | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d116e09/src/common/parse.hpp
----------------------------------------------------------------------
diff --git a/src/common/parse.hpp b/src/common/parse.hpp
index 0479a54..1dca9ba 100644
--- a/src/common/parse.hpp
+++ b/src/common/parse.hpp
@@ -186,6 +186,36 @@ inline Try<mesos::RLimitInfo> parse(const std::string& value)
return protobuf::parse<mesos::RLimitInfo>(json.get());
}
+
+template <>
+inline Try<mesos::FrameworkID> parse(const std::string& value)
+{
+ mesos::FrameworkID frameworkId;
+ frameworkId.set_value(value);
+
+ return frameworkId;
+}
+
+
+template <>
+inline Try<mesos::ExecutorID> parse(const std::string& value)
+{
+ mesos::ExecutorID executorId;
+ executorId.set_value(value);
+
+ return executorId;
+}
+
+
+template <>
+inline Try<mesos::SlaveID> parse(const std::string& value)
+{
+ mesos::SlaveID slaveId;
+ slaveId.set_value(value);
+
+ return slaveId;
+}
+
} // namespace flags {
#endif // __COMMON_PARSE_HPP__