From 0a32e7aaaa169bef96eeebf48902ec91b1a3093c Mon Sep 17 00:00:00 2001 From: Kaituo Li Date: Tue, 28 Nov 2023 10:32:41 -0800 Subject: [PATCH] rename class and remove unused code Signed-off-by: Kaituo Li --- .../src/main/scala/org/opensearch/flint/core/FlintClient.java | 1 - .../opensearch/flint/core/storage/FlintOpenSearchClient.java | 2 +- .../{TimeoutConfigurator.java => RequestConfigurator.java} | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) rename flint-core/src/main/scala/org/opensearch/flint/core/storage/{TimeoutConfigurator.java => RequestConfigurator.java} (86%) diff --git a/flint-core/src/main/scala/org/opensearch/flint/core/FlintClient.java b/flint-core/src/main/scala/org/opensearch/flint/core/FlintClient.java index 6dc31838a..6cdf5187d 100644 --- a/flint-core/src/main/scala/org/opensearch/flint/core/FlintClient.java +++ b/flint-core/src/main/scala/org/opensearch/flint/core/FlintClient.java @@ -5,7 +5,6 @@ package org.opensearch.flint.core; -import java.security.KeyManagementException; import java.util.List; import org.opensearch.client.RestHighLevelClient; diff --git a/flint-core/src/main/scala/org/opensearch/flint/core/storage/FlintOpenSearchClient.java b/flint-core/src/main/scala/org/opensearch/flint/core/storage/FlintOpenSearchClient.java index 59e030d8e..22badfbf9 100644 --- a/flint-core/src/main/scala/org/opensearch/flint/core/storage/FlintOpenSearchClient.java +++ b/flint-core/src/main/scala/org/opensearch/flint/core/storage/FlintOpenSearchClient.java @@ -272,7 +272,7 @@ public RestHighLevelClient createClient() { RetryableHttpAsyncClient.builder(delegate, options)); } - final TimeoutConfigurator callback = new TimeoutConfigurator(options); + final RequestConfigurator callback = new RequestConfigurator(options); restClientBuilder.setRequestConfigCallback(callback); return new RestHighLevelClient(restClientBuilder); diff --git a/flint-core/src/main/scala/org/opensearch/flint/core/storage/TimeoutConfigurator.java b/flint-core/src/main/scala/org/opensearch/flint/core/storage/RequestConfigurator.java similarity index 86% rename from flint-core/src/main/scala/org/opensearch/flint/core/storage/TimeoutConfigurator.java rename to flint-core/src/main/scala/org/opensearch/flint/core/storage/RequestConfigurator.java index 79a3fc77b..b704773d3 100644 --- a/flint-core/src/main/scala/org/opensearch/flint/core/storage/TimeoutConfigurator.java +++ b/flint-core/src/main/scala/org/opensearch/flint/core/storage/RequestConfigurator.java @@ -12,11 +12,11 @@ /** * allows override default socket timeout in RestClientBuilder.DEFAULT_SOCKET_TIMEOUT_MILLIS */ -public class TimeoutConfigurator implements RestClientBuilder.RequestConfigCallback { +public class RequestConfigurator implements RestClientBuilder.RequestConfigCallback { private final FlintOptions options; - public TimeoutConfigurator(FlintOptions options) { + public RequestConfigurator(FlintOptions options) { this.options = options; }