本文整理了Java中org.apache.flink.configuration.Configuration.getDouble()
方法的一些代码示例,展示了Configuration.getDouble()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getDouble()
方法的具体详情如下:
包路径:org.apache.flink.configuration.Configuration
类名称:Configuration
方法名:getDouble
[英]Returns the value associated with the given key as a double.
[中]以双精度形式返回与给定键关联的值。
代码示例来源:origin: apache/flink
@Override
public double getDouble(ConfigOption<Double> configOption, double overrideDefault) {
return this.backingConfig.getDouble(configOption, overrideDefault);
}
代码示例来源:origin: apache/flink
@Override
public double getDouble(String key, double defaultValue) {
return this.backingConfig.getDouble(this.prefix + key, defaultValue);
}
代码示例来源:origin: apache/flink
@Override
public double getDouble(ConfigOption<Double> configOption) {
return this.backingConfig.getDouble(prefixOption(configOption, prefix));
}
代码示例来源:origin: apache/flink
flinkConfig.getInteger(MESOS_RM_TASKS_SLOTS));
double cpus = flinkConfig.getDouble(MESOS_RM_TASKS_CPUS);
if (cpus <= 0.0) {
cpus = Math.max(containeredParameters.numSlots(), 1.0);
代码示例来源:origin: apache/flink
assertEquals(478236947162389746L, copy.getLong("longvalue", 0L));
assertEquals(3.1415926f, copy.getFloat("PI", 3.1415926f), 0.0);
assertEquals(Math.E, copy.getDouble("E", 0.0), 0.0);
assertEquals(true, copy.getBoolean("shouldbetrue", false));
assertArrayEquals(new byte[] { 1, 2, 3, 4, 5 }, copy.getBytes("bytes sequence", null));
代码示例来源:origin: apache/flink
assertEquals(5L, pc.getLong("int", 0));
assertEquals(5f, pc.getFloat("int", 0), 0.0);
assertEquals(5.0, pc.getDouble("int", 0), 0.0);
assertEquals(false, pc.getBoolean("int", true));
assertEquals("5", pc.getString("int", "0"));
assertEquals(15L, pc.getLong("long", 0));
assertEquals(15f, pc.getFloat("long", 0), 0.0);
assertEquals(15.0, pc.getDouble("long", 0), 0.0);
assertEquals(false, pc.getBoolean("long", true));
assertEquals("15", pc.getString("long", "0"));
assertEquals(TOO_LONG, pc.getLong("too_long", 0));
assertEquals((float) TOO_LONG, pc.getFloat("too_long", 0), 10.0);
assertEquals((double) TOO_LONG, pc.getDouble("too_long", 0), 10.0);
assertEquals(false, pc.getBoolean("too_long", true));
assertEquals(String.valueOf(TOO_LONG), pc.getString("too_long", "0"));
assertEquals(0L, pc.getLong("float", 0));
assertEquals(2.1456775f, pc.getFloat("float", 0), 0.0);
assertEquals(2.1456775, pc.getDouble("float", 0), 0.0000001);
assertEquals(false, pc.getBoolean("float", true));
assertTrue(pc.getString("float", "0").startsWith("2.145677"));
assertEquals(0L, pc.getLong("double", 0));
assertEquals(3.141592f, pc.getFloat("double", 0), 0.000001);
assertEquals(Math.PI, pc.getDouble("double", 0), 0.0);
assertEquals(false, pc.getBoolean("double", true));
assertTrue(pc.getString("double", "0").startsWith("3.1415926535"));
代码示例来源:origin: com.alibaba.blink/flink-core
@Override
public double getDouble(ConfigOption<Double> configOption, double overrideDefault) {
return this.backingConfig.getDouble(configOption, overrideDefault);
}
代码示例来源:origin: org.apache.flink/flink-core
@Override
public double getDouble(String key, double defaultValue) {
return this.backingConfig.getDouble(this.prefix + key, defaultValue);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
public double getRelativeBackChannelMemory() {
double relativeBackChannelMemory = this.config.getDouble(ITERATION_HEAD_BACKCHANNEL_MEMORY, 0);
if (relativeBackChannelMemory <= 0) {
throw new IllegalArgumentException();
}
return relativeBackChannelMemory;
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
public double getRelativeSolutionSetMemory() {
double backChannelMemory = this.config.getDouble(ITERATION_HEAD_SOLUTION_SET_MEMORY, 0);
if (backChannelMemory <= 0) {
throw new IllegalArgumentException();
}
return backChannelMemory;
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
public double getRelativeSolutionSetMemory() {
double backChannelMemory = this.config.getDouble(ITERATION_HEAD_SOLUTION_SET_MEMORY, 0);
if (backChannelMemory <= 0) {
throw new IllegalArgumentException();
}
return backChannelMemory;
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
public double getRelativeBackChannelMemory() {
double relativeBackChannelMemory = this.config.getDouble(ITERATION_HEAD_BACKCHANNEL_MEMORY, 0);
if (relativeBackChannelMemory <= 0) {
throw new IllegalArgumentException();
}
return relativeBackChannelMemory;
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
public double getRelativeBackChannelMemory() {
double relativeBackChannelMemory = this.config.getDouble(ITERATION_HEAD_BACKCHANNEL_MEMORY, 0);
if (relativeBackChannelMemory <= 0) {
throw new IllegalArgumentException();
}
return relativeBackChannelMemory;
}
代码示例来源:origin: org.apache.flink/flink-runtime
public double getRelativeBackChannelMemory() {
double relativeBackChannelMemory = this.config.getDouble(ITERATION_HEAD_BACKCHANNEL_MEMORY, 0);
if (relativeBackChannelMemory <= 0) {
throw new IllegalArgumentException();
}
return relativeBackChannelMemory;
}
代码示例来源:origin: org.apache.flink/flink-runtime
public double getRelativeSolutionSetMemory() {
double backChannelMemory = this.config.getDouble(ITERATION_HEAD_SOLUTION_SET_MEMORY, 0);
if (backChannelMemory <= 0) {
throw new IllegalArgumentException();
}
return backChannelMemory;
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
public double getRelativeSolutionSetMemory() {
double backChannelMemory = this.config.getDouble(ITERATION_HEAD_SOLUTION_SET_MEMORY, 0);
if (backChannelMemory <= 0) {
throw new IllegalArgumentException();
}
return backChannelMemory;
}
代码示例来源:origin: com.alibaba.blink/flink-core
@Override
public double getDouble(ConfigOption<Double> configOption) {
return this.backingConfig.getDouble(prefixOption(configOption, prefix));
}
代码示例来源:origin: org.apache.flink/flink-runtime
public static ForkJoinExecutorConfiguration fromConfiguration(final Configuration configuration) {
final double parallelismFactor = configuration.getDouble(AkkaOptions.FORK_JOIN_EXECUTOR_PARALLELISM_FACTOR);
final int minParallelism = configuration.getInteger(AkkaOptions.FORK_JOIN_EXECUTOR_PARALLELISM_MIN);
final int maxParallelism = configuration.getInteger(AkkaOptions.FORK_JOIN_EXECUTOR_PARALLELISM_MAX);
return new ForkJoinExecutorConfiguration(parallelismFactor, minParallelism, maxParallelism);
}
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
public static ForkJoinExecutorConfiguration fromConfiguration(final Configuration configuration) {
final double parallelismFactor = configuration.getDouble(AkkaOptions.FORK_JOIN_EXECUTOR_PARALLELISM_FACTOR);
final int minParallelism = configuration.getInteger(AkkaOptions.FORK_JOIN_EXECUTOR_PARALLELISM_MIN);
final int maxParallelism = configuration.getInteger(AkkaOptions.FORK_JOIN_EXECUTOR_PARALLELISM_MAX);
return new ForkJoinExecutorConfiguration(parallelismFactor, minParallelism, maxParallelism);
}
}
代码示例来源:origin: com.alibaba.blink/flink-table
protected void calculateOnShuffleStages(Map<ExecNode<?, ?>, ShuffleStage> nodeShuffleStageMap, DAGProcessContext context) {
Configuration tableConf = tEnv.getConfig().getConf();
NodeResourceUtil.InferMode inferMode = NodeResourceUtil.getInferMode(tableConf);
getShuffleStageParallelismCalculator(tableConf, inferMode).calculate(nodeShuffleStageMap.values());
Double cpuLimit = tableConf.getDouble(TableConfigOptions.SQL_RESOURCE_RUNNING_UNIT_CPU_TOTAL);
if (cpuLimit > 0) {
Map<BatchExecNode<?>, Set<NodeRunningUnit>> nodeRunningUnitMap = context.getRunningUnitMap();
BatchParallelismAdjuster.adjustParallelism(cpuLimit, nodeRunningUnitMap, nodeShuffleStageMap);
}
}
内容来源于网络,如有侵权,请联系作者删除!