You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by zh...@apache.org on 2015/12/28 17:18:37 UTC
[1/2] storm git commit: [STORM-1403] consider gc childopts in memory
calculation for worker JVM
Repository: storm
Updated Branches:
refs/heads/master 50c8f8360 -> 36c10f7ab
[STORM-1403] consider gc childopts in memory calculation for worker JVM
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/27d8b280
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/27d8b280
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/27d8b280
Branch: refs/heads/master
Commit: 27d8b280eb2ee15d78e1f5c397c4fdb84d57dfc9
Parents: 418792f
Author: zhuol <zh...@yahoo-inc.com>
Authored: Fri Dec 18 13:13:39 2015 -0600
Committer: zhuol <zh...@yahoo-inc.com>
Committed: Fri Dec 18 13:13:39 2015 -0600
----------------------------------------------------------------------
.../jvm/backtype/storm/scheduler/Cluster.java | 27 ++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/27d8b280/storm-core/src/jvm/backtype/storm/scheduler/Cluster.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/scheduler/Cluster.java b/storm-core/src/jvm/backtype/storm/scheduler/Cluster.java
index ff2b233..17e5e8e 100644
--- a/storm-core/src/jvm/backtype/storm/scheduler/Cluster.java
+++ b/storm-core/src/jvm/backtype/storm/scheduler/Cluster.java
@@ -480,6 +480,27 @@ public class Cluster {
* */
private Double getAssignedMemoryForSlot(Map topConf) {
Double totalWorkerMemory = 0.0;
+ final Integer TOPOLOGY_WORKER_DEFAULT_MEMORY_ALLOCATION = 768;
+
+ String topologyWorkerGcChildopts = null;
+ if (topConf.get(Config.TOPOLOGY_WORKER_GC_CHILDOPTS) instanceof List) {
+ topologyWorkerGcChildopts = getStringFromStringList(topConf.get(Config.TOPOLOGY_WORKER_GC_CHILDOPTS));
+ } else {
+ topologyWorkerGcChildopts = Utils.getString(topConf.get(Config.TOPOLOGY_WORKER_GC_CHILDOPTS), null);
+ }
+
+ String workerGcChildopts = null;
+ if (topConf.get(Config.WORKER_GC_CHILDOPTS) instanceof List) {
+ workerGcChildopts = getStringFromStringList(topConf.get(Config.WORKER_GC_CHILDOPTS));
+ } else {
+ workerGcChildopts = Utils.getString(topConf.get(Config.WORKER_GC_CHILDOPTS), null);
+ }
+
+ Double memGcChildopts = null;
+ memGcChildopts = Utils.parseJvmHeapMemByChildOpts(topologyWorkerGcChildopts, null);
+ if (memGcChildopts == null) {
+ memGcChildopts = Utils.parseJvmHeapMemByChildOpts(workerGcChildopts, null);
+ }
String topologyWorkerChildopts = null;
if (topConf.get(Config.TOPOLOGY_WORKER_CHILDOPTS) instanceof List) {
@@ -497,12 +518,14 @@ public class Cluster {
}
Double memWorkerChildopts = Utils.parseJvmHeapMemByChildOpts(workerChildopts, null);
- if (memTopologyWorkerChildopts != null) {
+ if (memGcChildopts != null) {
+ totalWorkerMemory += memGcChildopts;
+ } else if (memTopologyWorkerChildopts != null) {
totalWorkerMemory += memTopologyWorkerChildopts;
} else if (memWorkerChildopts != null) {
totalWorkerMemory += memWorkerChildopts;
} else {
- totalWorkerMemory += Utils.getInt(topConf.get(Config.WORKER_HEAP_MEMORY_MB));
+ totalWorkerMemory += Utils.getInt(topConf.get(Config.WORKER_HEAP_MEMORY_MB), TOPOLOGY_WORKER_DEFAULT_MEMORY_ALLOCATION);
}
String topoWorkerLwChildopts = null;
[2/2] storm git commit: Merge branch '1403' of
https://github.com/zhuoliu/storm into Storm-1403-Merge
Posted by zh...@apache.org.
Merge branch '1403' of https://github.com/zhuoliu/storm into Storm-1403-Merge
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/36c10f7a
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/36c10f7a
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/36c10f7a
Branch: refs/heads/master
Commit: 36c10f7ab00ebe12d23a6011bfe68be47ff22e6c
Parents: 50c8f83 27d8b28
Author: zhuol <zh...@yahoo-inc.com>
Authored: Mon Dec 28 10:16:02 2015 -0600
Committer: zhuol <zh...@yahoo-inc.com>
Committed: Mon Dec 28 10:16:02 2015 -0600
----------------------------------------------------------------------
.../jvm/backtype/storm/scheduler/Cluster.java | 27 ++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/36c10f7a/storm-core/src/jvm/backtype/storm/scheduler/Cluster.java
----------------------------------------------------------------------