You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/04/04 23:53:38 UTC
[10/13] mesos git commit: Windows: Updated use of
`getSystemEnvironment`.
Windows: Updated use of `getSystemEnvironment`.
The signature of `process::internal::getSystemEnvironment()` was
changed as part of https://reviews.apache.org/r/58127/
which rewrote the Windows subprocess helpers to use (and return)
UTF-16 strings. This updates the containerizers' usages of this
function.
Review: https://reviews.apache.org/r/58128/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bab04e14
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bab04e14
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bab04e14
Branch: refs/heads/master
Commit: bab04e1409dea7e151f59cd268fdeadb24480439
Parents: 41defd4
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Tue Apr 4 14:03:22 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Tue Apr 4 16:45:17 2017 -0700
----------------------------------------------------------------------
src/slave/containerizer/docker.cpp | 9 +++++----
src/slave/containerizer/mesos/launch.cpp | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/bab04e14/src/slave/containerizer/docker.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index ad9ab84..be1a298 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -1429,11 +1429,12 @@ Future<pid_t> DockerContainerizerProcess::launchExecutorProcess(
// be overwritten if they are specified by the framework. This might cause
// applications to not work, but upon overriding system defaults, it becomes
// the overidder's problem.
- Option<map<string, string>> systemEnvironment =
+ Option<map<std::wstring, std::wstring>> systemEnvironment =
process::internal::getSystemEnvironment();
- foreachpair(const string& key, const string& value,
- systemEnvironment.get()) {
- environment[key] = value;
+ foreachpair(const std::wstring& key,
+ const std::wstring& value,
+ systemEnvironment.get()) {
+ environment[stringify(key)] = stringify(value);
}
#endif // __WINDOWS__
http://git-wip-us.apache.org/repos/asf/mesos/blob/bab04e14/src/slave/containerizer/mesos/launch.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/launch.cpp b/src/slave/containerizer/mesos/launch.cpp
index 395394f..2835bef 100644
--- a/src/slave/containerizer/mesos/launch.cpp
+++ b/src/slave/containerizer/mesos/launch.cpp
@@ -682,11 +682,12 @@ int MesosContainerizerLaunch::execute()
// to be overwritten if they are specified by the framework. This might
// cause applications to not work, but upon overriding system defaults, it
// becomes the overidder's problem.
- Option<std::map<string, string>> systemEnvironment =
+ Option<std::map<std::wstring, std::wstring>> systemEnvironment =
process::internal::getSystemEnvironment();
- foreachpair (
- const string& key, const string& value, systemEnvironment.get()) {
- environment[key] = value;
+ foreachpair (const std::wstring& key,
+ const std::wstring& value,
+ systemEnvironment.get()) {
+ environment[stringify(key)] = stringify(value);
}
#endif // __WINDOWS__