-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding defaultValue to the @JsonProperty for processors. #5080
Adding defaultValue to the @JsonProperty for processors. #5080
Conversation
Signed-off-by: David Venable <dlv@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the change!
@@ -93,7 +93,7 @@ public class GrokProcessorConfig { | |||
"<code>pattern_directories</code>. Default is <code>*</code>.") | |||
private String patternsFilesGlob = DEFAULT_PATTERNS_FILES_GLOB; | |||
|
|||
@JsonProperty(TIMEOUT_MILLIS) | |||
@JsonProperty(value = TIMEOUT_MILLIS, defaultValue = "30000") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to reuse DEFAULT_TIMEOUT_MILLIS in the defaultValue?
@@ -39,7 +39,7 @@ public class AggregateProcessorConfig { | |||
private PluginModel aggregateAction; | |||
|
|||
@JsonPropertyDescription("The amount of time that a group should exist before it is concluded automatically. Supports ISO_8601 notation strings (\"PT20.345S\", \"PT15M\", etc.) as well as simple notation for seconds (\"60s\") and milliseconds (\"1500ms\"). Default value is 180s.") | |||
@JsonProperty("group_duration") | |||
@JsonProperty(value = "group_duration", defaultValue = DEFAULT_GROUP_DURATION_SECONDS + "s") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need string conversion of DEFAULT_GROUP_DURATION_SECONDS
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value itself is 180s
because it is a duration value.
…project#5080) Signed-off-by: David Venable <dlv@amazon.com>
Description
This updates processors to use
@JsonProperty
'sdefaultValue
to improve documentation.Issues Resolved
N/A
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.