org.apache.flink.configuration.Configuration.setDouble()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(114)

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

Configuration.setDouble介绍

[英]Adds the given key/value pair to the configuration object.
[中]将给定的键/值对添加到配置对象。

代码示例

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

@Override
public void setDouble(String key, double value) {
  this.backingConfig.setDouble(this.prefix + key, value);
}

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

@Override
public void setDouble(ConfigOption<Double> key, double value) {
  this.backingConfig.setDouble(prefix + key.key(), value);
}

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

orig.setLong("longvalue", 478236947162389746L);
orig.setFloat("PI", 3.1415926f);
orig.setDouble("E", Math.E);
orig.setBoolean("shouldbetrue", true);
orig.setBytes("bytes sequence", new byte[] { 1, 2, 3, 4, 5 });

代码示例来源: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("too_long", TOO_LONG);
pc.setFloat("float", 2.1456775f);
pc.setDouble("double", Math.PI);
pc.setDouble("negative_double", -1.0);
pc.setDouble("zero", 0.0);
pc.setDouble("too_long_double", TOO_LONG_DOUBLE);
pc.setString("string", "42");
pc.setString("non_convertible_string", "bcdefg&&");

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

public void setRelativeMemoryInput(int inputNum, double relativeMemorySize) {
  this.config.setDouble(MEMORY_INPUT_PREFIX + inputNum, relativeMemorySize);
}

代码示例来源:origin: com.alibaba.blink/flink-core

@Override
public void setDouble(String key, double value) {
  this.backingConfig.setDouble(this.prefix + key, value);
}

代码示例来源:origin: org.apache.flink/flink-core

@Override
public void setDouble(String key, double value) {
  this.backingConfig.setDouble(this.prefix + key, value);
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

public void setRelativeMemoryDriver(double relativeMemorySize) {
  this.config.setDouble(MEMORY_DRIVER, relativeMemorySize);
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

public void setRelativeInputMaterializationMemory(int inputNum, double relativeMemory) {
  this.config.setDouble(INPUT_DAM_MEMORY_PREFIX + inputNum, relativeMemory);
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

public void setRelativeBackChannelMemory(double relativeMemory) {
  if (relativeMemory < 0) {
    throw new IllegalArgumentException();
  }
  this.config.setDouble(ITERATION_HEAD_BACKCHANNEL_MEMORY, relativeMemory);
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

public void setRelativeSolutionSetMemory(double relativeMemory) {
  if (relativeMemory < 0) {
    throw new IllegalArgumentException();
  }
  this.config.setDouble(ITERATION_HEAD_SOLUTION_SET_MEMORY, relativeMemory);
}

代码示例来源:origin: org.apache.flink/flink-runtime

public void setRelativeSolutionSetMemory(double relativeMemory) {
  if (relativeMemory < 0) {
    throw new IllegalArgumentException();
  }
  this.config.setDouble(ITERATION_HEAD_SOLUTION_SET_MEMORY, relativeMemory);
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

public void setRelativeSolutionSetMemory(double relativeMemory) {
  if (relativeMemory < 0) {
    throw new IllegalArgumentException();
  }
  this.config.setDouble(ITERATION_HEAD_SOLUTION_SET_MEMORY, relativeMemory);
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

public void setRelativeSolutionSetMemory(double relativeMemory) {
  if (relativeMemory < 0) {
    throw new IllegalArgumentException();
  }
  this.config.setDouble(ITERATION_HEAD_SOLUTION_SET_MEMORY, relativeMemory);
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.10

public void setRelativeBackChannelMemory(double relativeMemory) {
  if (relativeMemory < 0) {
    throw new IllegalArgumentException();
  }
  this.config.setDouble(ITERATION_HEAD_BACKCHANNEL_MEMORY, relativeMemory);
}

代码示例来源:origin: org.apache.flink/flink-runtime

public void setRelativeBackChannelMemory(double relativeMemory) {
  if (relativeMemory < 0) {
    throw new IllegalArgumentException();
  }
  this.config.setDouble(ITERATION_HEAD_BACKCHANNEL_MEMORY, relativeMemory);
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

public void setRelativeBackChannelMemory(double relativeMemory) {
  if (relativeMemory < 0) {
    throw new IllegalArgumentException();
  }
  this.config.setDouble(ITERATION_HEAD_BACKCHANNEL_MEMORY, relativeMemory);
}

代码示例来源:origin: org.apache.flink/flink-core

@Override
public void setDouble(ConfigOption<Double> key, double value) {
  this.backingConfig.setDouble(prefix + key.key(), value);
}

代码示例来源:origin: com.alibaba.blink/flink-core

@Override
public void setDouble(ConfigOption<Double> key, double value) {
  this.backingConfig.setDouble(prefix + key.key(), value);
}

相关文章