You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2023/06/08 07:12:03 UTC
[GitHub] [ozone] adoroszlai opened a new pull request, #4851: HDDS-8760. Let reconfiguration handler update reconfigurable config objects
adoroszlai opened a new pull request, #4851:
URL: https://github.com/apache/ozone/pull/4851
## What changes were proposed in this pull request?
HDDS-8668 implemented reconfigurable config objects. HDDS-8702 created a dedicated reconfiguration handler, which handles individual reconfigurable properties so far. This change allows registering config objects with the reconfiguration handler.
https://issues.apache.org/jira/browse/HDDS-8760
## How was this patch tested?
Added unit test.
https://github.com/adoroszlai/hadoop-ozone/actions/runs/5207687698
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on pull request #4851: HDDS-8760. Let reconfiguration handler update reconfigurable config objects
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #4851:
URL: https://github.com/apache/ozone/pull/4851#issuecomment-1593382773
Thanks @captainzmc for the review.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] captainzmc commented on a diff in pull request #4851: HDDS-8760. Let reconfiguration handler update reconfigurable config objects
Posted by "captainzmc (via GitHub)" <gi...@apache.org>.
captainzmc commented on code in PR #4851:
URL: https://github.com/apache/ozone/pull/4851#discussion_r1230848900
##########
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:
The 42 seconds here feel sudden. Usually our wait or timeout time is a multiple of 30s, such as 30s, 60s, 300s, 5min. Is there a specific reason for this number?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on a diff in pull request #4851: HDDS-8760. Let reconfiguration handler update reconfigurable config objects
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on pull request #4851: HDDS-8760. Let reconfiguration handler update reconfigurable config objects
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #4851:
URL: https://github.com/apache/ozone/pull/4851#issuecomment-1582153800
@whbing @xichen01 please take a look
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai merged pull request #4851: HDDS-8760. Let reconfiguration handler update reconfigurable config objects
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #4851:
URL: https://github.com/apache/ozone/pull/4851
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org