本文整理了Java中org.apache.flink.configuration.Configuration.setFloat()
方法的一些代码示例,展示了Configuration.setFloat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.setFloat()
方法的具体详情如下:
包路径:org.apache.flink.configuration.Configuration
类名称:Configuration
方法名:setFloat
[英]Adds the given key/value pair to the configuration object.
[中]
代码示例来源:origin: apache/flink
@Override
public void setFloat(String key, float value) {
this.backingConfig.setFloat(this.prefix + key, value);
}
代码示例来源:origin: apache/flink
@Override
public void setFloat(ConfigOption<Float> key, float value) {
this.backingConfig.setFloat(prefix + key.key(), value);
}
代码示例来源:origin: apache/flink
orig.setInteger("mynumber", 100);
orig.setLong("longvalue", 478236947162389746L);
orig.setFloat("PI", 3.1415926f);
orig.setDouble("E", Math.E);
orig.setBoolean("shouldbetrue", true);
代码示例来源:origin: apache/flink
/**
* Remove 15% of the heap, at least 384MB.
*
*/
@Test
public void testHeapCutoff() {
Configuration conf = new Configuration();
conf.setFloat(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_RATIO, 0.15F);
conf.setInteger(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_MIN, 384);
Assert.assertEquals(616, Utils.calculateHeapSize(1000, conf));
Assert.assertEquals(8500, Utils.calculateHeapSize(10000, conf));
// test different configuration
Assert.assertEquals(3400, Utils.calculateHeapSize(4000, conf));
conf.setString(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_MIN.key(), "1000");
conf.setString(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_RATIO.key(), "0.1");
Assert.assertEquals(3000, Utils.calculateHeapSize(4000, conf));
conf.setString(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_RATIO.key(), "0.5");
Assert.assertEquals(2000, Utils.calculateHeapSize(4000, conf));
conf.setString(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_RATIO.key(), "1");
Assert.assertEquals(0, Utils.calculateHeapSize(4000, conf));
// test also deprecated keys
conf = new Configuration();
conf.setDouble(ConfigConstants.YARN_HEAP_CUTOFF_RATIO, 0.15);
conf.setInteger(ConfigConstants.YARN_HEAP_CUTOFF_MIN, 384);
Assert.assertEquals(616, Utils.calculateHeapSize(1000, conf));
Assert.assertEquals(8500, Utils.calculateHeapSize(10000, conf));
}
代码示例来源:origin: apache/flink
pc.setLong("long", 15);
pc.setLong("too_long", TOO_LONG);
pc.setFloat("float", 2.1456775f);
pc.setDouble("double", Math.PI);
pc.setDouble("negative_double", -1.0);
代码示例来源:origin: com.alibaba.blink/flink-core
@Override
public void setFloat(String key, float value) {
this.backingConfig.setFloat(this.prefix + key, value);
}
代码示例来源:origin: org.apache.flink/flink-core
@Override
public void setFloat(String key, float value) {
this.backingConfig.setFloat(this.prefix + key, value);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
public void setSpillingThresholdInput(int inputNum, float threshold) {
if (threshold < 0.0f || threshold > 1.0f) {
throw new IllegalArgumentException();
}
this.config.setFloat(SORT_SPILLING_THRESHOLD_INPUT_PREFIX + inputNum, threshold);
}
代码示例来源:origin: org.apache.flink/flink-runtime
public void setSpillingThresholdDriver(float threshold) {
if (threshold < 0.0f || threshold > 1.0f) {
throw new IllegalArgumentException();
}
this.config.setFloat(SORT_SPILLING_THRESHOLD_DRIVER, threshold);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.10
public void setSpillingThresholdDriver(float threshold) {
if (threshold < 0.0f || threshold > 1.0f) {
throw new IllegalArgumentException();
}
this.config.setFloat(SORT_SPILLING_THRESHOLD_DRIVER, threshold);
}
代码示例来源:origin: org.apache.flink/flink-runtime
public void setSpillingThresholdInput(int inputNum, float threshold) {
if (threshold < 0.0f || threshold > 1.0f) {
throw new IllegalArgumentException();
}
this.config.setFloat(SORT_SPILLING_THRESHOLD_INPUT_PREFIX + inputNum, threshold);
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
public void setSpillingThresholdDriver(float threshold) {
if (threshold < 0.0f || threshold > 1.0f) {
throw new IllegalArgumentException();
}
this.config.setFloat(SORT_SPILLING_THRESHOLD_DRIVER, threshold);
}
代码示例来源:origin: com.alibaba.blink/flink-runtime
public void setSpillingThresholdInput(int inputNum, float threshold) {
if (threshold < 0.0f || threshold > 1.0f) {
throw new IllegalArgumentException();
}
this.config.setFloat(SORT_SPILLING_THRESHOLD_INPUT_PREFIX + inputNum, threshold);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
public void setSpillingThresholdDriver(float threshold) {
if (threshold < 0.0f || threshold > 1.0f) {
throw new IllegalArgumentException();
}
this.config.setFloat(SORT_SPILLING_THRESHOLD_DRIVER, threshold);
}
代码示例来源:origin: org.apache.flink/flink-runtime_2.11
public void setSpillingThresholdInput(int inputNum, float threshold) {
if (threshold < 0.0f || threshold > 1.0f) {
throw new IllegalArgumentException();
}
this.config.setFloat(SORT_SPILLING_THRESHOLD_INPUT_PREFIX + inputNum, threshold);
}
代码示例来源:origin: com.alibaba.blink/flink-core
@Override
public void setFloat(ConfigOption<Float> key, float value) {
this.backingConfig.setFloat(prefix + key.key(), value);
}
代码示例来源:origin: org.apache.flink/flink-core
@Override
public void setFloat(ConfigOption<Float> key, float value) {
this.backingConfig.setFloat(prefix + key.key(), value);
}
内容来源于网络,如有侵权,请联系作者删除!