Skip to content

Commit fad271b

Browse files
linting for all changed files
1 parent a57c470 commit fad271b

File tree

45 files changed

+283
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+283
-96
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/search/SparseVectorQueryBuilder.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.elasticsearch.xcontent.XContentBuilder;
3232
import org.elasticsearch.xcontent.XContentParser;
3333
import org.elasticsearch.xpack.core.ml.action.CoordinatedInferenceAction;
34-
import org.elasticsearch.xpack.core.ml.action.InferModelAction;
3534
import org.elasticsearch.xpack.core.ml.inference.TrainedModelPrefixStrings;
3635
import org.elasticsearch.xpack.core.ml.inference.results.TextExpansionResults;
3736
import org.elasticsearch.xpack.core.ml.inference.results.WarningInferenceResults;

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/search/TextExpansionQueryBuilder.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.elasticsearch.xcontent.XContentBuilder;
2929
import org.elasticsearch.xcontent.XContentParser;
3030
import org.elasticsearch.xpack.core.ml.action.CoordinatedInferenceAction;
31-
import org.elasticsearch.xpack.core.ml.action.InferModelAction;
3231
import org.elasticsearch.xpack.core.ml.inference.TrainedModelPrefixStrings;
3332
import org.elasticsearch.xpack.core.ml.inference.results.TextExpansionResults;
3433
import org.elasticsearch.xpack.core.ml.inference.results.WarningInferenceResults;

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/vectors/TextEmbeddingQueryVectorBuilder.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.elasticsearch.xcontent.XContentBuilder;
2020
import org.elasticsearch.xcontent.XContentParser;
2121
import org.elasticsearch.xpack.core.ml.action.CoordinatedInferenceAction;
22-
import org.elasticsearch.xpack.core.ml.action.InferModelAction;
2322
import org.elasticsearch.xpack.core.ml.inference.TrainedModelConfig;
2423
import org.elasticsearch.xpack.core.ml.inference.TrainedModelPrefixStrings;
2524
import org.elasticsearch.xpack.core.ml.inference.results.MlTextEmbeddingResults;

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferencePlugin.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,7 @@ public Collection<?> createComponents(PluginServices services) {
266266
throttlerManager.init(services.clusterService());
267267

268268
var truncator = new Truncator(settings, services.clusterService());
269-
serviceComponents.set(
270-
new ServiceComponents(services.threadPool(), throttlerManager, settings, truncator)
271-
);
269+
serviceComponents.set(new ServiceComponents(services.threadPool(), throttlerManager, settings, truncator));
272270
threadPoolSetOnce.set(services.threadPool());
273271

274272
var httpClientManager = HttpClientManager.create(settings, services.threadPool(), services.clusterService(), throttlerManager);

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/SenderService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ public abstract class SenderService implements InferenceService {
4747
private final ServiceComponents serviceComponents;
4848
private final ClusterService clusterService;
4949

50-
public SenderService(HttpRequestSender.Factory factory, ServiceComponents serviceComponents, InferenceServiceExtension.InferenceServiceFactoryContext context) {
50+
public SenderService(
51+
HttpRequestSender.Factory factory,
52+
ServiceComponents serviceComponents,
53+
InferenceServiceExtension.InferenceServiceFactoryContext context
54+
) {
5155
Objects.requireNonNull(factory);
5256
sender = factory.createSender();
5357
this.serviceComponents = Objects.requireNonNull(serviceComponents);

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/ServiceComponents.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,4 @@
1515
/**
1616
* A container for common components need at various levels of the inference services to instantiate their internals
1717
*/
18-
public record ServiceComponents(
19-
ThreadPool threadPool,
20-
ThrottlerManager throttlerManager,
21-
Settings settings,
22-
Truncator truncator
23-
) {}
18+
public record ServiceComponents(ThreadPool threadPool, ThrottlerManager throttlerManager, Settings settings, Truncator truncator) {}

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/alibabacloudsearch/AlibabaCloudSearchService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ public class AlibabaCloudSearchService extends SenderService {
8686
InputType.INTERNAL_SEARCH
8787
);
8888

89-
public AlibabaCloudSearchService(HttpRequestSender.Factory factory, ServiceComponents serviceComponents, InferenceServiceExtension.InferenceServiceFactoryContext context) {
89+
public AlibabaCloudSearchService(
90+
HttpRequestSender.Factory factory,
91+
ServiceComponents serviceComponents,
92+
InferenceServiceExtension.InferenceServiceFactoryContext context
93+
) {
9094
super(factory, serviceComponents, context);
9195
}
9296

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/anthropic/AnthropicService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ public class AnthropicService extends SenderService {
5959

6060
private static final EnumSet<TaskType> supportedTaskTypes = EnumSet.of(TaskType.COMPLETION);
6161

62-
public AnthropicService(HttpRequestSender.Factory factory, ServiceComponents serviceComponents, InferenceServiceExtension.InferenceServiceFactoryContext context) {
62+
public AnthropicService(
63+
HttpRequestSender.Factory factory,
64+
ServiceComponents serviceComponents,
65+
InferenceServiceExtension.InferenceServiceFactoryContext context
66+
) {
6367
super(factory, serviceComponents, context);
6468
}
6569

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/azureaistudio/AzureAiStudioService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ public class AzureAiStudioService extends SenderService {
8484
InputType.INTERNAL_SEARCH
8585
);
8686

87-
public AzureAiStudioService(HttpRequestSender.Factory factory, ServiceComponents serviceComponents, InferenceServiceExtension.InferenceServiceFactoryContext context) {
87+
public AzureAiStudioService(
88+
HttpRequestSender.Factory factory,
89+
ServiceComponents serviceComponents,
90+
InferenceServiceExtension.InferenceServiceFactoryContext context
91+
) {
8892
super(factory, serviceComponents, context);
8993
}
9094

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/azureopenai/AzureOpenAiService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ public class AzureOpenAiService extends SenderService {
7070
private static final String SERVICE_NAME = "Azure OpenAI";
7171
private static final EnumSet<TaskType> supportedTaskTypes = EnumSet.of(TaskType.TEXT_EMBEDDING, TaskType.COMPLETION);
7272

73-
public AzureOpenAiService(HttpRequestSender.Factory factory, ServiceComponents serviceComponents, InferenceServiceExtension.InferenceServiceFactoryContext context) {
73+
public AzureOpenAiService(
74+
HttpRequestSender.Factory factory,
75+
ServiceComponents serviceComponents,
76+
InferenceServiceExtension.InferenceServiceFactoryContext context
77+
) {
7478
super(factory, serviceComponents, context);
7579
}
7680

0 commit comments

Comments
 (0)