热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.flink.runtime.util.EnvironmentInformation.getMaxJvmHeapMemory()方法的使用及代码示例

本文整理了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

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());

推荐阅读
author-avatar
_大盗坂崎由莉nyS
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有