[
https://issues.apache.org/jira/browse/FLINK-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14596111#comment-14596111
]
ASF GitHub Bot commented on FLINK-2235:
---------------------------------------
GitHub user mxm opened a pull request:
https://github.com/apache/flink/pull/859
[FLINK-2235] fix calculation of free memory for local execution
The Java runtime may return Long.MAX_VALUE for a call to the maxMemory()
method of the Runtime class. In these cases, we simply use the value
returned by freeMemory().
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mxm/flink too-much-memory
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/859.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #859
----
commit 97a1f697ac2270d6b1c6c4b98ef1eadd10b5a815
Author: Maximilian Michels <[email protected]>
Date: 2015-06-22T15:47:11Z
[FLINK-2235] fix calculation of free memory for local execution
The Java runtime may return Long.MAX_VALUE for a call to the maxMemory()
method of the Runtime class. In these cases, we simply use the value
returned by freeMemory().
----
> Local Flink cluster allocates too much memory
> ---------------------------------------------
>
> Key: FLINK-2235
> URL: https://issues.apache.org/jira/browse/FLINK-2235
> Project: Flink
> Issue Type: Bug
> Components: Local Runtime, TaskManager
> Affects Versions: 0.9
> Environment: Oracle JDK: 1.6.0_65-b14-462
> Eclipse
> Reporter: Maximilian Michels
> Priority: Minor
>
> When executing a Flink job locally, the task manager gets initialized with an
> insane amount of memory. After a quick look in the code it seems that the
> call to {{EnvironmentInformation.getSizeOfFreeHeapMemoryWithDefrag()}}
> returns a wrong estimate of the heap memory size.
> Moreover, the same user switched to Oracle JDK 1.8 and that made the error
> disappear. So I'm guessing this is some Java 1.6 quirk.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)