本文整理了Java中org.apache.hadoop.tools.rumen.ZombieJob.getNextRandomSeed()
方法的一些代码示例,展示了ZombieJob.getNextRandomSeed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZombieJob.getNextRandomSeed()
方法的具体详情如下:
包路径:org.apache.hadoop.tools.rumen.ZombieJob
类名称:ZombieJob
方法名:getNextRandomSeed
暂无
代码示例来源:origin: ch.cern.hadoop/hadoop-rumen
private long makeUpRuntimeCore(LoggedDiscreteCDF loggedDiscreteCDF) {
CDFRandomGenerator interpolator;
synchronized (interpolatorMap) {
interpolator = interpolatorMap.get(loggedDiscreteCDF);
}
if (interpolator == null) {
if (loggedDiscreteCDF.getNumberValues() == 0) {
throw new NoValueToMakeUpRuntime("no value to use to make up runtime");
}
interpolator =
hasRandomSeed ? new CDFPiecewiseLinearRandomGenerator(
loggedDiscreteCDF, getNextRandomSeed())
: new CDFPiecewiseLinearRandomGenerator(loggedDiscreteCDF);
/*
* It doesn't matter if we compute and store an interpolator twice because
* the two instances will be semantically identical and stateless, unless
* we're seeded, in which case we're not stateless but this code will be
* called synchronizedly.
*/
synchronized (interpolatorMap) {
interpolatorMap.put(loggedDiscreteCDF, interpolator);
}
}
return interpolator.randomValue();
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-rumen
private long makeUpRuntimeCore(LoggedDiscreteCDF loggedDiscreteCDF) {
CDFRandomGenerator interpolator;
synchronized (interpolatorMap) {
interpolator = interpolatorMap.get(loggedDiscreteCDF);
}
if (interpolator == null) {
if (loggedDiscreteCDF.getNumberValues() == 0) {
throw new NoValueToMakeUpRuntime("no value to use to make up runtime");
}
interpolator =
hasRandomSeed ? new CDFPiecewiseLinearRandomGenerator(
loggedDiscreteCDF, getNextRandomSeed())
: new CDFPiecewiseLinearRandomGenerator(loggedDiscreteCDF);
/*
* It doesn't matter if we compute and store an interpolator twice because
* the two instances will be semantically identical and stateless, unless
* we're seeded, in which case we're not stateless but this code will be
* called synchronizedly.
*/
synchronized (interpolatorMap) {
interpolatorMap.put(loggedDiscreteCDF, interpolator);
}
}
return interpolator.randomValue();
}
内容来源于网络,如有侵权,请联系作者删除!