[
https://issues.apache.org/jira/browse/APEXCORE-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15102070#comment-15102070
]
ASF GitHub Bot commented on APEXCORE-296:
-----------------------------------------
Github user amberarrow commented on a diff in the pull request:
https://github.com/apache/incubator-apex-core/pull/203#discussion_r49877090
--- Diff:
engine/src/main/java/com/datatorrent/stram/StreamingContainerManager.java ---
@@ -1027,6 +1027,19 @@ public int processEvents()
}
}
o.stats.lastWindowedStats = stats;
+ if (!o.stats.responses.isEmpty()) {
+ if (o.stats.operatorResponses == null) {
+ o.stats.operatorResponses = new ArrayList<>();
+ } else {
+ o.stats.operatorResponses.clear();
+ }
+ StatsListener.OperatorResponse operatorResponse;
+ while ((operatorResponse = o.stats.responses.poll()) != null) {
+ o.stats.operatorResponses.add(operatorResponse);
+ }
+ } else {
+ o.stats.operatorResponses = null;
--- End diff --
This version tries to avoid creating garbage by reusing the ArrayList if
one is already present.
> App Master Dies With 1 gb of memory
> -----------------------------------
>
> Key: APEXCORE-296
> URL: https://issues.apache.org/jira/browse/APEXCORE-296
> Project: Apache Apex Core
> Issue Type: Bug
> Affects Versions: 3.0.0, 3.1.0, 3.2.0, 3.1.1, 3.3.0, 3.2.1
> Reporter: Timothy Farkas
> Assignee: gaurav gupta
>
> When the App Master only has 1gb of memory it dies. When the memory is
> increased to 2gb it runs fine. Often times the App Master dies abruptly
> without any log messages, occasionally there is an OutOfMemoryException.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)