Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Aiden Dai <[email protected]>
  • Loading branch information
daixba committed Jul 17, 2023
1 parent 893cd2e commit 6d472b5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
Expand Down Expand Up @@ -127,7 +128,7 @@ public OpenSearchSink(final PluginSetting pluginSetting,
final AwsCredentialsSupplier awsCredentialsSupplier) {
super(pluginSetting, Integer.MAX_VALUE, INITIALIZE_RETRY_WAIT_TIME_MS);
this.awsCredentialsSupplier = awsCredentialsSupplier;
this.sinkContext = sinkContext;
this.sinkContext = sinkContext != null ? sinkContext : new SinkContext(null, Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
this.expressionEvaluator = expressionEvaluator;
bulkRequestTimer = pluginMetrics.timer(BULKREQUEST_LATENCY);
bulkRequestErrorsCounter = pluginMetrics.counter(BULKREQUEST_ERRORS);
Expand Down Expand Up @@ -339,7 +340,7 @@ private SerializedJson getDocument(final Event event) {

String routing = (routingField != null) ? event.get(routingField, String.class) : null;

final String document = DocumentBuilder.build(event, documentRootKey, Objects.nonNull(sinkContext)?sinkContext.getTagsTargetKey():null);
final String document = DocumentBuilder.build(event, documentRootKey, sinkContext.getTagsTargetKey(), sinkContext.getIncludeKeys(), sinkContext.getExcludeKeys());

return SerializedJson.fromStringAndOptionals(document, docId, routing);
}
Expand Down

0 comments on commit 6d472b5

Please sign in to comment.