GGraziadei commented on code in PR #8586:
URL: https://github.com/apache/storm/pull/8586#discussion_r3209524840
##########
storm-client/src/jvm/org/apache/storm/validation/ConfigValidation.java:
##########
@@ -849,6 +849,23 @@ public void validateField(String name, Object o) {
}
}
+ public static class EwmaSmoothingFactorValidator extends Validator {
+ @Override
+ public void validateField(String name, Object o) {
+ if (o == null) {
+ return;
+ }
+ if (o instanceof Number) {
+ double alpha = ((Number) o).doubleValue();
+ if (alpha > 0.0 && alpha < 1.0) {
+ return;
+ }
+ }
+ throw new IllegalArgumentException(
+ "Field " + name + " must be a number in the open interval
(0, 1), got: " + o);
Review Comment:
Thank you, fixed and added a new test case.
--
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]