From 44cd2d7689358a16cf18584dffef75c5fe1fb412 Mon Sep 17 00:00:00 2001 From: David Venable Date: Thu, 14 Sep 2023 12:56:14 -0500 Subject: [PATCH] Moved the S3 source package to include s3 in the package name. Signed-off-by: David Venable --- .../source/{ => s3}/CsvRecordsGenerator.java | 4 +- .../source/{ => s3}/JsonRecordsGenerator.java | 8 ++-- .../NewlineDelimitedRecordsGenerator.java | 2 +- .../{ => s3}/ParquetRecordsGenerator.java | 2 +- .../source/{ => s3}/RecordsGenerator.java | 2 +- .../source/{ => s3}/S3ObjectGenerator.java | 2 +- .../source/{ => s3}/S3ObjectWorkerIT.java | 16 ++++---- .../source/{ => s3}/S3ScanObjectWorkerIT.java | 22 +++++------ .../{ => s3}/S3SelectObjectWorkerIT.java | 24 ++++++------ .../plugins/source/{ => s3}/SqsWorkerIT.java | 38 +++++++++---------- .../{ => s3}/AwsAuthenticationAdapter.java | 4 +- .../{ => s3}/DateTimeJsonSerializer.java | 11 +++--- .../{ => s3}/EventMetadataModifier.java | 2 +- .../{ => s3}/S3ClientBuilderFactory.java | 2 +- .../{ => s3}/S3EventBridgeNotification.java | 2 +- .../source/{ => s3}/S3EventNotification.java | 2 +- .../plugins/source/{ => s3}/S3InputFile.java | 4 +- .../source/{ => s3}/S3InputStream.java | 4 +- .../source/{ => s3}/S3ObjectDeleteWorker.java | 2 +- .../source/{ => s3}/S3ObjectDetails.java | 2 +- .../source/{ => s3}/S3ObjectHandler.java | 2 +- .../{ => s3}/S3ObjectPluginMetrics.java | 2 +- .../source/{ => s3}/S3ObjectReference.java | 2 +- .../source/{ => s3}/S3ObjectRequest.java | 12 +++--- .../source/{ => s3}/S3ObjectWorker.java | 4 +- .../S3ScanPartitionCreationSupplier.java | 8 ++-- .../source/{ => s3}/S3ScanService.java | 6 +-- .../source/{ => s3}/S3SelectObjectWorker.java | 10 ++--- .../{ => s3}/S3SelectResponseHandler.java | 8 ++-- .../S3SelectResponseHandlerFactory.java | 2 +- .../plugins/source/{ => s3}/S3Service.java | 3 +- .../plugins/source/{ => s3}/S3Source.java | 14 +++---- .../source/{ => s3}/S3SourceConfig.java | 22 +++++------ .../{ => s3}/S3SourceProgressState.java | 2 +- .../source/{ => s3}/ScanObjectWorker.java | 8 ++-- .../plugins/source/{ => s3}/ScanOptions.java | 4 +- .../plugins/source/{ => s3}/SqsQueueUrl.java | 2 +- .../plugins/source/{ => s3}/SqsService.java | 4 +- .../plugins/source/{ => s3}/SqsWorker.java | 24 ++++++------ .../plugins/source/{ => s3}/StsArnRole.java | 2 +- .../AwsAuthenticationOptions.java | 2 +- .../NotificationSourceOption.java | 2 +- .../configuration/NotificationTypeOption.java | 2 +- .../{ => s3}/configuration/OnErrorOption.java | 2 +- .../configuration/S3ScanBucketOption.java | 2 +- .../configuration/S3ScanBucketOptions.java | 2 +- .../configuration/S3ScanKeyPathOption.java | 2 +- .../configuration/S3ScanScanOptions.java | 2 +- .../S3ScanSchedulingOptions.java | 2 +- .../configuration/S3SelectCSVOption.java | 2 +- .../configuration/S3SelectJsonOption.java | 2 +- .../configuration/S3SelectOptions.java | 2 +- .../S3SelectSerializationFormatOption.java | 6 +-- .../{ => s3}/configuration/SqsOptions.java | 2 +- .../S3RetriesExhaustedException.java | 2 +- .../SqsRetriesExhaustedException.java | 2 +- .../EventBridgeObjectCreatedFilter.java | 7 ++-- .../source/{ => s3}/filter/S3EventFilter.java | 4 +- .../filter/S3ObjectCreatedFilter.java | 4 +- .../ownership/BucketOwnerProvider.java | 2 +- .../ConfigBucketOwnerProviderFactory.java | 8 ++-- .../ownership/MappedBucketOwnerProvider.java | 2 +- .../NoOwnershipBucketOwnerProvider.java | 2 +- .../ownership/StaticBucketOwnerProvider.java | 2 +- .../source/{ => s3}/parser/ParsedMessage.java | 6 +-- .../S3EventBridgeNotificationParser.java | 4 +- .../parser/S3EventNotificationParser.java | 4 +- .../{ => s3}/parser/S3NotificationParser.java | 2 +- .../AwsAuthenticationAdapterTest.java | 4 +- .../{ => s3}/EventMetadataModifierTest.java | 4 +- .../source/{ => s3}/S3InputFileTest.java | 4 +- .../source/{ => s3}/S3InputStreamTest.java | 4 +- .../{ => s3}/S3ObjectDeleteWorkerTest.java | 8 ++-- .../{ => s3}/S3ObjectPluginMetricsTest.java | 2 +- .../{ => s3}/S3ObjectReferenceTest.java | 2 +- .../source/{ => s3}/S3ObjectRequestTest.java | 12 +++--- .../source/{ => s3}/S3ObjectWorkerTest.java | 6 +-- .../{ => s3}/S3ScanObjectWorkerTest.java | 10 ++--- .../S3ScanPartitionCreationSupplierTest.java | 14 +++---- .../source/{ => s3}/S3ScanServiceTest.java | 12 +++--- .../{ => s3}/S3SelectObjectWorkerTest.java | 20 +++++----- .../{ => s3}/S3SelectResponseHandlerTest.java | 2 +- .../source/{ => s3}/S3SourceConfigTest.java | 18 ++++----- .../plugins/source/{ => s3}/S3SourceTest.java | 4 +- .../source/{ => s3}/ScanOptionsTest.java | 4 +- .../source/{ => s3}/SqsQueueUrlTest.java | 2 +- .../source/{ => s3}/SqsWorkerTest.java | 26 ++++++------- .../source/{ => s3}/StsArnRoleTest.java | 2 +- .../AwsAuthenticationOptionsTest.java | 2 +- .../NotificationSourceOptionTest.java | 2 +- .../NotificationTypeOptionTest.java | 2 +- .../configuration/OnErrorOptionTest.java | 2 +- .../configuration/S3ScanBucketOptionTest.java | 2 +- .../S3ScanBucketOptionsTest.java | 2 +- .../configuration/S3ScanScanOptionsTest.java | 2 +- .../S3ScanSchedulingOptionsTest.java | 2 +- .../configuration/S3SelectCSVOptionTest.java | 4 +- .../configuration/S3SelectJsonOptionTest.java | 5 ++- .../configuration/S3SelectOptionsTest.java | 2 +- .../EventBridgeObjectCreatedFilterTest.java | 6 +-- .../filter/S3ObjectCreatedFilterTest.java | 5 +-- .../ConfigBucketOwnerProviderFactoryTest.java | 8 ++-- .../MappedBucketOwnerProviderTest.java | 2 +- .../NoOwnershipBucketOwnerProviderTest.java | 2 +- .../StaticBucketOwnerProviderTest.java | 2 +- .../{ => s3}/parser/ParsedMessageTest.java | 6 +-- .../S3EventBridgeNotificationParserTest.java | 2 +- .../parser/S3EventNotificationParserTest.java | 2 +- 108 files changed, 301 insertions(+), 300 deletions(-) rename data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/{ => s3}/CsvRecordsGenerator.java (98%) rename data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/{ => s3}/JsonRecordsGenerator.java (98%) rename data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/{ => s3}/NewlineDelimitedRecordsGenerator.java (97%) rename data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ParquetRecordsGenerator.java (98%) rename data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/{ => s3}/RecordsGenerator.java (90%) rename data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectGenerator.java (97%) rename data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectWorkerIT.java (98%) rename data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ScanObjectWorkerIT.java (95%) rename data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3SelectObjectWorkerIT.java (96%) rename data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/{ => s3}/SqsWorkerIT.java (98%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/AwsAuthenticationAdapter.java (90%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/DateTimeJsonSerializer.java (92%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/EventMetadataModifier.java (95%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ClientBuilderFactory.java (98%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3EventBridgeNotification.java (99%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3EventNotification.java (99%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3InputFile.java (95%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3InputStream.java (99%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectDeleteWorker.java (97%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectDetails.java (94%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectHandler.java (94%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectPluginMetrics.java (98%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectReference.java (96%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectRequest.java (95%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectWorker.java (98%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ScanPartitionCreationSupplier.java (97%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ScanService.java (94%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3SelectObjectWorker.java (97%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3SelectResponseHandler.java (96%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3SelectResponseHandlerFactory.java (82%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3Service.java (91%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3Source.java (93%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3SourceConfig.java (86%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3SourceProgressState.java (81%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ScanObjectWorker.java (97%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ScanOptions.java (97%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/SqsQueueUrl.java (95%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/SqsService.java (98%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/SqsWorker.java (94%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/StsArnRole.java (94%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/AwsAuthenticationOptions.java (97%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/NotificationSourceOption.java (92%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/NotificationTypeOption.java (92%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/OnErrorOption.java (92%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3ScanBucketOption.java (97%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3ScanBucketOptions.java (86%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3ScanKeyPathOption.java (90%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3ScanScanOptions.java (97%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3ScanSchedulingOptions.java (92%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3SelectCSVOption.java (90%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3SelectJsonOption.java (83%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3SelectOptions.java (95%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3SelectSerializationFormatOption.java (92%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/SqsOptions.java (96%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/exception/S3RetriesExhaustedException.java (73%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/exception/SqsRetriesExhaustedException.java (80%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/filter/EventBridgeObjectCreatedFilter.java (72%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/filter/S3EventFilter.java (81%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/filter/S3ObjectCreatedFilter.java (76%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ownership/BucketOwnerProvider.java (88%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ownership/ConfigBucketOwnerProviderFactory.java (89%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ownership/MappedBucketOwnerProvider.java (94%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ownership/NoOwnershipBucketOwnerProvider.java (87%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ownership/StaticBucketOwnerProvider.java (90%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/parser/ParsedMessage.java (91%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/parser/S3EventBridgeNotificationParser.java (88%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/parser/S3EventNotificationParser.java (94%) rename data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/{ => s3}/parser/S3NotificationParser.java (90%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/AwsAuthenticationAdapterTest.java (96%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/EventMetadataModifierTest.java (98%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3InputFileTest.java (96%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3InputStreamTest.java (99%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectDeleteWorkerTest.java (93%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectPluginMetricsTest.java (97%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectReferenceTest.java (97%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectRequestTest.java (91%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ObjectWorkerTest.java (99%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ScanObjectWorkerTest.java (96%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ScanPartitionCreationSupplierTest.java (96%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3ScanServiceTest.java (94%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3SelectObjectWorkerTest.java (96%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3SelectResponseHandlerTest.java (99%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3SourceConfigTest.java (85%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/S3SourceTest.java (97%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ScanOptionsTest.java (98%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/SqsQueueUrlTest.java (98%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/SqsWorkerTest.java (96%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/StsArnRoleTest.java (97%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/AwsAuthenticationOptionsTest.java (97%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/NotificationSourceOptionTest.java (87%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/NotificationTypeOptionTest.java (88%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/OnErrorOptionTest.java (88%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3ScanBucketOptionTest.java (97%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3ScanBucketOptionsTest.java (96%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3ScanScanOptionsTest.java (97%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3ScanSchedulingOptionsTest.java (94%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3SelectCSVOptionTest.java (95%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3SelectJsonOptionTest.java (95%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/configuration/S3SelectOptionsTest.java (96%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/filter/EventBridgeObjectCreatedFilterTest.java (92%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/filter/S3ObjectCreatedFilterTest.java (92%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ownership/ConfigBucketOwnerProviderFactoryTest.java (96%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ownership/MappedBucketOwnerProviderTest.java (98%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ownership/NoOwnershipBucketOwnerProviderTest.java (92%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/ownership/StaticBucketOwnerProviderTest.java (95%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/parser/ParsedMessageTest.java (95%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/parser/S3EventBridgeNotificationParserTest.java (98%) rename data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/{ => s3}/parser/S3EventNotificationParserTest.java (98%) diff --git a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/CsvRecordsGenerator.java b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/CsvRecordsGenerator.java similarity index 98% rename from data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/CsvRecordsGenerator.java rename to data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/CsvRecordsGenerator.java index 2d4b62847e..f3861ab381 100644 --- a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/CsvRecordsGenerator.java +++ b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/CsvRecordsGenerator.java @@ -3,12 +3,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.model.codec.InputCodec; import org.opensearch.dataprepper.model.event.Event; -import org.opensearch.dataprepper.plugins.codec.csv.CsvInputCodecConfig; import org.opensearch.dataprepper.plugins.codec.csv.CsvInputCodec; +import org.opensearch.dataprepper.plugins.codec.csv.CsvInputCodecConfig; import java.io.File; import java.io.IOException; diff --git a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/JsonRecordsGenerator.java b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/JsonRecordsGenerator.java similarity index 98% rename from data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/JsonRecordsGenerator.java rename to data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/JsonRecordsGenerator.java index bc31f4aa6b..1031e7de56 100644 --- a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/JsonRecordsGenerator.java +++ b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/JsonRecordsGenerator.java @@ -3,14 +3,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; -import org.opensearch.dataprepper.model.codec.InputCodec; -import org.opensearch.dataprepper.model.event.Event; -import org.opensearch.dataprepper.plugins.codec.json.JsonInputCodec; import com.fasterxml.jackson.core.JsonEncoding; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonGenerator; +import org.opensearch.dataprepper.model.codec.InputCodec; +import org.opensearch.dataprepper.model.event.Event; +import org.opensearch.dataprepper.plugins.codec.json.JsonInputCodec; import java.io.File; import java.io.IOException; diff --git a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/NewlineDelimitedRecordsGenerator.java b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/NewlineDelimitedRecordsGenerator.java similarity index 97% rename from data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/NewlineDelimitedRecordsGenerator.java rename to data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/NewlineDelimitedRecordsGenerator.java index 28dedee987..76d9e72308 100644 --- a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/NewlineDelimitedRecordsGenerator.java +++ b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/NewlineDelimitedRecordsGenerator.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.model.codec.InputCodec; import org.opensearch.dataprepper.model.event.Event; diff --git a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/ParquetRecordsGenerator.java b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/ParquetRecordsGenerator.java similarity index 98% rename from data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/ParquetRecordsGenerator.java rename to data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/ParquetRecordsGenerator.java index 3cc5bb7860..d1d01f589f 100644 --- a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/ParquetRecordsGenerator.java +++ b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/ParquetRecordsGenerator.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.apache.avro.Schema; import org.apache.avro.generic.GenericData; diff --git a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/RecordsGenerator.java b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/RecordsGenerator.java similarity index 90% rename from data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/RecordsGenerator.java rename to data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/RecordsGenerator.java index 593947ef3f..683d792938 100644 --- a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/RecordsGenerator.java +++ b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/RecordsGenerator.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.model.codec.InputCodec; import org.opensearch.dataprepper.model.event.Event; diff --git a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3ObjectGenerator.java b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectGenerator.java similarity index 97% rename from data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3ObjectGenerator.java rename to data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectGenerator.java index 88241a3ae2..7bac52e25a 100644 --- a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3ObjectGenerator.java +++ b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectGenerator.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.s3.model.PutObjectRequest; diff --git a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3ObjectWorkerIT.java b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectWorkerIT.java similarity index 98% rename from data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3ObjectWorkerIT.java rename to data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectWorkerIT.java index 0a55ab9a7d..f0246eab48 100644 --- a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3ObjectWorkerIT.java +++ b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectWorkerIT.java @@ -3,16 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; -import io.micrometer.core.instrument.DistributionSummary; -import org.opensearch.dataprepper.model.buffer.Buffer; -import org.opensearch.dataprepper.model.codec.InputCodec; -import org.opensearch.dataprepper.model.event.Event; -import org.opensearch.dataprepper.model.record.Record; -import org.opensearch.dataprepper.plugins.codec.CompressionOption; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; import io.micrometer.core.instrument.Counter; +import io.micrometer.core.instrument.DistributionSummary; import io.micrometer.core.instrument.Meter; import io.micrometer.core.instrument.Tags; import io.micrometer.core.instrument.Timer; @@ -23,6 +17,12 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.ArgumentsProvider; import org.junit.jupiter.params.provider.ArgumentsSource; +import org.opensearch.dataprepper.model.buffer.Buffer; +import org.opensearch.dataprepper.model.codec.InputCodec; +import org.opensearch.dataprepper.model.event.Event; +import org.opensearch.dataprepper.model.record.Record; +import org.opensearch.dataprepper.plugins.codec.CompressionOption; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.s3.S3Client; diff --git a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3ScanObjectWorkerIT.java b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanObjectWorkerIT.java similarity index 95% rename from data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3ScanObjectWorkerIT.java rename to data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanObjectWorkerIT.java index 9703943111..49f5c687b6 100644 --- a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3ScanObjectWorkerIT.java +++ b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanObjectWorkerIT.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -33,13 +33,13 @@ import org.opensearch.dataprepper.model.source.coordinator.SourceCoordinator; import org.opensearch.dataprepper.parser.model.SourceCoordinationConfig; import org.opensearch.dataprepper.plugins.codec.CompressionOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanBucketOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanScanOptions; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanSchedulingOptions; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectCSVOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectJsonOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectSerializationFormatOption; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanBucketOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanScanOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanSchedulingOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectCSVOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectJsonOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectSerializationFormatOption; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import org.opensearch.dataprepper.plugins.sourcecoordinator.inmemory.InMemorySourceCoordinationStore; import org.opensearch.dataprepper.sourcecoordination.LeaseBasedSourceCoordinator; import org.opensearch.dataprepper.sourcecoordination.PartitionManager; @@ -78,9 +78,9 @@ import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; -import static org.opensearch.dataprepper.plugins.source.S3ObjectDeleteWorker.S3_OBJECTS_DELETED_METRIC_NAME; -import static org.opensearch.dataprepper.plugins.source.S3ObjectDeleteWorker.S3_OBJECTS_DELETE_FAILED_METRIC_NAME; -import static org.opensearch.dataprepper.plugins.source.ScanObjectWorker.ACKNOWLEDGEMENT_SET_CALLBACK_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.S3ObjectDeleteWorker.S3_OBJECTS_DELETED_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.S3ObjectDeleteWorker.S3_OBJECTS_DELETE_FAILED_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.ScanObjectWorker.ACKNOWLEDGEMENT_SET_CALLBACK_METRIC_NAME; @ExtendWith(MockitoExtension.class) public class S3ScanObjectWorkerIT { diff --git a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3SelectObjectWorkerIT.java b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectObjectWorkerIT.java similarity index 96% rename from data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3SelectObjectWorkerIT.java rename to data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectObjectWorkerIT.java index a2db276b9b..2f8ea23c30 100644 --- a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/S3SelectObjectWorkerIT.java +++ b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectObjectWorkerIT.java @@ -3,28 +3,28 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; -import io.micrometer.core.instrument.DistributionSummary; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ArgumentsSource; -import org.junit.jupiter.params.provider.CsvSource; -import org.opensearch.dataprepper.model.buffer.Buffer; -import org.opensearch.dataprepper.model.event.Event; -import org.opensearch.dataprepper.model.record.Record; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectCSVOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectJsonOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectSerializationFormatOption; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; import io.micrometer.core.instrument.Counter; +import io.micrometer.core.instrument.DistributionSummary; import io.micrometer.core.instrument.Meter; import io.micrometer.core.instrument.Tags; import io.micrometer.core.instrument.Timer; import io.micrometer.core.instrument.noop.NoopTimer; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.extension.ExtensionContext; +import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.ArgumentsProvider; +import org.junit.jupiter.params.provider.ArgumentsSource; +import org.junit.jupiter.params.provider.CsvSource; +import org.opensearch.dataprepper.model.buffer.Buffer; +import org.opensearch.dataprepper.model.event.Event; +import org.opensearch.dataprepper.model.record.Record; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectCSVOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectJsonOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectSerializationFormatOption; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.s3.S3AsyncClient; import software.amazon.awssdk.services.s3.S3Client; diff --git a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/SqsWorkerIT.java b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/SqsWorkerIT.java similarity index 98% rename from data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/SqsWorkerIT.java rename to data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/SqsWorkerIT.java index 23c365ec45..474929f71e 100644 --- a/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/SqsWorkerIT.java +++ b/data-prepper-plugins/s3-source/src/integrationTest/java/org/opensearch/dataprepper/plugins/source/s3/SqsWorkerIT.java @@ -3,28 +3,31 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.linecorp.armeria.client.retry.Backoff; -import io.micrometer.core.instrument.DistributionSummary; -import org.junit.jupiter.api.Disabled; -import org.opensearch.dataprepper.metrics.PluginMetrics; -import org.opensearch.dataprepper.plugins.source.configuration.NotificationSourceOption; -import org.opensearch.dataprepper.plugins.source.configuration.OnErrorOption; -import org.opensearch.dataprepper.plugins.source.configuration.SqsOptions; -import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSetManager; -import org.opensearch.dataprepper.acknowledgements.DefaultAcknowledgementSetManager; -import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSet; -import org.opensearch.dataprepper.model.event.Event; -import org.opensearch.dataprepper.model.event.JacksonEvent; import io.micrometer.core.instrument.Counter; +import io.micrometer.core.instrument.DistributionSummary; import io.micrometer.core.instrument.Timer; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import org.mockito.ArgumentCaptor; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.dataprepper.acknowledgements.DefaultAcknowledgementSetManager; +import org.opensearch.dataprepper.metrics.PluginMetrics; +import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSet; +import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSetManager; +import org.opensearch.dataprepper.model.event.Event; +import org.opensearch.dataprepper.model.event.JacksonEvent; +import org.opensearch.dataprepper.plugins.source.s3.configuration.NotificationSourceOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.OnErrorOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.SqsOptions; import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.sqs.SqsClient; @@ -32,28 +35,25 @@ import java.io.IOException; import java.time.Duration; import java.time.Instant; +import java.util.UUID; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.UUID; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.core.StringStartsWith.startsWith; -import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.lenient; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.atLeastOnce; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static org.mockito.Mockito.doAnswer; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; @ExtendWith(MockitoExtension.class) class SqsWorkerIT { diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/AwsAuthenticationAdapter.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/AwsAuthenticationAdapter.java similarity index 90% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/AwsAuthenticationAdapter.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/AwsAuthenticationAdapter.java index 4c0f1113c3..16c0197f94 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/AwsAuthenticationAdapter.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/AwsAuthenticationAdapter.java @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.aws.api.AwsCredentialsOptions; import org.opensearch.dataprepper.aws.api.AwsCredentialsSupplier; -import org.opensearch.dataprepper.plugins.source.configuration.AwsAuthenticationOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.AwsAuthenticationOptions; import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider; class AwsAuthenticationAdapter { diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/DateTimeJsonSerializer.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/DateTimeJsonSerializer.java similarity index 92% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/DateTimeJsonSerializer.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/DateTimeJsonSerializer.java index b4e3376bd9..290d231d60 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/DateTimeJsonSerializer.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/DateTimeJsonSerializer.java @@ -3,16 +3,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; - -import java.io.IOException; -import java.util.Date; - -import software.amazon.awssdk.utils.DateUtils; +package org.opensearch.dataprepper.plugins.source.s3; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; +import software.amazon.awssdk.utils.DateUtils; + +import java.io.IOException; +import java.util.Date; /** * A Jackson serializer for Joda {@code DateTime}s. diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/EventMetadataModifier.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/EventMetadataModifier.java similarity index 95% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/EventMetadataModifier.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/EventMetadataModifier.java index abc33e2411..6bd37ba436 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/EventMetadataModifier.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/EventMetadataModifier.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.model.event.Event; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ClientBuilderFactory.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ClientBuilderFactory.java similarity index 98% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ClientBuilderFactory.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ClientBuilderFactory.java index 228d6d255f..21a83be5f8 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ClientBuilderFactory.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ClientBuilderFactory.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3EventBridgeNotification.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3EventBridgeNotification.java similarity index 99% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3EventBridgeNotification.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3EventBridgeNotification.java index 98d5c26178..23fae33ddf 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3EventBridgeNotification.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3EventBridgeNotification.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3EventNotification.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3EventNotification.java similarity index 99% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3EventNotification.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3EventNotification.java index 0e81f0f2dc..2220eea653 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3EventNotification.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3EventNotification.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3InputFile.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3InputFile.java similarity index 95% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3InputFile.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3InputFile.java index 8e0d1c4234..5b80a3fec0 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3InputFile.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3InputFile.java @@ -1,8 +1,8 @@ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.apache.parquet.io.SeekableInputStream; import org.opensearch.dataprepper.model.io.InputFile; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.s3.model.HeadObjectRequest; import software.amazon.awssdk.services.s3.model.HeadObjectResponse; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3InputStream.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3InputStream.java similarity index 99% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3InputStream.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3InputStream.java index 19bdf9a8af..b51df4571c 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3InputStream.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3InputStream.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.google.common.base.Preconditions; import com.google.common.io.ByteStreams; @@ -8,7 +8,7 @@ import dev.failsafe.function.CheckedSupplier; import org.apache.http.ConnectionClosedException; import org.apache.parquet.io.SeekableInputStream; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import software.amazon.awssdk.core.sync.ResponseTransformer; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectDeleteWorker.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectDeleteWorker.java similarity index 97% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectDeleteWorker.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectDeleteWorker.java index 948eb3e726..69acd2926a 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectDeleteWorker.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectDeleteWorker.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import io.micrometer.core.instrument.Counter; import org.opensearch.dataprepper.metrics.PluginMetrics; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectDetails.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectDetails.java similarity index 94% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectDetails.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectDetails.java index 657f62ad02..9d7744b77b 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectDetails.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectDetails.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import java.io.Serializable; import java.time.LocalDateTime; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectHandler.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectHandler.java similarity index 94% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectHandler.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectHandler.java index 1e0466552e..faf442d120 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectHandler.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectHandler.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSet; import org.opensearch.dataprepper.model.source.coordinator.SourceCoordinator; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectPluginMetrics.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectPluginMetrics.java similarity index 98% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectPluginMetrics.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectPluginMetrics.java index d14e90552a..3de26290c1 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectPluginMetrics.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectPluginMetrics.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.DistributionSummary; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectReference.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectReference.java similarity index 96% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectReference.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectReference.java index dd45981601..7cdf4da9f3 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectReference.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectReference.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import java.util.Objects; import java.util.Optional; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectRequest.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectRequest.java similarity index 95% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectRequest.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectRequest.java index 463d4faace..211d81a871 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectRequest.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectRequest.java @@ -2,17 +2,17 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.model.buffer.Buffer; +import org.opensearch.dataprepper.model.codec.InputCodec; import org.opensearch.dataprepper.model.event.Event; import org.opensearch.dataprepper.model.record.Record; -import org.opensearch.dataprepper.model.codec.InputCodec; import org.opensearch.dataprepper.plugins.codec.CompressionOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectCSVOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectJsonOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectSerializationFormatOption; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectCSVOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectJsonOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectSerializationFormatOption; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import software.amazon.awssdk.services.s3.S3AsyncClient; import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.s3.model.CompressionType; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectWorker.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectWorker.java similarity index 98% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectWorker.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectWorker.java index c7ea5fd296..024cb05903 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ObjectWorker.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectWorker.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.buffer.common.BufferAccumulator; import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSet; @@ -13,7 +13,7 @@ import org.opensearch.dataprepper.model.record.Record; import org.opensearch.dataprepper.model.source.coordinator.SourceCoordinator; import org.opensearch.dataprepper.plugins.codec.CompressionOption; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.s3.S3Client; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ScanPartitionCreationSupplier.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanPartitionCreationSupplier.java similarity index 97% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ScanPartitionCreationSupplier.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanPartitionCreationSupplier.java index f1cb354f1d..04da7cdaa1 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ScanPartitionCreationSupplier.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanPartitionCreationSupplier.java @@ -3,12 +3,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.model.source.coordinator.PartitionIdentifier; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanKeyPathOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanSchedulingOptions; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanKeyPathOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanSchedulingOptions; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.s3.S3Client; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ScanService.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanService.java similarity index 94% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ScanService.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanService.java index 9b2ba8999b..21eb46207f 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3ScanService.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanService.java @@ -2,13 +2,13 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.metrics.PluginMetrics; import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSetManager; import org.opensearch.dataprepper.model.source.coordinator.SourceCoordinator; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanBucketOptions; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanBucketOptions; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import java.time.Duration; import java.time.LocalDateTime; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SelectObjectWorker.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectObjectWorker.java similarity index 97% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SelectObjectWorker.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectObjectWorker.java index 100f9385cd..81a0ae6403 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SelectObjectWorker.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectObjectWorker.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParser; @@ -18,10 +18,10 @@ import org.opensearch.dataprepper.model.log.JacksonLog; import org.opensearch.dataprepper.model.record.Record; import org.opensearch.dataprepper.model.source.coordinator.SourceCoordinator; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectCSVOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectJsonOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectSerializationFormatOption; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectCSVOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectJsonOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectSerializationFormatOption; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.s3.S3AsyncClient; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SelectResponseHandler.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectResponseHandler.java similarity index 96% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SelectResponseHandler.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectResponseHandler.java index ce7b076a2c..9dc5d3deeb 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SelectResponseHandler.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectResponseHandler.java @@ -2,16 +2,16 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; - -import java.util.ArrayList; -import java.util.List; +package org.opensearch.dataprepper.plugins.source.s3; import software.amazon.awssdk.core.async.SdkPublisher; import software.amazon.awssdk.services.s3.model.SelectObjectContentEventStream; import software.amazon.awssdk.services.s3.model.SelectObjectContentResponse; import software.amazon.awssdk.services.s3.model.SelectObjectContentResponseHandler; +import java.util.ArrayList; +import java.util.List; + /** * A handler class that will be used for handling the data processing and AWS SDK client exceptions. * This class is derived from SelectObjectContentResponseHandler in the AWS SDKv2 for Java. diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SelectResponseHandlerFactory.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectResponseHandlerFactory.java similarity index 82% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SelectResponseHandlerFactory.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectResponseHandlerFactory.java index 78d25c5c19..d4e4908b7c 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SelectResponseHandlerFactory.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectResponseHandlerFactory.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; public class S3SelectResponseHandlerFactory { diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3Service.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3Service.java similarity index 91% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3Service.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3Service.java index 99b0626a7e..5c3686a4d3 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3Service.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3Service.java @@ -3,9 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSet; + import java.io.IOException; public class S3Service { diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3Source.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3Source.java similarity index 93% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3Source.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3Source.java index 2e1b861032..d78f036038 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3Source.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3Source.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.opensearch.dataprepper.aws.api.AwsCredentialsSupplier; import org.opensearch.dataprepper.metrics.PluginMetrics; @@ -20,12 +20,12 @@ import org.opensearch.dataprepper.model.source.Source; import org.opensearch.dataprepper.model.source.coordinator.SourceCoordinator; import org.opensearch.dataprepper.model.source.coordinator.UsesSourceCoordination; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanScanOptions; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectCSVOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectJsonOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectOptions; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; -import org.opensearch.dataprepper.plugins.source.ownership.ConfigBucketOwnerProviderFactory; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanScanOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectCSVOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectJsonOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectOptions; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.ownership.ConfigBucketOwnerProviderFactory; import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider; import software.amazon.awssdk.services.s3.model.CompressionType; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SourceConfig.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceConfig.java similarity index 86% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SourceConfig.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceConfig.java index 817a6b7ca4..9d586f5667 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SourceConfig.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceConfig.java @@ -3,21 +3,21 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; -import jakarta.validation.constraints.AssertTrue; -import org.opensearch.dataprepper.model.configuration.PluginModel; -import org.opensearch.dataprepper.plugins.codec.CompressionOption; -import org.opensearch.dataprepper.plugins.source.configuration.NotificationTypeOption; -import org.opensearch.dataprepper.plugins.source.configuration.NotificationSourceOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanScanOptions; -import org.opensearch.dataprepper.plugins.source.configuration.SqsOptions; -import org.opensearch.dataprepper.plugins.source.configuration.AwsAuthenticationOptions; -import org.opensearch.dataprepper.plugins.source.configuration.OnErrorOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectOptions; import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.validation.Valid; +import jakarta.validation.constraints.AssertTrue; import jakarta.validation.constraints.NotNull; +import org.opensearch.dataprepper.model.configuration.PluginModel; +import org.opensearch.dataprepper.plugins.codec.CompressionOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.AwsAuthenticationOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.NotificationSourceOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.NotificationTypeOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.OnErrorOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanScanOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.SqsOptions; import java.time.Duration; import java.util.Map; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SourceProgressState.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceProgressState.java similarity index 81% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SourceProgressState.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceProgressState.java index dd323a9347..9f488af996 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/S3SourceProgressState.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceProgressState.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ScanObjectWorker.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ScanObjectWorker.java similarity index 97% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ScanObjectWorker.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ScanObjectWorker.java index fd9bd56df3..701a21cee3 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ScanObjectWorker.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ScanObjectWorker.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import io.micrometer.core.instrument.Counter; import org.opensearch.dataprepper.metrics.PluginMetrics; @@ -14,8 +14,8 @@ import org.opensearch.dataprepper.model.source.coordinator.exceptions.PartitionNotFoundException; import org.opensearch.dataprepper.model.source.coordinator.exceptions.PartitionNotOwnedException; import org.opensearch.dataprepper.model.source.coordinator.exceptions.PartitionUpdateException; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanSchedulingOptions; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanSchedulingOptions; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.s3.S3Client; @@ -30,8 +30,8 @@ import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; import java.util.function.Function; /** diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ScanOptions.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ScanOptions.java similarity index 97% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ScanOptions.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ScanOptions.java index eeba77d066..d4fb26df7a 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ScanOptions.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ScanOptions.java @@ -2,9 +2,9 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanBucketOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanBucketOption; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/SqsQueueUrl.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/SqsQueueUrl.java similarity index 95% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/SqsQueueUrl.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/SqsQueueUrl.java index 54586eb95f..e3f39c1f05 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/SqsQueueUrl.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/SqsQueueUrl.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import java.net.MalformedURLException; import java.net.URL; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/SqsService.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/SqsService.java similarity index 98% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/SqsService.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/SqsService.java index 2b5c73e903..cbf9c4001d 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/SqsService.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/SqsService.java @@ -3,17 +3,17 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.linecorp.armeria.client.retry.Backoff; import org.opensearch.dataprepper.metrics.PluginMetrics; +import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSetManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider; import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration; import software.amazon.awssdk.core.retry.RetryPolicy; import software.amazon.awssdk.services.sqs.SqsClient; -import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSetManager; import java.time.Duration; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/SqsWorker.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/SqsWorker.java similarity index 94% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/SqsWorker.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/SqsWorker.java index 847a70c5bb..22a3bd40a7 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/SqsWorker.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/SqsWorker.java @@ -3,33 +3,33 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.fasterxml.jackson.databind.ObjectMapper; import com.linecorp.armeria.client.retry.Backoff; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.Timer; import org.opensearch.dataprepper.metrics.PluginMetrics; -import org.opensearch.dataprepper.plugins.source.configuration.NotificationSourceOption; -import org.opensearch.dataprepper.plugins.source.configuration.OnErrorOption; -import org.opensearch.dataprepper.plugins.source.configuration.SqsOptions; -import org.opensearch.dataprepper.plugins.source.exception.SqsRetriesExhaustedException; -import org.opensearch.dataprepper.plugins.source.filter.EventBridgeObjectCreatedFilter; -import org.opensearch.dataprepper.plugins.source.filter.S3ObjectCreatedFilter; -import org.opensearch.dataprepper.plugins.source.filter.S3EventFilter; import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSet; import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSetManager; -import org.opensearch.dataprepper.plugins.source.parser.ParsedMessage; -import org.opensearch.dataprepper.plugins.source.parser.S3EventBridgeNotificationParser; -import org.opensearch.dataprepper.plugins.source.parser.S3EventNotificationParser; +import org.opensearch.dataprepper.plugins.source.s3.configuration.NotificationSourceOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.OnErrorOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.SqsOptions; +import org.opensearch.dataprepper.plugins.source.s3.exception.SqsRetriesExhaustedException; +import org.opensearch.dataprepper.plugins.source.s3.filter.EventBridgeObjectCreatedFilter; +import org.opensearch.dataprepper.plugins.source.s3.filter.S3EventFilter; +import org.opensearch.dataprepper.plugins.source.s3.filter.S3ObjectCreatedFilter; +import org.opensearch.dataprepper.plugins.source.s3.parser.ParsedMessage; +import org.opensearch.dataprepper.plugins.source.s3.parser.S3EventBridgeNotificationParser; +import org.opensearch.dataprepper.plugins.source.s3.parser.S3EventNotificationParser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import software.amazon.awssdk.core.exception.SdkException; import software.amazon.awssdk.services.sqs.SqsClient; import software.amazon.awssdk.services.sqs.model.DeleteMessageBatchRequest; import software.amazon.awssdk.services.sqs.model.DeleteMessageBatchRequestEntry; -import software.amazon.awssdk.services.sqs.model.DeleteMessageBatchResultEntry; import software.amazon.awssdk.services.sqs.model.DeleteMessageBatchResponse; +import software.amazon.awssdk.services.sqs.model.DeleteMessageBatchResultEntry; import software.amazon.awssdk.services.sqs.model.Message; import software.amazon.awssdk.services.sqs.model.ReceiveMessageRequest; import software.amazon.awssdk.services.sqs.model.SqsException; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/StsArnRole.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/StsArnRole.java similarity index 94% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/StsArnRole.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/StsArnRole.java index 1220fe84f9..fa1bb236d4 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/StsArnRole.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/StsArnRole.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import software.amazon.awssdk.arns.Arn; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/AwsAuthenticationOptions.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/AwsAuthenticationOptions.java similarity index 97% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/AwsAuthenticationOptions.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/AwsAuthenticationOptions.java index 4c6481e210..32f922f9c2 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/AwsAuthenticationOptions.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/AwsAuthenticationOptions.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.validation.constraints.Size; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationSourceOption.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationSourceOption.java similarity index 92% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationSourceOption.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationSourceOption.java index 4594ef0fee..9834db791e 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationSourceOption.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationSourceOption.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationTypeOption.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationTypeOption.java similarity index 92% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationTypeOption.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationTypeOption.java index 413452c496..48f1a4f195 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationTypeOption.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationTypeOption.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/OnErrorOption.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/OnErrorOption.java similarity index 92% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/OnErrorOption.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/OnErrorOption.java index 219a82c20b..a568465ad3 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/OnErrorOption.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/OnErrorOption.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOption.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOption.java similarity index 97% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOption.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOption.java index 58492d0cce..d72adc9b66 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOption.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOption.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOptions.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOptions.java similarity index 86% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOptions.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOptions.java index 1bf077813d..5f75590437 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOptions.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOptions.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.validation.Valid; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanKeyPathOption.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanKeyPathOption.java similarity index 90% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanKeyPathOption.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanKeyPathOption.java index 451eb26718..3021e31b10 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanKeyPathOption.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanKeyPathOption.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanScanOptions.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanScanOptions.java similarity index 97% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanScanOptions.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanScanOptions.java index 1c0df901d0..1567043cd7 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanScanOptions.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanScanOptions.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanSchedulingOptions.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanSchedulingOptions.java similarity index 92% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanSchedulingOptions.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanSchedulingOptions.java index 604b8debc2..0d98d7f649 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanSchedulingOptions.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanSchedulingOptions.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 * */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.validation.constraints.Min; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectCSVOption.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectCSVOption.java similarity index 90% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectCSVOption.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectCSVOption.java index 8bd6f17784..87948acf08 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectCSVOption.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectCSVOption.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectJsonOption.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectJsonOption.java similarity index 83% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectJsonOption.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectJsonOption.java index c2f768d3f9..de230c0991 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectJsonOption.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectJsonOption.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectOptions.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectOptions.java similarity index 95% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectOptions.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectOptions.java index d34a5e69ee..15f4fc367b 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectOptions.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectOptions.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.validation.constraints.NotBlank; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectSerializationFormatOption.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectSerializationFormatOption.java similarity index 92% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectSerializationFormatOption.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectSerializationFormatOption.java index 177bbdb934..2246453e78 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectSerializationFormatOption.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectSerializationFormatOption.java @@ -2,14 +2,14 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; + +import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Arrays; import java.util.Map; import java.util.stream.Collectors; -import com.fasterxml.jackson.annotation.JsonCreator; - public enum S3SelectSerializationFormatOption { CSV("csv"), JSON("json"), diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/SqsOptions.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/SqsOptions.java similarity index 96% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/SqsOptions.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/SqsOptions.java index 591b3062fc..ee2cbd0395 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/configuration/SqsOptions.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/configuration/SqsOptions.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.validation.constraints.Max; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/exception/S3RetriesExhaustedException.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/exception/S3RetriesExhaustedException.java similarity index 73% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/exception/S3RetriesExhaustedException.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/exception/S3RetriesExhaustedException.java index 35e85c214e..4063b1d2e4 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/exception/S3RetriesExhaustedException.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/exception/S3RetriesExhaustedException.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source.exception; +package org.opensearch.dataprepper.plugins.source.s3.exception; public class S3RetriesExhaustedException extends RuntimeException { diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/exception/SqsRetriesExhaustedException.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/exception/SqsRetriesExhaustedException.java similarity index 80% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/exception/SqsRetriesExhaustedException.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/exception/SqsRetriesExhaustedException.java index 0c6a90b9fd..cf72a381f4 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/exception/SqsRetriesExhaustedException.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/exception/SqsRetriesExhaustedException.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source.exception; +package org.opensearch.dataprepper.plugins.source.s3.exception; /** * This exception is thrown when SQS retries are exhausted diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/filter/EventBridgeObjectCreatedFilter.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/filter/EventBridgeObjectCreatedFilter.java similarity index 72% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/filter/EventBridgeObjectCreatedFilter.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/filter/EventBridgeObjectCreatedFilter.java index b5a8336bea..6a8f3a5681 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/filter/EventBridgeObjectCreatedFilter.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/filter/EventBridgeObjectCreatedFilter.java @@ -1,12 +1,13 @@ -package org.opensearch.dataprepper.plugins.source.filter; +package org.opensearch.dataprepper.plugins.source.s3.filter; -import org.opensearch.dataprepper.plugins.source.parser.ParsedMessage; +import org.opensearch.dataprepper.plugins.source.s3.S3EventBridgeNotification; +import org.opensearch.dataprepper.plugins.source.s3.parser.ParsedMessage; import java.util.Optional; public class EventBridgeObjectCreatedFilter implements S3EventFilter { /** - * Filters {@link ParsedMessage} of {@link org.opensearch.dataprepper.plugins.source.S3EventBridgeNotification} by detail-type + * Filters {@link ParsedMessage} of {@link S3EventBridgeNotification} by detail-type * * @return Returns Optional of {@link ParsedMessage} if detail-type is Object Created for EventBridge notification * does not have detail-type and returns Optional.empty() if detail-type is not Object Created diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/filter/S3EventFilter.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/filter/S3EventFilter.java similarity index 81% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/filter/S3EventFilter.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/filter/S3EventFilter.java index 2d3ac5892d..e44af3a28b 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/filter/S3EventFilter.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/filter/S3EventFilter.java @@ -3,9 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.filter; +package org.opensearch.dataprepper.plugins.source.s3.filter; -import org.opensearch.dataprepper.plugins.source.parser.ParsedMessage; +import org.opensearch.dataprepper.plugins.source.s3.parser.ParsedMessage; import java.util.Optional; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/filter/S3ObjectCreatedFilter.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/filter/S3ObjectCreatedFilter.java similarity index 76% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/filter/S3ObjectCreatedFilter.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/filter/S3ObjectCreatedFilter.java index 8e172d3f3f..e016387475 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/filter/S3ObjectCreatedFilter.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/filter/S3ObjectCreatedFilter.java @@ -3,9 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.filter; +package org.opensearch.dataprepper.plugins.source.s3.filter; -import org.opensearch.dataprepper.plugins.source.parser.ParsedMessage; +import org.opensearch.dataprepper.plugins.source.s3.parser.ParsedMessage; import java.util.Optional; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/BucketOwnerProvider.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/BucketOwnerProvider.java similarity index 88% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/BucketOwnerProvider.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/BucketOwnerProvider.java index 3b4a9e2acd..7b7fc25fdb 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/BucketOwnerProvider.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/BucketOwnerProvider.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.ownership; +package org.opensearch.dataprepper.plugins.source.s3.ownership; import java.util.Optional; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/ConfigBucketOwnerProviderFactory.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/ConfigBucketOwnerProviderFactory.java similarity index 89% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/ConfigBucketOwnerProviderFactory.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/ConfigBucketOwnerProviderFactory.java index c986040b5c..f059e2d952 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/ConfigBucketOwnerProviderFactory.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/ConfigBucketOwnerProviderFactory.java @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.ownership; +package org.opensearch.dataprepper.plugins.source.s3.ownership; -import org.opensearch.dataprepper.plugins.source.S3SourceConfig; -import org.opensearch.dataprepper.plugins.source.SqsQueueUrl; -import org.opensearch.dataprepper.plugins.source.StsArnRole; +import org.opensearch.dataprepper.plugins.source.s3.S3SourceConfig; +import org.opensearch.dataprepper.plugins.source.s3.SqsQueueUrl; +import org.opensearch.dataprepper.plugins.source.s3.StsArnRole; import java.net.MalformedURLException; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/MappedBucketOwnerProvider.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/MappedBucketOwnerProvider.java similarity index 94% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/MappedBucketOwnerProvider.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/MappedBucketOwnerProvider.java index 4aded114ee..8150f8584c 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/MappedBucketOwnerProvider.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/MappedBucketOwnerProvider.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source.ownership; +package org.opensearch.dataprepper.plugins.source.s3.ownership; import java.util.HashMap; import java.util.Map; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/NoOwnershipBucketOwnerProvider.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/NoOwnershipBucketOwnerProvider.java similarity index 87% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/NoOwnershipBucketOwnerProvider.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/NoOwnershipBucketOwnerProvider.java index 594924ea75..4f1324dc1a 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/NoOwnershipBucketOwnerProvider.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/NoOwnershipBucketOwnerProvider.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.ownership; +package org.opensearch.dataprepper.plugins.source.s3.ownership; import java.util.Optional; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/StaticBucketOwnerProvider.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/StaticBucketOwnerProvider.java similarity index 90% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/StaticBucketOwnerProvider.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/StaticBucketOwnerProvider.java index 432d0635f1..0ef04ccffd 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/ownership/StaticBucketOwnerProvider.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/ownership/StaticBucketOwnerProvider.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.ownership; +package org.opensearch.dataprepper.plugins.source.s3.ownership; import java.util.Objects; import java.util.Optional; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/ParsedMessage.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/ParsedMessage.java similarity index 91% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/ParsedMessage.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/ParsedMessage.java index 2b246a7a89..b2cfddd443 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/ParsedMessage.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/ParsedMessage.java @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.parser; +package org.opensearch.dataprepper.plugins.source.s3.parser; import org.joda.time.DateTime; -import org.opensearch.dataprepper.plugins.source.S3EventBridgeNotification; -import org.opensearch.dataprepper.plugins.source.S3EventNotification; +import org.opensearch.dataprepper.plugins.source.s3.S3EventBridgeNotification; +import org.opensearch.dataprepper.plugins.source.s3.S3EventNotification; import software.amazon.awssdk.services.sqs.model.Message; import java.util.List; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/S3EventBridgeNotificationParser.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventBridgeNotificationParser.java similarity index 88% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/S3EventBridgeNotificationParser.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventBridgeNotificationParser.java index 9b3008aebb..9db1f7af13 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/S3EventBridgeNotificationParser.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventBridgeNotificationParser.java @@ -1,8 +1,8 @@ -package org.opensearch.dataprepper.plugins.source.parser; +package org.opensearch.dataprepper.plugins.source.s3.parser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.opensearch.dataprepper.plugins.source.S3EventBridgeNotification; +import org.opensearch.dataprepper.plugins.source.s3.S3EventBridgeNotification; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.sqs.model.Message; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/S3EventNotificationParser.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventNotificationParser.java similarity index 94% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/S3EventNotificationParser.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventNotificationParser.java index 78cadf55d9..b716b41ff9 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/S3EventNotificationParser.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventNotificationParser.java @@ -1,9 +1,9 @@ -package org.opensearch.dataprepper.plugins.source.parser; +package org.opensearch.dataprepper.plugins.source.s3.parser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import org.opensearch.dataprepper.plugins.source.S3EventNotification; +import org.opensearch.dataprepper.plugins.source.s3.S3EventNotification; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import software.amazon.awssdk.services.sqs.model.Message; diff --git a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/S3NotificationParser.java b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3NotificationParser.java similarity index 90% rename from data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/S3NotificationParser.java rename to data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3NotificationParser.java index 089220aa99..298143a96c 100644 --- a/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/parser/S3NotificationParser.java +++ b/data-prepper-plugins/s3-source/src/main/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3NotificationParser.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source.parser; +package org.opensearch.dataprepper.plugins.source.s3.parser; import com.fasterxml.jackson.databind.ObjectMapper; import software.amazon.awssdk.services.sqs.model.Message; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/AwsAuthenticationAdapterTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/AwsAuthenticationAdapterTest.java similarity index 96% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/AwsAuthenticationAdapterTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/AwsAuthenticationAdapterTest.java index 57368d1e72..a412ca7de7 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/AwsAuthenticationAdapterTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/AwsAuthenticationAdapterTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -15,7 +15,7 @@ import org.mockito.junit.jupiter.MockitoExtension; import org.opensearch.dataprepper.aws.api.AwsCredentialsOptions; import org.opensearch.dataprepper.aws.api.AwsCredentialsSupplier; -import org.opensearch.dataprepper.plugins.source.configuration.AwsAuthenticationOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.AwsAuthenticationOptions; import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider; import software.amazon.awssdk.regions.Region; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/EventMetadataModifierTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/EventMetadataModifierTest.java similarity index 98% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/EventMetadataModifierTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/EventMetadataModifierTest.java index 2f325e8a83..4ca46bb923 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/EventMetadataModifierTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/EventMetadataModifierTest.java @@ -3,9 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; -import org.opensearch.dataprepper.model.event.Event; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -16,6 +15,7 @@ import org.junit.jupiter.params.provider.ArgumentsSource; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.dataprepper.model.event.Event; import java.util.UUID; import java.util.stream.Stream; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3InputFileTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3InputFileTest.java similarity index 96% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3InputFileTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3InputFileTest.java index 79d1928d35..f77e9892d2 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3InputFileTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3InputFileTest.java @@ -1,10 +1,10 @@ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.apache.parquet.io.SeekableInputStream; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.s3.model.HeadObjectRequest; import software.amazon.awssdk.services.s3.model.HeadObjectResponse; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3InputStreamTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3InputStreamTest.java similarity index 99% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3InputStreamTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3InputStreamTest.java index 9eb65ee953..5548242e8f 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3InputStreamTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3InputStreamTest.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.DistributionSummary; @@ -10,7 +10,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import software.amazon.awssdk.core.sync.ResponseTransformer; import software.amazon.awssdk.http.HttpStatusCode; import software.amazon.awssdk.services.s3.S3Client; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectDeleteWorkerTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectDeleteWorkerTest.java similarity index 93% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectDeleteWorkerTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectDeleteWorkerTest.java index ca2e45d2fb..d26ee2dd05 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectDeleteWorkerTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectDeleteWorkerTest.java @@ -1,8 +1,8 @@ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import io.micrometer.core.instrument.Counter; -import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.opensearch.dataprepper.metrics.PluginMetrics; @@ -20,8 +20,8 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; -import static org.opensearch.dataprepper.plugins.source.S3ObjectDeleteWorker.S3_OBJECTS_DELETED_METRIC_NAME; -import static org.opensearch.dataprepper.plugins.source.S3ObjectDeleteWorker.S3_OBJECTS_DELETE_FAILED_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.S3ObjectDeleteWorker.S3_OBJECTS_DELETED_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.S3ObjectDeleteWorker.S3_OBJECTS_DELETE_FAILED_METRIC_NAME; @ExtendWith(MockitoExtension.class) class S3ObjectDeleteWorkerTest { diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectPluginMetricsTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectPluginMetricsTest.java similarity index 97% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectPluginMetricsTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectPluginMetricsTest.java index fd8f4bf8d2..851b89370d 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectPluginMetricsTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectPluginMetricsTest.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.DistributionSummary; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectReferenceTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectReferenceTest.java similarity index 97% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectReferenceTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectReferenceTest.java index 38e29bf62d..cc142dc9ca 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectReferenceTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectReferenceTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectRequestTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectRequestTest.java similarity index 91% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectRequestTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectRequestTest.java index ebba2aee52..766e3b4ca8 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectRequestTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectRequestTest.java @@ -2,19 +2,19 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.opensearch.dataprepper.model.buffer.Buffer; +import org.opensearch.dataprepper.model.codec.InputCodec; import org.opensearch.dataprepper.model.event.Event; import org.opensearch.dataprepper.model.record.Record; -import org.opensearch.dataprepper.model.codec.InputCodec; import org.opensearch.dataprepper.plugins.codec.CompressionOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectCSVOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectJsonOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectSerializationFormatOption; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectCSVOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectJsonOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectSerializationFormatOption; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import org.opensearch.dataprepper.test.helper.ReflectivelySetField; import software.amazon.awssdk.services.s3.S3AsyncClient; import software.amazon.awssdk.services.s3.S3Client; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectWorkerTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectWorkerTest.java similarity index 99% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectWorkerTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectWorkerTest.java index 438a7feadf..2cbd5bbf47 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ObjectWorkerTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ObjectWorkerTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.DistributionSummary; @@ -26,7 +26,7 @@ import org.opensearch.dataprepper.model.record.Record; import org.opensearch.dataprepper.model.source.coordinator.SourceCoordinator; import org.opensearch.dataprepper.plugins.codec.CompressionOption; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import software.amazon.awssdk.core.sync.ResponseTransformer; import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.s3.model.GetObjectRequest; @@ -62,7 +62,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.when; -import static org.opensearch.dataprepper.plugins.source.S3ObjectWorker.RECORDS_TO_ACCUMULATE_TO_SAVE_STATE; +import static org.opensearch.dataprepper.plugins.source.s3.S3ObjectWorker.RECORDS_TO_ACCUMULATE_TO_SAVE_STATE; @ExtendWith(MockitoExtension.class) class S3ObjectWorkerTest { diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ScanObjectWorkerTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanObjectWorkerTest.java similarity index 96% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ScanObjectWorkerTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanObjectWorkerTest.java index 67ed806cc8..31319f9925 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ScanObjectWorkerTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanObjectWorkerTest.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import io.micrometer.core.instrument.Counter; @@ -22,9 +22,9 @@ import org.opensearch.dataprepper.model.source.coordinator.exceptions.PartitionNotFoundException; import org.opensearch.dataprepper.model.source.coordinator.exceptions.PartitionNotOwnedException; import org.opensearch.dataprepper.model.source.coordinator.exceptions.PartitionUpdateException; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanScanOptions; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanSchedulingOptions; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanScanOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanSchedulingOptions; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.s3.model.DeleteObjectRequest; import software.amazon.awssdk.services.s3.model.NoSuchKeyException; @@ -52,7 +52,7 @@ import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; -import static org.opensearch.dataprepper.plugins.source.ScanObjectWorker.ACKNOWLEDGEMENT_SET_CALLBACK_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.ScanObjectWorker.ACKNOWLEDGEMENT_SET_CALLBACK_METRIC_NAME; @ExtendWith(MockitoExtension.class) class S3ScanObjectWorkerTest { diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ScanPartitionCreationSupplierTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanPartitionCreationSupplierTest.java similarity index 96% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ScanPartitionCreationSupplierTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanPartitionCreationSupplierTest.java index 5d161562d2..77a110528c 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ScanPartitionCreationSupplierTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanPartitionCreationSupplierTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.hamcrest.Matchers; import org.junit.jupiter.api.BeforeEach; @@ -13,10 +13,10 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.opensearch.dataprepper.model.source.coordinator.PartitionIdentifier; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanBucketOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanKeyPathOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanSchedulingOptions; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanBucketOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanKeyPathOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanSchedulingOptions; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.s3.model.ListObjectsV2Request; import software.amazon.awssdk.services.s3.model.ListObjectsV2Response; @@ -44,8 +44,8 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.opensearch.dataprepper.plugins.source.S3ScanPartitionCreationSupplier.LAST_SCAN_TIME; -import static org.opensearch.dataprepper.plugins.source.S3ScanPartitionCreationSupplier.SCAN_COUNT; +import static org.opensearch.dataprepper.plugins.source.s3.S3ScanPartitionCreationSupplier.LAST_SCAN_TIME; +import static org.opensearch.dataprepper.plugins.source.s3.S3ScanPartitionCreationSupplier.SCAN_COUNT; @ExtendWith(MockitoExtension.class) public class S3ScanPartitionCreationSupplierTest { diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ScanServiceTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanServiceTest.java similarity index 94% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ScanServiceTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanServiceTest.java index de40f6d79d..0f068fcbe4 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3ScanServiceTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3ScanServiceTest.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -11,11 +11,11 @@ import org.opensearch.dataprepper.metrics.PluginMetrics; import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSetManager; import org.opensearch.dataprepper.model.source.coordinator.SourceCoordinator; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanBucketOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanBucketOptions; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanKeyPathOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanScanOptions; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanBucketOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanBucketOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanKeyPathOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanScanOptions; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import java.time.Duration; import java.time.LocalDateTime; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SelectObjectWorkerTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectObjectWorkerTest.java similarity index 96% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SelectObjectWorkerTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectObjectWorkerTest.java index 7393fab562..a911964ab6 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SelectObjectWorkerTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectObjectWorkerTest.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.DistributionSummary; @@ -14,14 +14,14 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSet; import org.opensearch.dataprepper.model.buffer.Buffer; import org.opensearch.dataprepper.model.event.Event; import org.opensearch.dataprepper.model.record.Record; -import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSet; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectCSVOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectJsonOption; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectSerializationFormatOption; -import org.opensearch.dataprepper.plugins.source.ownership.BucketOwnerProvider; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectCSVOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectJsonOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectSerializationFormatOption; +import org.opensearch.dataprepper.plugins.source.s3.ownership.BucketOwnerProvider; import software.amazon.awssdk.core.SdkBytes; import software.amazon.awssdk.services.s3.S3AsyncClient; import software.amazon.awssdk.services.s3.model.CompressionType; @@ -55,13 +55,13 @@ import static org.mockito.Mockito.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.lenient; -import static org.opensearch.dataprepper.plugins.source.S3SelectObjectWorker.CSV_FILE_HEADER_INFO_NONE; -import static org.opensearch.dataprepper.plugins.source.S3SelectObjectWorker.JSON_LINES_TYPE; -import static org.opensearch.dataprepper.plugins.source.S3SelectObjectWorker.MAX_S3_OBJECT_CHUNK_SIZE; +import static org.opensearch.dataprepper.plugins.source.s3.S3SelectObjectWorker.CSV_FILE_HEADER_INFO_NONE; +import static org.opensearch.dataprepper.plugins.source.s3.S3SelectObjectWorker.JSON_LINES_TYPE; +import static org.opensearch.dataprepper.plugins.source.s3.S3SelectObjectWorker.MAX_S3_OBJECT_CHUNK_SIZE; @ExtendWith(MockitoExtension.class) class S3SelectObjectWorkerTest { diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SelectResponseHandlerTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectResponseHandlerTest.java similarity index 99% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SelectResponseHandlerTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectResponseHandlerTest.java index 1dad3e9326..f00a77a642 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SelectResponseHandlerTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SelectResponseHandlerTest.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.github.tomakehurst.wiremock.junit.WireMockRule; import org.junit.After; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SourceConfigTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceConfigTest.java similarity index 85% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SourceConfigTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceConfigTest.java index 83a2f8990d..2da902e6df 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SourceConfigTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceConfigTest.java @@ -3,24 +3,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; +import org.junit.jupiter.api.Test; import org.opensearch.dataprepper.model.configuration.PluginModel; import org.opensearch.dataprepper.plugins.codec.CompressionOption; -import org.opensearch.dataprepper.plugins.source.configuration.NotificationSourceOption; -import org.opensearch.dataprepper.plugins.source.configuration.OnErrorOption; -import org.junit.jupiter.api.Test; -import org.opensearch.dataprepper.plugins.source.configuration.S3SelectOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.NotificationSourceOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.OnErrorOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3SelectOptions; import org.opensearch.dataprepper.test.helper.ReflectivelySetField; import java.util.HashMap; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.opensearch.dataprepper.plugins.source.S3SourceConfig.DEFAULT_NUMBER_OF_RECORDS_TO_ACCUMULATE; -import static org.opensearch.dataprepper.plugins.source.S3SourceConfig.DEFAULT_BUFFER_TIMEOUT; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opensearch.dataprepper.plugins.source.s3.S3SourceConfig.DEFAULT_BUFFER_TIMEOUT; +import static org.opensearch.dataprepper.plugins.source.s3.S3SourceConfig.DEFAULT_NUMBER_OF_RECORDS_TO_ACCUMULATE; class S3SourceConfigTest { diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SourceTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceTest.java similarity index 97% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SourceTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceTest.java index 62a8123a14..ad2eb1eef5 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/S3SourceTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/S3SourceTest.java @@ -3,15 +3,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.opensearch.dataprepper.aws.api.AwsCredentialsSupplier; import org.opensearch.dataprepper.metrics.PluginMetrics; +import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSetManager; import org.opensearch.dataprepper.model.configuration.PluginModel; import org.opensearch.dataprepper.model.plugin.PluginFactory; -import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSetManager; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.mock; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ScanOptionsTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ScanOptionsTest.java similarity index 98% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ScanOptionsTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ScanOptionsTest.java index 6ac0b2b3cf..ddd2a41de9 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ScanOptionsTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ScanOptionsTest.java @@ -3,12 +3,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -import org.opensearch.dataprepper.plugins.source.configuration.S3ScanBucketOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.S3ScanBucketOption; import java.time.Duration; import java.time.LocalDateTime; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/SqsQueueUrlTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/SqsQueueUrlTest.java similarity index 98% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/SqsQueueUrlTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/SqsQueueUrlTest.java index 9db7425d1c..d9b7a2cd3b 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/SqsQueueUrlTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/SqsQueueUrlTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.api.Test; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/SqsWorkerTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/SqsWorkerTest.java similarity index 96% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/SqsWorkerTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/SqsWorkerTest.java index 607cbef532..61ac59308d 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/SqsWorkerTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/SqsWorkerTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import com.linecorp.armeria.client.retry.Backoff; import io.micrometer.core.instrument.Counter; @@ -20,15 +20,15 @@ import org.junit.jupiter.params.provider.ValueSource; import org.mockito.ArgumentCaptor; import org.opensearch.dataprepper.metrics.PluginMetrics; -import org.opensearch.dataprepper.plugins.source.configuration.AwsAuthenticationOptions; -import org.opensearch.dataprepper.plugins.source.configuration.NotificationSourceOption; -import org.opensearch.dataprepper.plugins.source.configuration.OnErrorOption; -import org.opensearch.dataprepper.plugins.source.configuration.SqsOptions; -import org.opensearch.dataprepper.plugins.source.exception.SqsRetriesExhaustedException; -import org.opensearch.dataprepper.plugins.source.filter.S3ObjectCreatedFilter; -import org.opensearch.dataprepper.plugins.source.filter.S3EventFilter; import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSet; import org.opensearch.dataprepper.model.acknowledgements.AcknowledgementSetManager; +import org.opensearch.dataprepper.plugins.source.s3.configuration.AwsAuthenticationOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.NotificationSourceOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.OnErrorOption; +import org.opensearch.dataprepper.plugins.source.s3.configuration.SqsOptions; +import org.opensearch.dataprepper.plugins.source.s3.exception.SqsRetriesExhaustedException; +import org.opensearch.dataprepper.plugins.source.s3.filter.S3EventFilter; +import org.opensearch.dataprepper.plugins.source.s3.filter.S3ObjectCreatedFilter; import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.sqs.SqsClient; import software.amazon.awssdk.services.sqs.model.BatchResultErrorEntry; @@ -70,11 +70,11 @@ import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; -import static org.opensearch.dataprepper.plugins.source.SqsWorker.SQS_MESSAGES_DELETED_METRIC_NAME; -import static org.opensearch.dataprepper.plugins.source.SqsWorker.SQS_MESSAGES_DELETE_FAILED_METRIC_NAME; -import static org.opensearch.dataprepper.plugins.source.SqsWorker.SQS_MESSAGES_FAILED_METRIC_NAME; -import static org.opensearch.dataprepper.plugins.source.SqsWorker.SQS_MESSAGES_RECEIVED_METRIC_NAME; -import static org.opensearch.dataprepper.plugins.source.SqsWorker.SQS_MESSAGE_DELAY_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.SqsWorker.SQS_MESSAGES_DELETED_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.SqsWorker.SQS_MESSAGES_DELETE_FAILED_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.SqsWorker.SQS_MESSAGES_FAILED_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.SqsWorker.SQS_MESSAGES_RECEIVED_METRIC_NAME; +import static org.opensearch.dataprepper.plugins.source.s3.SqsWorker.SQS_MESSAGE_DELAY_METRIC_NAME; class SqsWorkerTest { private SqsWorker sqsWorker; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/StsArnRoleTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/StsArnRoleTest.java similarity index 97% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/StsArnRoleTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/StsArnRoleTest.java index 3449751782..8a4cbe5395 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/StsArnRoleTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/StsArnRoleTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source; +package org.opensearch.dataprepper.plugins.source.s3; import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.api.Test; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/AwsAuthenticationOptionsTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/AwsAuthenticationOptionsTest.java similarity index 97% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/AwsAuthenticationOptionsTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/AwsAuthenticationOptionsTest.java index 56c33c3b88..29fc197207 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/AwsAuthenticationOptionsTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/AwsAuthenticationOptionsTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationSourceOptionTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationSourceOptionTest.java similarity index 87% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationSourceOptionTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationSourceOptionTest.java index 23d24e9d82..eb7ebf4c56 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationSourceOptionTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationSourceOptionTest.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationTypeOptionTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationTypeOptionTest.java similarity index 88% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationTypeOptionTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationTypeOptionTest.java index ad0db2a00f..018de3fc8b 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/NotificationTypeOptionTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/NotificationTypeOptionTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/OnErrorOptionTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/OnErrorOptionTest.java similarity index 88% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/OnErrorOptionTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/OnErrorOptionTest.java index bc8e8ff059..efc7bf391e 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/OnErrorOptionTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/OnErrorOptionTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOptionTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOptionTest.java similarity index 97% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOptionTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOptionTest.java index 6e4a6df6fc..123238909d 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOptionTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOptionTest.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOptionsTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOptionsTest.java similarity index 96% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOptionsTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOptionsTest.java index 3c6b4112f1..90aa788f36 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanBucketOptionsTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanBucketOptionsTest.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanScanOptionsTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanScanOptionsTest.java similarity index 97% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanScanOptionsTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanScanOptionsTest.java index 013d82aaeb..33e9245b8b 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanScanOptionsTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanScanOptionsTest.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanSchedulingOptionsTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanSchedulingOptionsTest.java similarity index 94% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanSchedulingOptionsTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanSchedulingOptionsTest.java index edd8b92f62..de2703f32e 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3ScanSchedulingOptionsTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3ScanSchedulingOptionsTest.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectCSVOptionTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectCSVOptionTest.java similarity index 95% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectCSVOptionTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectCSVOptionTest.java index 018adfe789..0b0af421f3 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectCSVOptionTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectCSVOptionTest.java @@ -2,13 +2,13 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; -import org.junit.jupiter.api.Test; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.nullValue; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectJsonOptionTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectJsonOptionTest.java similarity index 95% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectJsonOptionTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectJsonOptionTest.java index c0656a6aaf..ec3e13a3d0 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectJsonOptionTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectJsonOptionTest.java @@ -2,13 +2,14 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; -import org.junit.jupiter.api.Test; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator; +import org.junit.jupiter.api.Test; + import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectOptionsTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectOptionsTest.java similarity index 96% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectOptionsTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectOptionsTest.java index 457311f0ac..3403744f93 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/configuration/S3SelectOptionsTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/configuration/S3SelectOptionsTest.java @@ -2,7 +2,7 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.configuration; +package org.opensearch.dataprepper.plugins.source.s3.configuration; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/filter/EventBridgeObjectCreatedFilterTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/filter/EventBridgeObjectCreatedFilterTest.java similarity index 92% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/filter/EventBridgeObjectCreatedFilterTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/filter/EventBridgeObjectCreatedFilterTest.java index e898bf0f9a..9a4e35e9fa 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/filter/EventBridgeObjectCreatedFilterTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/filter/EventBridgeObjectCreatedFilterTest.java @@ -1,16 +1,16 @@ -package org.opensearch.dataprepper.plugins.source.filter; +package org.opensearch.dataprepper.plugins.source.s3.filter; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.opensearch.dataprepper.plugins.source.parser.ParsedMessage; +import org.opensearch.dataprepper.plugins.source.s3.parser.ParsedMessage; import java.util.Optional; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/filter/S3ObjectCreatedFilterTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/filter/S3ObjectCreatedFilterTest.java similarity index 92% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/filter/S3ObjectCreatedFilterTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/filter/S3ObjectCreatedFilterTest.java index 9cc9635899..65dc1a5586 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/filter/S3ObjectCreatedFilterTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/filter/S3ObjectCreatedFilterTest.java @@ -3,10 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.filter; +package org.opensearch.dataprepper.plugins.source.s3.filter; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.opensearch.dataprepper.plugins.source.s3.parser.ParsedMessage; import java.util.Optional; @@ -18,8 +19,6 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import org.opensearch.dataprepper.plugins.source.parser.ParsedMessage; - class S3ObjectCreatedFilterTest { private S3ObjectCreatedFilter s3ObjectCreatedFilter; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/ConfigBucketOwnerProviderFactoryTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/ConfigBucketOwnerProviderFactoryTest.java similarity index 96% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/ConfigBucketOwnerProviderFactoryTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/ConfigBucketOwnerProviderFactoryTest.java index 594f792c7a..409631d47f 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/ConfigBucketOwnerProviderFactoryTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/ConfigBucketOwnerProviderFactoryTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.ownership; +package org.opensearch.dataprepper.plugins.source.s3.ownership; import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.api.BeforeEach; @@ -12,9 +12,9 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.dataprepper.plugins.source.S3SourceConfig; -import org.opensearch.dataprepper.plugins.source.configuration.AwsAuthenticationOptions; -import org.opensearch.dataprepper.plugins.source.configuration.SqsOptions; +import org.opensearch.dataprepper.plugins.source.s3.S3SourceConfig; +import org.opensearch.dataprepper.plugins.source.s3.configuration.AwsAuthenticationOptions; +import org.opensearch.dataprepper.plugins.source.s3.configuration.SqsOptions; import java.util.Map; import java.util.Optional; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/MappedBucketOwnerProviderTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/MappedBucketOwnerProviderTest.java similarity index 98% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/MappedBucketOwnerProviderTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/MappedBucketOwnerProviderTest.java index 203ea8412e..89c1b97585 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/MappedBucketOwnerProviderTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/MappedBucketOwnerProviderTest.java @@ -1,4 +1,4 @@ -package org.opensearch.dataprepper.plugins.source.ownership; +package org.opensearch.dataprepper.plugins.source.s3.ownership; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/NoOwnershipBucketOwnerProviderTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/NoOwnershipBucketOwnerProviderTest.java similarity index 92% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/NoOwnershipBucketOwnerProviderTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/NoOwnershipBucketOwnerProviderTest.java index 281b2dab03..432fac5723 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/NoOwnershipBucketOwnerProviderTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/NoOwnershipBucketOwnerProviderTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.ownership; +package org.opensearch.dataprepper.plugins.source.s3.ownership; import org.junit.jupiter.api.Test; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/StaticBucketOwnerProviderTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/StaticBucketOwnerProviderTest.java similarity index 95% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/StaticBucketOwnerProviderTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/StaticBucketOwnerProviderTest.java index 22f03b776b..cf1937410b 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/ownership/StaticBucketOwnerProviderTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/ownership/StaticBucketOwnerProviderTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.ownership; +package org.opensearch.dataprepper.plugins.source.s3.ownership; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/parser/ParsedMessageTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/parser/ParsedMessageTest.java similarity index 95% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/parser/ParsedMessageTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/parser/ParsedMessageTest.java index 99ff7f4dcd..8721cc4ded 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/parser/ParsedMessageTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/parser/ParsedMessageTest.java @@ -1,10 +1,10 @@ -package org.opensearch.dataprepper.plugins.source.parser; +package org.opensearch.dataprepper.plugins.source.s3.parser; import org.joda.time.DateTime; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.opensearch.dataprepper.plugins.source.S3EventBridgeNotification; -import org.opensearch.dataprepper.plugins.source.S3EventNotification; +import org.opensearch.dataprepper.plugins.source.s3.S3EventBridgeNotification; +import org.opensearch.dataprepper.plugins.source.s3.S3EventNotification; import software.amazon.awssdk.services.sqs.model.Message; import java.util.List; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/parser/S3EventBridgeNotificationParserTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventBridgeNotificationParserTest.java similarity index 98% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/parser/S3EventBridgeNotificationParserTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventBridgeNotificationParserTest.java index ad12de373d..c779ec561f 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/parser/S3EventBridgeNotificationParserTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventBridgeNotificationParserTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.parser; +package org.opensearch.dataprepper.plugins.source.s3.parser; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.BeforeEach; diff --git a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/parser/S3EventNotificationParserTest.java b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventNotificationParserTest.java similarity index 98% rename from data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/parser/S3EventNotificationParserTest.java rename to data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventNotificationParserTest.java index f8398404f1..a3d2c91679 100644 --- a/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/parser/S3EventNotificationParserTest.java +++ b/data-prepper-plugins/s3-source/src/test/java/org/opensearch/dataprepper/plugins/source/s3/parser/S3EventNotificationParserTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package org.opensearch.dataprepper.plugins.source.parser; +package org.opensearch.dataprepper.plugins.source.s3.parser; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.BeforeEach;