From 19a8efbcd16de6af771e9a6352677accfb09d564 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Wed, 22 Jan 2025 06:48:30 -0500 Subject: [PATCH] Rename --- .../xpack/esql/enrich/AbstractLookupService.java | 12 ++++++------ .../xpack/esql/enrich/EnrichLookupService.java | 4 ++-- .../xpack/esql/enrich/LookupFromIndexService.java | 4 ++-- .../xpack/esql/plugin/TransportEsqlQueryAction.java | 9 ++++----- .../esql/enrich/LookupFromIndexOperatorTests.java | 10 ++++++++-- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/AbstractLookupService.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/AbstractLookupService.java index 5b630c1a83874..961d74794961f 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/AbstractLookupService.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/AbstractLookupService.java @@ -133,7 +133,7 @@ public abstract class AbstractLookupService { private final String actionName; private final ClusterService clusterService; - private final CreateShardContext createShardContext; + private final LookupShardContextFactory lookupShardContextFactory; private final TransportService transportService; private final Executor executor; private final BigArrays bigArrays; @@ -152,7 +152,7 @@ public abstract class AbstractLookupService final List releasables = new ArrayList<>(6); boolean started = false; try { - LookupShardContext shardContext = createShardContext.create(request.shardId); + LookupShardContext shardContext = lookupShardContextFactory.create(request.shardId); releasables.add(shardContext.release); final LocalCircuitBreaker localBreaker = new LocalCircuitBreaker( blockFactory.breaker(), @@ -677,10 +677,10 @@ public boolean hasReferences() { /** * Create a {@link LookupShardContext} for a locally allocated {@link ShardId}. */ - public interface CreateShardContext { + public interface LookupShardContextFactory { LookupShardContext create(ShardId shardId) throws IOException; - static CreateShardContext fromSearchService(SearchService searchService) { + static LookupShardContextFactory fromSearchService(SearchService searchService) { return shardId -> { ShardSearchRequest shardSearchRequest = new ShardSearchRequest(shardId, 0, AliasFilter.EMPTY); return LookupShardContext.fromSearchContext( diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/EnrichLookupService.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/EnrichLookupService.java index f9ad74b71bef5..acb4206ad7af8 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/EnrichLookupService.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/EnrichLookupService.java @@ -47,7 +47,7 @@ public class EnrichLookupService extends AbstractLookupService { MapperServiceTestCase mapperHelper = new MapperServiceTestCase() { };