@PublicEvolving public class ConfigOptions extends Object
ConfigOptions
are used to build a ConfigOption
.
The option is typically built in one of the following pattern:
// simple string-valued option with a default value
ConfigOption<String> tempDirs = ConfigOptions
.key("tmp.dir")
.defaultValue("/tmp");
// simple integer-valued option with a default value
ConfigOption<Integer> parallelism = ConfigOptions
.key("application.parallelism")
.defaultValue(100);
// option with no default value
ConfigOption<String> userName = ConfigOptions
.key("user.name")
.noDefaultValue();
// option with deprecated keys to check
ConfigOption<Double> threshold = ConfigOptions
.key("cpu.utilization.threshold")
.defaultValue(0.9).
.withDeprecatedKeys("cpu.threshold");
Modifier and Type | Class and Description |
---|---|
static class |
ConfigOptions.OptionBuilder
The option builder is used to create a
ConfigOption . |
public static ConfigOptions.OptionBuilder key(String key)
ConfigOption
.key
- The key for the config option.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.