diff --git a/server/src/main/java/org/opensearch/ingest/AbstractBatchProcessor.java b/server/src/main/java/org/opensearch/ingest/AbstractBatchingProcessor.java similarity index 91% rename from server/src/main/java/org/opensearch/ingest/AbstractBatchProcessor.java rename to server/src/main/java/org/opensearch/ingest/AbstractBatchingProcessor.java index 51763d837eb28..f15c3f590edc6 100644 --- a/server/src/main/java/org/opensearch/ingest/AbstractBatchProcessor.java +++ b/server/src/main/java/org/opensearch/ingest/AbstractBatchingProcessor.java @@ -20,13 +20,13 @@ * * @opensearch.internal */ -public abstract class AbstractBatchProcessor extends AbstractProcessor { +public abstract class AbstractBatchingProcessor extends AbstractProcessor { public static final String BATCH_SIZE_FIELD = "batch_size"; private static final int DEFAULT_BATCH_SIZE = 1; protected final int batchSize; - protected AbstractBatchProcessor(String tag, String description, int batchSize) { + protected AbstractBatchingProcessor(String tag, String description, int batchSize) { super(tag, description); this.batchSize = batchSize; } @@ -86,7 +86,7 @@ private List> cutBatches(List } /** - * Factory class for creating {@link AbstractBatchProcessor} instances. + * Factory class for creating {@link AbstractBatchingProcessor} instances. * * @opensearch.internal */ @@ -108,7 +108,7 @@ protected Factory(String processorType) { * @throws Exception If the processor could not be created. */ @Override - public AbstractBatchProcessor create( + public AbstractBatchingProcessor create( Map processorFactories, String tag, String description, @@ -127,6 +127,6 @@ public AbstractBatchProcessor create( * @param config configuration of the processor * @return a new batch processor instance */ - protected abstract AbstractBatchProcessor newProcessor(String tag, String description, int batchSize, Map config); + protected abstract AbstractBatchingProcessor newProcessor(String tag, String description, int batchSize, Map config); } } diff --git a/server/src/test/java/org/opensearch/ingest/AbstractBatchProcessorTests.java b/server/src/test/java/org/opensearch/ingest/AbstractBatchingProcessorTests.java similarity index 97% rename from server/src/test/java/org/opensearch/ingest/AbstractBatchProcessorTests.java rename to server/src/test/java/org/opensearch/ingest/AbstractBatchingProcessorTests.java index ab48d2692df18..10ee5d54a7ed8 100644 --- a/server/src/test/java/org/opensearch/ingest/AbstractBatchProcessorTests.java +++ b/server/src/test/java/org/opensearch/ingest/AbstractBatchingProcessorTests.java @@ -26,7 +26,7 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -public class AbstractBatchProcessorTests extends OpenSearchTestCase { +public class AbstractBatchingProcessorTests extends OpenSearchTestCase { private static final String DESCRIPTION = "description"; private static final String TAG = "tag"; @@ -108,7 +108,7 @@ public void testBatchExecute_defaultBatchSize() throws Exception { verify(processor, times(3)).execute(any(IngestDocument.class)); } - static class DummyProcessor extends AbstractBatchProcessor { + static class DummyProcessor extends AbstractBatchingProcessor { protected DummyProcessor(String tag, String description, int batchSize) { super(tag, description, batchSize);