Skip to content

Commit

Permalink
Rename classes
Browse files Browse the repository at this point in the history
Signed-off-by: Liyun Xiu <xiliyun@amazon.com>
  • Loading branch information
chishui committed Jun 26, 2024
1 parent 4afa147 commit 666403c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -86,7 +86,7 @@ private List<List<IngestDocumentWrapper>> cutBatches(List<IngestDocumentWrapper>
}

/**
* Factory class for creating {@link AbstractBatchProcessor} instances.
* Factory class for creating {@link AbstractBatchingProcessor} instances.
*
* @opensearch.internal
*/
Expand All @@ -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<String, Processor.Factory> processorFactories,
String tag,
String description,
Expand All @@ -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<String, Object> config);
protected abstract AbstractBatchingProcessor newProcessor(String tag, String description, int batchSize, Map<String, Object> config);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 666403c

Please sign in to comment.