ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntikho...@apache.org
Subject ignite git commit: IGNITE-7080 Check env variable names to only pass IGNITE_* to nodes. This closes #3161.
Date Wed, 06 Dec 2017 16:31:43 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 813247399 -> 280acbf83


IGNITE-7080 Check env variable names to only pass IGNITE_* to nodes. This closes #3161.

Signed-off-by: nikolay_tikhonov <ntikhonov@gridgain.com>


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

Branch: refs/heads/master
Commit: 280acbf831a0611c15d2b8d7b103bcb8d08c40d7
Parents: 8132473
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Wed Dec 6 19:30:56 2017 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Wed Dec 6 19:30:56 2017 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/yarn/ApplicationMaster.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/280acbf8/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
index 238ed06..bef5f5d 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ApplicationMaster.java
@@ -117,7 +117,14 @@ public class ApplicationMaster implements AMRMClientAsync.CallbackHandler
{
                         // Set the tokens to the newly allocated container:
                         ctx.setTokens(allTokens.duplicate());
 
-                    Map<String, String> env = new HashMap<>(System.getenv());
+                    Map<String, String> env = new HashMap<>(ctx.getEnvironment());
+
+                    Map<String, String> systemEnv = System.getenv();
+
+                    for (String key : systemEnv.keySet()) {
+                        if (key.matches("^IGNITE_[_0-9A-Z]+$"))
+                            env.put(key, systemEnv.get(key));
+                    }
 
                     env.put("IGNITE_TCP_DISCOVERY_ADDRESSES", getAddress(c.getNodeId().getHost()));
 


Mime
View raw message