Skip to content

Commit

Permalink
Schema edits and enhancements (opensearch-project#5062)
Browse files Browse the repository at this point in the history
* schema changes according to team review

Signed-off-by: Katherine Shen <[email protected]>
  • Loading branch information
shenkw1 authored Oct 15, 2024
1 parent f5dc8d6 commit c4a2e72
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class AggregateProcessorConfig {
@JsonProperty("group_duration")
private Duration groupDuration = Duration.ofSeconds(DEFAULT_GROUP_DURATION_SECONDS);

@JsonPropertyDescription("When <code>local_mode<code> is set to true, the aggregation is performed locally on each node instead of forwarding events to a specific node based on the <code>identification_keys</code> using a hash function. Default is false.")
@JsonPropertyDescription("When <code>local_mode</code> is set to true, the aggregation is performed locally on each node instead of forwarding events to a specific node based on the <code>identification_keys</code> using a hash function. Default is false.")
@JsonProperty("local_mode")
@NotNull
private Boolean localMode = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.validation.constraints.AssertTrue;
import jakarta.validation.constraints.NotBlank;

import java.util.List;

Expand All @@ -27,6 +28,7 @@ public class CsvProcessorConfig {

@JsonProperty("source")
@JsonPropertyDescription("The field in the event that will be parsed. Default value is <code>message</code>.")
@NotBlank
private String source = DEFAULT_SOURCE;

@JsonProperty("delimiter")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class GrokProcessorConfig {
@JsonPropertyDescription("Specifies a parent-level key used to store all captures. Default value is <code>null</code> which will write captures into the root of the event.")
private String targetKey = DEFAULT_TARGET_KEY;

@JsonProperty(BREAK_ON_MATCH)
@JsonProperty(value = BREAK_ON_MATCH, defaultValue = "true")
@JsonPropertyDescription("Specifies whether to match all patterns (<code>false</code>) or stop once the first successful " +
"match is found (<code>true</code>). Default is <code>true</code>.")
private boolean breakOnMatch = DEFAULT_BREAK_ON_MATCH;
Expand All @@ -70,7 +70,7 @@ public class GrokProcessorConfig {
@JsonPropertyDescription("Enables the preservation of <code>null</code> captures from the processed output. Default is <code>false</code>.")
private boolean keepEmptyCaptures = DEFAULT_KEEP_EMPTY_CAPTURES;

@JsonProperty(NAMED_CAPTURES_ONLY)
@JsonProperty(value = NAMED_CAPTURES_ONLY, defaultValue = "true")
@JsonPropertyDescription("Specifies whether to keep only named captures. Default is <code>true</code>.")
private boolean namedCapturesOnly = DEFAULT_NAMED_CAPTURES_ONLY;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public class KeyValueProcessorConfig {
"<code>whitespace</code> will always be <code>\"strict\"</code>.")
private boolean recursive = false;

@JsonProperty("overwrite_if_destination_exists")
@JsonProperty(value = "overwrite_if_destination_exists", defaultValue = "true")
@JsonPropertyDescription("Specifies whether to overwrite existing fields if there are key conflicts " +
"when writing parsed fields to the event. Default is <code>true</code>.")
private boolean overwriteIfDestinationExists = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static class Entry {

@JsonPropertyDescription("The regular expression to match on for replacement. Special regex characters such as <code>[</code> and <code>]</code> must " +
"be escaped using <code>\\\\</code> when using double quotes and <code>\\</code> when using single quotes. " +
"See <a href=\"https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html\">Java Patterns</a>" +
"See <a href=\"https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html\">Java Patterns</a> " +
"for more information.")
private String from;

Expand All @@ -34,7 +34,7 @@ public static class Entry {

@JsonProperty("substitute_when")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, " +
"such as <code>/some-key == \"test\"'</code>, that will be evaluated to determine whether the processor will be " +
"such as <code>/some-key == \"test\"</code>, that will be evaluated to determine whether the processor will be " +
"run on the event. By default, all events will be processed unless otherwise stated.")
private String substituteWhen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static class Entry {
private Boolean recurse = false;

@JsonProperty("truncate_when")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a> such as <code>'/test != false'</code>. " +
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a> such as <code>/test != false</code>. " +
"If specified, the <code>truncate</code> processor will only run on events when the expression evaluates to true. ")
private String truncateWhen;

Expand Down

0 comments on commit c4a2e72

Please sign in to comment.