adoroszlai commented on code in PR #4851:
URL: https://github.com/apache/ozone/pull/4851#discussion_r1230866062
##########
hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/conf/SimpleConfiguration.java:
##########
@@ -25,43 +25,63 @@
@ConfigGroup(prefix = "test.scm.client")
public class SimpleConfiguration extends SimpleConfigurationParent {
- @Config(key = "address", defaultValue = "localhost", description = "Client "
- + "address (To test string injection).", tags = ConfigTag.MANAGEMENT)
+ @Config(key = "address",
+ defaultValue = "localhost",
+ description = "Client address (To test string injection).",
+ tags = ConfigTag.MANAGEMENT)
private String clientAddress;
- @Config(key = "bind.host", defaultValue = "0.0.0.0", description = "Bind "
- + "host(To test string injection).", tags = ConfigTag.MANAGEMENT)
+ @Config(key = "bind.host",
+ defaultValue = "0.0.0.0",
+ description = "Bind host(To test string injection).",
+ tags = ConfigTag.MANAGEMENT)
private String bindHost;
- @Config(key = "compression.enabled", defaultValue = "true", description =
- "Compression enabled. (Just to test boolean flag)", tags =
- ConfigTag.MANAGEMENT)
+ @Config(key = "compression.enabled",
+ defaultValue = "true",
+ reconfigurable = true,
+ description = "Compression enabled. (Just to test boolean flag)",
+ tags = ConfigTag.MANAGEMENT)
private boolean compressionEnabled;
- @Config(key = "port", defaultValue = "9878", description = "Port number "
- + "config (To test in injection)", tags = ConfigTag.MANAGEMENT)
+ @Config(key = "port",
+ defaultValue = "9878",
+ description = "Port number config (To test int injection)",
+ tags = ConfigTag.MANAGEMENT)
private int port;
- @Config(key = "wait", type = ConfigType.TIME, timeUnit =
- TimeUnit.SECONDS, defaultValue = "30m", description = "Wait time (To "
- + "test TIME config type)", tags = ConfigTag.MANAGEMENT)
+ @Config(key = "wait",
+ type = ConfigType.TIME,
+ timeUnit = TimeUnit.SECONDS,
+ defaultValue = "30m",
+ reconfigurable = true,
+ description = "Wait time (To test TIME config type)",
+ tags = ConfigTag.MANAGEMENT)
private long waitTime;
- @Config(key = "class", type = ConfigType.CLASS,
- defaultValue = "java.lang.Object", description = "",
+ @Config(key = "class",
+ type = ConfigType.CLASS,
+ defaultValue = "java.lang.Object",
+ description = "",
tags = ConfigTag.OZONE)
private Class<?> myClass = Object.class;
- @Config(key = "threshold", type = ConfigType.DOUBLE,
- defaultValue = "10", description = "Threshold (To test DOUBLE config" +
- " type)", tags = ConfigTag.MANAGEMENT)
+ @Config(key = "threshold",
+ type = ConfigType.DOUBLE,
+ defaultValue = "10",
+ description = "Threshold (To test DOUBLE config type)",
+ tags = ConfigTag.MANAGEMENT)
private double threshold;
@PostConstruct
public void validate() {
if (port < 0) {
throw new NumberFormatException("Please use a positive port number");
}
+ if (waitTime < 42) {
Review Comment:
`SimpleConfiguration` is just for unit tests (it's in `src/test/java`),
values here are not applied to Ozone. The number 42 is from [The Hitchhiker's
Guide to the
Galaxy](https://en.wikipedia.org/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]