org.apache.eagle.jpm.util.Utils.parseMemory()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.apache.eagle.jpm.util.Utils.parseMemory()方法的一些代码示例,展示了Utils.parseMemory()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.parseMemory()方法的具体详情如下:
包路径:org.apache.eagle.jpm.util.Utils
类名称:Utils
方法名:parseMemory

Utils.parseMemory介绍

暂无

代码示例

代码示例来源:origin: apache/eagle

private long getMemoryOverhead(JobConfig config, long executorMemory, String fieldName) {
  long result = 0L;
  String fieldValue = config.getConfig().get(fieldName);
  if (fieldValue != null) {
    try {
      result = Utils.parseMemory(fieldValue + "m");
    } catch (Exception e) {
      result = Utils.parseMemory(fieldValue);
    }
  }
  if (result == 0L) {
    result = Math.max(
      Utils.parseMemory(conf.getString("spark.defaultVal.spark.yarn.overhead.min")),
      executorMemory * conf.getInt("spark.defaultVal." + fieldName + ".factor") / 100);
  }
  return result;
}

代码示例来源:origin: apache/eagle

attemptEntity.setExecMemoryBytes(Utils.parseMemory(jobConfig.get(Constants.SPARK_EXECUTOR_MEMORY_KEY)));
  : Utils.parseMemory(jobConfig.get(Constants.SPARK_DRIVER_MEMORY_KEY)));
attemptEntity.setExecutorCores(Integer.parseInt(jobConfig.get(Constants.SPARK_EXECUTOR_CORES_KEY)));

代码示例来源:origin: apache/eagle

long executorMemory = Utils.parseMemory((String) this.getConfigVal(this.app.getConfig(), "spark.executor.memory", String.class.getName()));
long driverMemory = Utils.parseMemory(this.isClientMode(app.getConfig())
  ? (String) this.getConfigVal(this.app.getConfig(), "spark.yarn.am.memory", String.class.getName())
  : (String) this.getConfigVal(app.getConfig(), "spark.driver.memory", String.class.getName()));

相关文章

微信公众号

最新文章

更多