mirror of https://github.com/apache/kafka.git
MINOR: Fix the outdated comments of ConfigDef (#13710)
Fix the outdated comments of ConfigDef since the signature of the corresponding method has been updated. Reviewers: Luke Chen <showuon@gmail.com>
This commit is contained in:
parent
6f19730164
commit
c90a08c37e
|
@ -53,9 +53,12 @@ import java.util.stream.Collectors;
|
||||||
* <pre>
|
* <pre>
|
||||||
* ConfigDef defs = new ConfigDef();
|
* ConfigDef defs = new ConfigDef();
|
||||||
*
|
*
|
||||||
* defs.define("config_with_default", Type.STRING, "default string value", "Configuration with default value.");
|
* // check {@link #define(String, Type, Object, Importance, String)} for more details.
|
||||||
* defs.define("config_with_validator", Type.INT, 42, Range.atLeast(0), "Configuration with user provided validator.");
|
* defs.define("config_with_default", Type.STRING, "default string value", Importance.High, "Configuration with default value.");
|
||||||
* defs.define("config_with_dependents", Type.INT, "Configuration with dependents.", "group", 1, "Config With Dependents", Arrays.asList("config_with_default","config_with_validator"));
|
* // check {@link #define(String, Type, Object, Validator, Importance, String)} for more details.
|
||||||
|
* defs.define("config_with_validator", Type.INT, 42, Range.atLeast(0), Importance.High, "Configuration with user provided validator.");
|
||||||
|
* // check {@link #define(String, Type, Importance, String, String, int, Width, String, List<String>)} for more details.
|
||||||
|
* defs.define("config_with_dependents", Type.INT, Importance.LOW, "Configuration with dependents.", "group", 1, Width.SHORT, "Config With Dependents", Arrays.asList("config_with_default","config_with_validator"));
|
||||||
*
|
*
|
||||||
* Map<String, String> props = new HashMap<>();
|
* Map<String, String> props = new HashMap<>();
|
||||||
* props.put("config_with_default", "some value");
|
* props.put("config_with_default", "some value");
|
||||||
|
@ -67,9 +70,9 @@ import java.util.stream.Collectors;
|
||||||
* // will return default value of 42
|
* // will return default value of 42
|
||||||
* int anotherConfig = (Integer) configs.get("config_with_validator");
|
* int anotherConfig = (Integer) configs.get("config_with_validator");
|
||||||
*
|
*
|
||||||
* To validate the full configuration, use:
|
* // To validate the full configuration, use:
|
||||||
* List<Config> configs = defs.validate(props);
|
* List<ConfigValue> configValues = defs.validate(props);
|
||||||
* The {@link Config} contains updated configuration information given the current configuration values.
|
* // The {@link ConfigValue} contains updated configuration information given the current configuration values.
|
||||||
* </pre>
|
* </pre>
|
||||||
* <p/>
|
* <p/>
|
||||||
* This class can be used standalone or in combination with {@link AbstractConfig} which provides some additional
|
* This class can be used standalone or in combination with {@link AbstractConfig} which provides some additional
|
||||||
|
|
Loading…
Reference in New Issue