ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntikho...@apache.org
Subject ignite git commit: Fixed IgniteIGNITE-4836 Yarn deployment is ignoring memory limits
Date Thu, 23 Mar 2017 14:47:48 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 48e78a99b -> 1f4ed52b2


Fixed IgniteIGNITE-4836 Yarn deployment is ignoring memory limits

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/1f4ed52b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1f4ed52b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1f4ed52b

Branch: refs/heads/master
Commit: 1f4ed52b29f7f71cdb5b7ac471b7f45a7f286f4a
Parents: 48e78a9
Author: Tomas Novak <tomas.novak@firma.seznam.cz>
Authored: Thu Mar 23 17:47:51 2017 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Thu Mar 23 17:47:51 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/yarn/ClusterProperties.java |  1 +
 .../ignite/yarn/IgniteApplicationMasterSelfTest.java   | 13 +++++++++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1f4ed52b/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java b/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
index 647aef2..75ad27a 100644
--- a/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
+++ b/modules/yarn/src/main/java/org/apache/ignite/yarn/ClusterProperties.java
@@ -395,6 +395,7 @@ public class ClusterProperties {
 
         envs.put(IGNITE_RUN_CPU_PER_NODE, toEnvVal(cpuPerNode));
         envs.put(IGNITE_MEMORY_PER_NODE, toEnvVal(memPerNode));
+        envs.put(IGNITE_MEMORY_OVERHEAD_PER_NODE, toEnvVal(memOverHeadPerNode));
         envs.put(IGNITE_NODE_COUNT, toEnvVal(nodeCnt));
 
         envs.put(IGNITE_URL, toEnvVal(igniteUrl));

http://git-wip-us.apache.org/repos/asf/ignite/blob/1f4ed52b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java
b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java
index 1190313..6e82298 100644
--- a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java
+++ b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java
@@ -272,6 +272,19 @@ public class IgniteApplicationMasterSelfTest extends TestCase {
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testContainerEnvironment() throws Exception {
+        props.memoryPerNode(1001);
+        props.memoryOverHeadPerNode(2002);
+
+        // Properties are used to initialize AM container environment
+        Map<String, String> result = props.toEnvs();
+        assertEquals(1001, (int) Double.parseDouble(result.get(ClusterProperties.IGNITE_MEMORY_PER_NODE)));
+        assertEquals(2002, (int) Double.parseDouble(result.get(ClusterProperties.IGNITE_MEMORY_OVERHEAD_PER_NODE)));
+    }
+
+    /**
      * @param host Host.
      * @param cpu Cpu count.
      * @param mem Memory.


Mime
View raw message