gpt4 book ai didi

org.apache.hadoop.tools.rumen.ZombieJob.makeUpRuntime()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 12:50:16 28 4
gpt4 key购买 nike

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

ZombieJob.makeUpRuntime介绍

[英]Perform a weighted random selection on a list of CDFs, and produce a random variable using the selected CDF.
[中]对CDF列表执行加权随机选择,并使用所选CDF生成随机变量。

代码示例

代码示例来源:origin: ch.cern.hadoop/hadoop-rumen

private long doMakeUpReduceRuntime(State state) {
 long reduceTime;
 try {
  if (state == State.SUCCEEDED) {
   reduceTime = makeUpRuntime(job.getSuccessfulReduceAttemptCDF());
  } else if (state == State.FAILED) {
   reduceTime = makeUpRuntime(job.getFailedReduceAttemptCDF());
  } else {
   throw new IllegalArgumentException(
     "state is neither SUCCEEDED nor FAILED: " + state);
  }
  return reduceTime;
 } catch (NoValueToMakeUpRuntime e) {
  return 0;
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-rumen

private long doMakeUpReduceRuntime(State state) {
 long reduceTime;
 try {
  if (state == State.SUCCEEDED) {
   reduceTime = makeUpRuntime(job.getSuccessfulReduceAttemptCDF());
  } else if (state == State.FAILED) {
   reduceTime = makeUpRuntime(job.getFailedReduceAttemptCDF());
  } else {
   throw new IllegalArgumentException(
     "state is neither SUCCEEDED nor FAILED: " + state);
  }
  return reduceTime;
 } catch (NoValueToMakeUpRuntime e) {
  return 0;
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-rumen

private long makeUpMapRuntime(State state, int locality) {
 long runtime;
 // make up runtime
 if (state == State.SUCCEEDED || state == State.FAILED) {
  List<LoggedDiscreteCDF> cdfList =
    state == State.SUCCEEDED ? job.getSuccessfulMapAttemptCDFs() : job
      .getFailedMapAttemptCDFs();
  // XXX MapCDFs is a ArrayList of 4 possible groups: distance=0, 1, 2, and
  // the last group is "distance cannot be determined". All pig jobs
  // would have only the 4th group, and pig tasks usually do not have
  // any locality, so this group should count as "distance=2".
  // However, setup/cleanup tasks are also counted in the 4th group.
  // These tasks do not make sense.
  if(cdfList==null) {
    runtime = -1;
    return runtime;
  }
  try {
   runtime = makeUpRuntime(cdfList.get(locality));
  } catch (NoValueToMakeUpRuntime e) {
   runtime = makeUpRuntime(cdfList);
  }
 } else {
  throw new IllegalArgumentException(
    "state is neither SUCCEEDED nor FAILED: " + state);
 }
 return runtime;
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-rumen

private long makeUpMapRuntime(State state, int locality) {
 long runtime;
 // make up runtime
 if (state == State.SUCCEEDED || state == State.FAILED) {
  List<LoggedDiscreteCDF> cdfList =
    state == State.SUCCEEDED ? job.getSuccessfulMapAttemptCDFs() : job
      .getFailedMapAttemptCDFs();
  // XXX MapCDFs is a ArrayList of 4 possible groups: distance=0, 1, 2, and
  // the last group is "distance cannot be determined". All pig jobs
  // would have only the 4th group, and pig tasks usually do not have
  // any locality, so this group should count as "distance=2".
  // However, setup/cleanup tasks are also counted in the 4th group.
  // These tasks do not make sense.
  if(cdfList==null) {
    runtime = -1;
    return runtime;
  }
  try {
   runtime = makeUpRuntime(cdfList.get(locality));
  } catch (NoValueToMakeUpRuntime e) {
   runtime = makeUpRuntime(cdfList);
  }
 } else {
  throw new IllegalArgumentException(
    "state is neither SUCCEEDED nor FAILED: " + state);
 }
 return runtime;
}

代码示例来源:origin: ch.cern.hadoop/hadoop-rumen

throw new IllegalStateException("application error");
return makeUpRuntime(cdf);

代码示例来源:origin: com.github.jiayuhan-it/hadoop-rumen

throw new IllegalStateException("application error");
return makeUpRuntime(cdf);

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com