You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Robert Joseph Evans (JIRA)" <ji...@apache.org> on 2015/10/02 15:44:26 UTC
[jira] [Commented] (STORM-1084) Improve Storm config validation
process to use java annotations instead of *_SCHEMA format
[ https://issues.apache.org/jira/browse/STORM-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941145#comment-14941145 ]
Robert Joseph Evans commented on STORM-1084:
--------------------------------------------
I really like the idea of using annotations for the validation over having a special Object that holds all of the logic. I just want to be sure that we also have a way to validate complex types too.
> Improve Storm config validation process to use java annotations instead of *_SCHEMA format
> ------------------------------------------------------------------------------------------
>
> Key: STORM-1084
> URL: https://issues.apache.org/jira/browse/STORM-1084
> Project: Apache Storm
> Issue Type: Improvement
> Reporter: Boyang Jerry Peng
> Assignee: Boyang Jerry Peng
>
> So currently we specify validators:
> public static final String STORM_MESSAGING_NETTY_MIN_SLEEP_MS = "storm.messaging.netty.min_wait_ms";
> public static final Object STORM_MESSAGING_NETTY_MIN_SLEEP_MS_SCHEMA = ConfigValidation.IntegerValidator;
> A better way to do this is using annotations. Something like:
> @IntegerValidator
> public static final String STORM_MESSAGING_NETTY_MIN_SLEEP_MS = "storm.messaging.netty.min_wait_ms";
> Do this has many advantages. For one you can stack multiple annotations:
> @IntegerValidator
> @NotNull
> public static final String STORM_MESSAGING_NETTY_MIN_SLEEP_MS = "storm.messaging.netty.min_wait_ms";
> And we don't have to write another validator for strings that cannot be null
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)