Skip to content

Commit

Permalink
Remove dependency on AWS S3 SDKv1 (#1628)
Browse files Browse the repository at this point in the history
* #1562: Working toward removing dependency.

Signed-off-by: jzonthemtn <[email protected]>

* #1562: Removing unneeded parts. Changing date processing.

Signed-off-by: jzonthemtn <[email protected]>

* #1562: Adding file header and comment.

Signed-off-by: jzonthemtn <[email protected]>

* #1562: Removing sysout and removing public from class.

Signed-off-by: jzonthemtn <[email protected]>

Signed-off-by: jzonthemtn <[email protected]>
  • Loading branch information
jzonthemtn authored Aug 10, 2022
1 parent f3ff30c commit 7d94832
Show file tree
Hide file tree
Showing 7 changed files with 465 additions and 7 deletions.
4 changes: 3 additions & 1 deletion data-prepper-plugins/s3-source/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ dependencies {
implementation 'software.amazon.awssdk:s3'
implementation 'software.amazon.awssdk:sts'
implementation 'software.amazon.awssdk:sqs'
implementation 'com.amazonaws:aws-java-sdk-s3:1.12.257'
implementation 'com.fasterxml.jackson.core:jackson-core'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3'
implementation 'org.apache.commons:commons-compress:1.21'
implementation 'joda-time:joda-time:2.10.14'
implementation 'org.hibernate.validator:hibernate-validator:7.0.4.Final'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv'
testImplementation 'org.apache.commons:commons-lang3:3.12.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

package com.amazon.dataprepper.plugins.source;

import java.io.IOException;
import java.util.Date;

import software.amazon.awssdk.utils.DateUtils;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

/**
* A Jackson serializer for Joda {@code DateTime}s.
*/
final class DateTimeJsonSerializer extends JsonSerializer<Date> {

@Override
public void serialize(Date value, JsonGenerator jgen, SerializerProvider provider) throws IOException {
jgen.writeString(DateUtils.formatIso8601Date(value.toInstant()));
}

}
Loading

0 comments on commit 7d94832

Please sign in to comment.