@Override public float getFloat(String key, float defaultValue) { return this.backingConfig.getFloat(this.prefix + key, defaultValue); }
@Override public float getFloat(ConfigOption<Float> configOption, float overrideDefault) { return this.backingConfig.getFloat(configOption, overrideDefault); }
@Override public float getFloat(ConfigOption<Float> configOption) { return this.backingConfig.getFloat(prefixOption(configOption, prefix)); }
public JobGraphGenerator(Configuration config) { this.defaultMaxFan = config.getInteger(AlgorithmOptions.SPILLING_MAX_FAN); this.defaultSortSpillingThreshold = config.getFloat(AlgorithmOptions.SORT_SPILLING_THRESHOLD); this.useLargeRecordHandler = config.getBoolean( ConfigConstants.USE_LARGE_RECORD_HANDLER_KEY, ConfigConstants.DEFAULT_USE_LARGE_RECORD_HANDLER); }
/** * See documentation. */ public static int calculateHeapSize(int memory, org.apache.flink.configuration.Configuration conf) { float memoryCutoffRatio = conf.getFloat(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_RATIO); int minCutoff = conf.getInteger(ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_MIN); if (memoryCutoffRatio > 1 || memoryCutoffRatio < 0) { throw new IllegalArgumentException("The configuration value '" + ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_RATIO.key() + "' must be between 0 and 1. Value given=" + memoryCutoffRatio); } if (minCutoff > memory) { throw new IllegalArgumentException("The configuration value '" + ResourceManagerOptions.CONTAINERIZED_HEAP_CUTOFF_MIN.key() + "' is higher (" + minCutoff + ") than the requested amount of memory " + memory); } int heapLimit = (int) ((float) memory * memoryCutoffRatio); if (heapLimit < minCutoff) { heapLimit = minCutoff; } return memory - heapLimit; }
assertEquals(100, copy.getInteger("mynumber", 0)); 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));
assertEquals(5f, pc.getFloat("int", 0), 0.0); assertEquals(5.0, pc.getDouble("int", 0), 0.0); assertEquals(false, pc.getBoolean("int", true)); assertEquals(15f, pc.getFloat("long", 0), 0.0); assertEquals(15.0, pc.getDouble("long", 0), 0.0); assertEquals(false, pc.getBoolean("long", true)); 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(2.1456775f, pc.getFloat("float", 0), 0.0); assertEquals(2.1456775, pc.getDouble("float", 0), 0.0000001); assertEquals(false, pc.getBoolean("float", true)); assertEquals(3.141592f, pc.getFloat("double", 0), 0.000001); assertEquals(Math.PI, pc.getDouble("double", 0), 0.0); assertEquals(false, pc.getBoolean("double", true)); assertEquals(-1f, pc.getFloat("negative_double", 0), 0.000001); assertEquals(-1, pc.getDouble("negative_double", 0), 0.0); assertEquals(false, pc.getBoolean("negative_double", true)); assertEquals(0f, pc.getFloat("zero", -1), 0.000001); assertEquals(0.0, pc.getDouble("zero", -1), 0.0); assertEquals(false, pc.getBoolean("zero", true)); assertEquals(0f, pc.getFloat("too_long_double", 0f), 0.000001);
@Override public float getFloat(ConfigOption<Float> configOption, float overrideDefault) { return this.backingConfig.getFloat(configOption, overrideDefault); }
@Override public float getFloat(String key, float defaultValue) { return this.backingConfig.getFloat(this.prefix + key, defaultValue); }
public float getSpillingThresholdDriver() { return this.config.getFloat(SORT_SPILLING_THRESHOLD_DRIVER, 0.7f); }
public float getSpillingThresholdDriver() { return this.config.getFloat(SORT_SPILLING_THRESHOLD_DRIVER, 0.7f); }
public float getSpillingThresholdDriver() { return this.config.getFloat(SORT_SPILLING_THRESHOLD_DRIVER, 0.7f); }
public float getSpillingThresholdInput(int inputNum) { return this.config.getFloat(SORT_SPILLING_THRESHOLD_INPUT_PREFIX + inputNum, 0.7f); }
@Override public float getFloat(String key, float defaultValue) { return this.backingConfig.getFloat(this.prefix + key, defaultValue); }
@Override public float getFloat(ConfigOption<Float> configOption) { return this.backingConfig.getFloat(prefixOption(configOption, prefix)); }
@Override public float getFloat(ConfigOption<Float> configOption) { return this.backingConfig.getFloat(prefixOption(configOption, prefix)); }
public JobGraphGenerator(Configuration config) { this.defaultMaxFan = config.getInteger(AlgorithmOptions.SPILLING_MAX_FAN); this.defaultSortSpillingThreshold = config.getFloat(AlgorithmOptions.SORT_SPILLING_THRESHOLD); this.useLargeRecordHandler = config.getBoolean( ConfigConstants.USE_LARGE_RECORD_HANDLER_KEY, ConfigConstants.DEFAULT_USE_LARGE_RECORD_HANDLER); }
public JobGraphGenerator(Configuration config) { this.defaultMaxFan = config.getInteger(AlgorithmOptions.SPILLING_MAX_FAN); this.defaultSortSpillingThreshold = config.getFloat(AlgorithmOptions.SORT_SPILLING_THRESHOLD); this.useLargeRecordHandler = config.getBoolean( ConfigConstants.USE_LARGE_RECORD_HANDLER_KEY, ConfigConstants.DEFAULT_USE_LARGE_RECORD_HANDLER); }
public JobGraphGenerator(Configuration config) { this.defaultMaxFan = config.getInteger(AlgorithmOptions.SPILLING_MAX_FAN); this.defaultSortSpillingThreshold = config.getFloat(AlgorithmOptions.SORT_SPILLING_THRESHOLD); this.useLargeRecordHandler = config.getBoolean( ConfigConstants.USE_LARGE_RECORD_HANDLER_KEY, ConfigConstants.DEFAULT_USE_LARGE_RECORD_HANDLER); }
public JobGraphGenerator(Configuration config) { this.defaultMaxFan = config.getInteger(ConfigConstants.DEFAULT_SPILLING_MAX_FAN_KEY, ConfigConstants.DEFAULT_SPILLING_MAX_FAN); this.defaultSortSpillingThreshold = config.getFloat(ConfigConstants.DEFAULT_SORT_SPILLING_THRESHOLD_KEY, ConfigConstants.DEFAULT_SORT_SPILLING_THRESHOLD); this.useLargeRecordHandler = config.getBoolean( ConfigConstants.USE_LARGE_RECORD_HANDLER_KEY, ConfigConstants.DEFAULT_USE_LARGE_RECORD_HANDLER); }