Skip to content

Commit

Permalink
Add afterburner
Browse files Browse the repository at this point in the history
Signed-off-by: Chase Engelbrecht <[email protected]>
  • Loading branch information
engechas committed Mar 20, 2024
1 parent 9df58e2 commit 96e03dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions data-prepper-plugins/s3-source/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies {
implementation 'org.hibernate.validator:hibernate-validator:8.0.1.Final'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
implementation 'com.fasterxml.jackson.module:jackson-module-afterburner'
implementation 'org.xerial.snappy:snappy-java:1.1.10.5'
implementation 'org.apache.parquet:parquet-common:1.13.1'
implementation 'dev.failsafe:failsafe:3.3.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fasterxml.jackson.databind.MappingIterator;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectReader;
import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
import org.opensearch.dataprepper.model.annotations.DataPrepperPlugin;
import org.opensearch.dataprepper.model.annotations.DataPrepperPluginConstructor;
import org.opensearch.dataprepper.model.codec.InputCodec;
Expand All @@ -16,7 +17,8 @@

@DataPrepperPlugin(name = "ocsf", pluginType = InputCodec.class, pluginConfigurationType = OCSFCodecConfig.class)
public class OCSFCodec implements InputCodec {
private static final ObjectReader OBJECT_READER = new ObjectMapper().readerFor(OCSF.class);
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper().registerModule(new AfterburnerModule());
private static final ObjectReader OBJECT_READER = OBJECT_MAPPER.readerFor(OCSF.class);

@DataPrepperPluginConstructor
public OCSFCodec(final OCSFCodecConfig config) {
Expand Down

0 comments on commit 96e03dd

Please sign in to comment.