作者:_大盗坂崎由莉nyS | 来源:互联网 | 2023-10-12 14:44
本文整理了Java中org.apache.flink.runtime.util.EnvironmentInformation.getMaxJvmHeapMemory()
本文整理了Java中org.apache.flink.runtime.util.EnvironmentInformation.getMaxJvmHeapMemory()
方法的一些代码示例,展示了EnvironmentInformation.getMaxJvmHeapMemory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EnvironmentInformation.getMaxJvmHeapMemory()
方法的具体详情如下:
包路径:org.apache.flink.runtime.util.EnvironmentInformation
类名称:EnvironmentInformation
方法名:getMaxJvmHeapMemory
[英]The maximum JVM heap size, in bytes.
This method uses the -Xmx value of the JVM, if set. If not set, it returns (as a heuristic) 1/4th of the physical memory size.
[中]最大JVM堆大小,以字节为单位。
此方法使用JVM的-Xmx值(如果设置)。如果未设置,则返回(作为启发式)物理内存大小的1/4。
代码示例
代码示例来源:origin: com.alibaba.blink/flink-runtime
/**
* Gets an estimate of the size of the free heap memory. The estimate may vary, depending on the current
* level of memory fragmentation and the number of dead objects. For a better (but more heavy-weight)
* estimate, use {@link #getSizeOfFreeHeapMemoryWithDefrag()}.
*
* @return An estimate of the size of the free heap memory, in bytes.
*/
public static long getSizeOfFreeHeapMemory() {
Runtime r = Runtime.getRuntime();
return getMaxJvmHeapMemory() - r.totalMemory() + r.freeMemory();
}
代码示例来源:origin: org.apache.flink/flink-runtime
/**
* Gets an estimate of the size of the free heap memory. The estimate may vary, depending on the current
* level of memory fragmentation and the number of dead objects. For a better (but more heavy-weight)
* estimate, use {@link #getSizeOfFreeHeapMemoryWithDefrag()}.
*
* @return An estimate of the size of the free heap memory, in bytes.
*/
public static long getSizeOfFreeHeapMemory() {
Runtime r = Runtime.getRuntime();
return getMaxJvmHeapMemory() - r.totalMemory() + r.freeMemory();
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
/**
* Gets an estimate of the size of the free heap memory. The estimate may vary, depending on the current
* level of memory fragmentation and the number of dead objects. For a better (but more heavy-weight)
* estimate, use {@link #getSizeOfFreeHeapMemoryWithDefrag()}.
*
* @return An estimate of the size of the free heap memory, in bytes.
*/
public static long getSizeOfFreeHeapMemory() {
Runtime r = Runtime.getRuntime();
return getMaxJvmHeapMemory() - r.totalMemory() + r.freeMemory();
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
/**
* Gets an estimate of the size of the free heap memory. The estimate may vary, depending on the current
* level of memory fragmentation and the number of dead objects. For a better (but more heavy-weight)
* estimate, use {@link #getSizeOfFreeHeapMemoryWithDefrag()}.
*
* @return An estimate of the size of the free heap memory, in bytes.
*/
public static long getSizeOfFreeHeapMemory() {
Runtime r = Runtime.getRuntime();
return getMaxJvmHeapMemory() - r.totalMemory() + r.freeMemory();
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
long maxHeapMegabytes = getMaxJvmHeapMemory() >>> 20;
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
long maxHeapMegabytes = getMaxJvmHeapMemory() >>> 20;
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
long maxHeapMegabytes = getMaxJvmHeapMemory() >>> 20;
代码示例来源:origin: org.apache.flink/flink-runtime
long maxHeapMegabytes = getMaxJvmHeapMemory() >>> 20;
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
long maxMemory = EnvironmentInformation.getMaxJvmHeapMemory();
long directMemorySize = (long) (maxMemory / (1.0 - memoryFraction) * memoryFraction);
if (preAllocateMemory) {
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
final long maxMemory = EnvironmentInformation.getMaxJvmHeapMemory();
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
EnvironmentInformation.getMaxJvmHeapMemory());
代码示例来源:origin: org.apache.flink/flink-runtime
EnvironmentInformation.getMaxJvmHeapMemory());
代码示例来源:origin: com.alibaba.blink/flink-runtime
EnvironmentInformation.getMaxJvmHeapMemory());