[Rename] refactor client/rest module. (#310)

Renames `org.elasticsearch.client` to `org.opensearch.client` in package names and references.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
This commit is contained in:
Rabi Panda 2021-03-15 16:31:09 -07:00 committed by Nick Knize
parent 0f74cbed1c
commit 43c9b2425e
103 changed files with 218 additions and 240 deletions

View File

@ -23,9 +23,9 @@ import org.apache.http.HttpHost;
import org.apache.http.HttpStatus;
import org.apache.http.message.BasicHeader;
import org.opensearch.OpenSearchException;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.client.RestClient;
import org.opensearch.client.benchmark.AbstractBenchmark;
import org.opensearch.client.benchmark.ops.bulk.BulkRequestExecutor;
import org.opensearch.client.benchmark.ops.search.SearchRequestExecutor;

View File

@ -48,9 +48,9 @@ import org.opensearch.action.support.replication.ReplicationResponse;
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.Response;
import org.opensearch.client.Request;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.Response;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.RethrottleRequest;
import org.elasticsearch.client.core.GetSourceRequest;

View File

@ -30,7 +30,7 @@ import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRespons
import org.opensearch.action.support.ActiveShardCount;
import org.opensearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
import org.elasticsearch.client.RequestOptions;
import org.opensearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.cluster.RemoteConnectionInfo;
import org.elasticsearch.client.cluster.RemoteInfoRequest;

View File

@ -54,7 +54,7 @@ import org.opensearch.action.support.IndicesOptions;
import org.opensearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
import org.elasticsearch.client.GetAliasesResponse;
import org.elasticsearch.client.RequestOptions;
import org.opensearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.SyncedFlushResponse;
import org.elasticsearch.client.indices.AnalyzeRequest;

View File

@ -33,7 +33,7 @@ import org.elasticsearch.action.ingest.SimulatePipelineResponse;
import org.elasticsearch.action.ingest.SimulateProcessorResult;
import org.opensearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
import org.elasticsearch.client.RequestOptions;
import org.opensearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.opensearch.common.bytes.BytesArray;
import org.elasticsearch.common.unit.TimeValue;

View File

@ -21,8 +21,8 @@ package org.elasticsearch.client.documentation;
import org.apache.http.HttpHost;
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.core.MainResponse;

View File

@ -43,10 +43,10 @@ import org.elasticsearch.action.search.ShardSearchFailure;
import org.opensearch.action.support.IndicesOptions;
import org.opensearch.action.support.WriteRequest;
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Request;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.Response;
import org.opensearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.core.CountRequest;
import org.elasticsearch.client.core.CountResponse;

View File

@ -41,9 +41,9 @@ import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusRespo
import org.opensearch.action.support.IndicesOptions;
import org.opensearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.Response;
import org.opensearch.client.Request;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.Response;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.indices.CreateIndexRequest;
import org.opensearch.cluster.SnapshotsInProgress;

View File

@ -27,7 +27,7 @@ import org.opensearch.action.admin.cluster.storedscripts.GetStoredScriptResponse
import org.opensearch.action.admin.cluster.storedscripts.PutStoredScriptRequest;
import org.opensearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
import org.elasticsearch.client.RequestOptions;
import org.opensearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.opensearch.common.bytes.BytesArray;
import org.opensearch.common.bytes.BytesReference;

View File

@ -27,7 +27,7 @@ import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksRequest;
import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
import org.opensearch.action.admin.cluster.node.tasks.list.TaskGroup;
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
import org.elasticsearch.client.RequestOptions;
import org.opensearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.tasks.CancelTasksRequest;
import org.elasticsearch.client.tasks.CancelTasksResponse;

View File

@ -18,14 +18,14 @@ import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
* specific language governing permissions and limitations
* under the License.
*/
apply plugin: 'elasticsearch.build'
apply plugin: 'elasticsearch.publish'
apply plugin: 'opensearch.build'
apply plugin: 'opensearch.publish'
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
group = 'org.elasticsearch.client'
archivesBaseName = 'elasticsearch-rest-client'
group = 'org.opensearch.client'
archivesBaseName = 'opensearch-rest-client'
dependencies {
api "org.apache.httpcomponents:httpclient:${versions.httpclient}"
@ -39,8 +39,8 @@ dependencies {
testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testImplementation "junit:junit:${versions.junit}"
testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"
testImplementation "org.elasticsearch:securemock:${versions.securemock}"
testImplementation "org.elasticsearch:mocksocket:${versions.mocksocket}"
testImplementation "org.opensearch:securemock:${versions.securemock}"
testImplementation "org.opensearch:mocksocket:${versions.mocksocket}"
}
tasks.withType(CheckForbiddenApis).configureEach {
@ -59,14 +59,14 @@ tasks.named('forbiddenApisTest').configure {
}
// JarHell is part of es server, which we don't want to pull in
// TODO: Not anymore. Now in :libs:elasticsearch-core
// TODO: Not anymore. Now in :libs:opensearch-core
jarHell.enabled = false
testingConventions {
naming.clear()
naming {
Tests {
baseClass 'org.elasticsearch.client.RestClientTestCase'
baseClass 'org.opensearch.client.RestClientTestCase'
}
}
}

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.client.methods.AbstractExecutionAwareRequest;
import org.apache.http.client.methods.HttpRequestBase;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import java.util.Iterator;
import java.util.List;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.ContentTooLongException;
import org.apache.http.HttpEntity;

View File

@ -17,12 +17,12 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpResponse;
import org.apache.http.nio.protocol.HttpAsyncResponseConsumer;
import static org.elasticsearch.client.HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory.DEFAULT_BUFFER_LIMIT;
import static org.opensearch.client.HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory.DEFAULT_BUFFER_LIMIT;
/**
* Factory used to create instances of {@link HttpAsyncResponseConsumer}. Each request retry needs its own instance of the

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
import org.apache.http.client.methods.HttpGet;
@ -38,4 +38,4 @@ final class HttpGetWithEntity extends HttpEntityEnclosingRequestBase {
public String getMethod() {
return METHOD_NAME;
}
}
}

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpHost;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import java.util.Iterator;

View File

@ -19,7 +19,7 @@
*
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import java.util.Iterator;
import java.util.List;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpEntity;
import org.apache.http.entity.ContentType;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -17,13 +17,13 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.Header;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.message.BasicHeader;
import org.apache.http.nio.protocol.HttpAsyncResponseConsumer;
import org.elasticsearch.client.HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory;
import org.opensearch.client.HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory;
import java.util.ArrayList;
import java.util.Collections;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
@ -33,7 +33,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Holds an elasticsearch response. It wraps the {@link HttpResponse} returned and associates it with
* Holds an opensearch response. It wraps the {@link HttpResponse} returned and associates it with
* its corresponding {@link RequestLine} and {@link HttpHost}.
*/
public class Response {

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpEntity;
import org.apache.http.entity.BufferedHttpEntity;
@ -27,7 +27,7 @@ import java.io.IOException;
import java.util.Locale;
/**
* Exception thrown when an elasticsearch node responds to a request with a status code that indicates an error.
* Exception thrown when an opensearch node responds to a request with a status code that indicates an error.
* Holds the response that was returned.
*/
public final class ResponseException extends IOException {

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
/**
* Listener to be provided when calling async performRequest methods provided by {@link RestClient}.

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.Header;
import org.apache.http.client.config.RequestConfig;

View File

@ -17,11 +17,11 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import java.io.IOException;
import static org.elasticsearch.client.ResponseException.buildMessage;
import static org.opensearch.client.ResponseException.buildMessage;
/**
* This exception is used to indicate that one or more {@link Response#getWarnings()} exist

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import java.util.List;
@ -50,4 +50,4 @@ public interface WarningsHandler {
return "strict";
}
};
}
}

View File

@ -17,9 +17,8 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.opensearch.client.RestClientTestCase;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
@ -27,7 +27,6 @@ import org.apache.http.StatusLine;
import org.apache.http.message.BasicHttpResponse;
import org.apache.http.message.BasicRequestLine;
import org.apache.http.message.BasicStatusLine;
import org.opensearch.client.RestClientTestCase;
import java.util.concurrent.atomic.AtomicReference;

View File

@ -17,11 +17,10 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpHost;
import org.elasticsearch.client.Node.Roles;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.Node.Roles;
import java.util.ArrayList;
import java.util.Arrays;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.ContentTooLongException;
import org.apache.http.HttpEntity;
@ -32,7 +32,6 @@ import org.apache.http.nio.ContentDecoder;
import org.apache.http.nio.IOControl;
import org.apache.http.nio.protocol.HttpAsyncResponseConsumer;
import org.apache.http.protocol.HttpContext;
import org.opensearch.client.RestClientTestCase;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpHost;

View File

@ -17,11 +17,10 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpHost;
import org.elasticsearch.client.Node.Roles;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.Node.Roles;
import java.util.ArrayList;
import java.util.Collections;

View File

@ -17,11 +17,10 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpHost;
import org.elasticsearch.client.Node.Roles;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.Node.Roles;
import java.util.Arrays;
import java.util.Collections;

View File

@ -17,11 +17,10 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpHost;
import org.elasticsearch.client.Node.Roles;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.Node.Roles;
import java.util.ArrayList;
import java.util.Arrays;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
@ -40,7 +40,6 @@ import org.apache.http.message.BasicStatusLine;
import org.apache.http.nio.entity.NByteArrayEntity;
import org.apache.http.nio.entity.NStringEntity;
import org.apache.http.util.EntityUtils;
import org.opensearch.client.RestClientTestCase;
import java.io.ByteArrayInputStream;
import java.io.IOException;

View File

@ -17,12 +17,11 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.Header;
import org.apache.http.client.config.RequestConfig;
import org.elasticsearch.client.HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory;
import java.util.ArrayList;
import java.util.Collections;

View File

@ -17,15 +17,14 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpEntity;
import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.nio.entity.NStringEntity;
import org.elasticsearch.client.HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory;
import java.io.ByteArrayOutputStream;
import java.io.IOException;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
@ -32,7 +32,6 @@ import org.apache.http.message.BasicHttpResponse;
import org.apache.http.message.BasicRequestLine;
import org.apache.http.message.BasicStatusLine;
import org.apache.http.util.EntityUtils;
import org.opensearch.client.RestClientTestCase;
import java.io.ByteArrayInputStream;
import java.io.IOException;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
@ -27,7 +27,6 @@ import org.apache.http.HttpHost;
import org.elasticsearch.mocksocket.MockHttpServer;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.opensearch.client.RestClientTestCase;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;

View File

@ -17,14 +17,13 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.Header;
import org.apache.http.HttpHost;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.apache.http.message.BasicHeader;
import org.opensearch.client.RestClientTestCase;
import java.io.IOException;
import java.util.Base64;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
@ -30,7 +30,6 @@ import org.elasticsearch.mocksocket.MockHttpServer;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.opensearch.client.RestClientTestCase;
import java.io.ByteArrayOutputStream;
import java.io.IOException;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
@ -28,8 +28,6 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.RestClientTestUtil;
import java.io.IOException;
import java.net.ConnectException;

View File

@ -17,14 +17,13 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
import org.apache.http.Header;
import org.apache.http.HttpHost;
import org.apache.http.impl.nio.client.CloseableHttpAsyncClient;
import org.junit.After;
import org.opensearch.client.RestClientTestCase;
import java.io.IOException;
import java.util.ArrayList;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
@ -42,8 +42,6 @@ import org.apache.http.util.EntityUtils;
import org.elasticsearch.mocksocket.MockHttpServer;
import org.junit.After;
import org.junit.Before;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.RestClientTestUtil;
import java.io.IOException;
import java.io.InputStreamReader;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -53,8 +53,6 @@ import org.junit.After;
import org.junit.Before;
import org.mockito.ArgumentCaptor;
import org.mockito.stubbing.Answer;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.RestClientTestUtil;
import javax.net.ssl.SSLHandshakeException;
import java.io.IOException;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client;
package org.opensearch.client;
import org.apache.http.Header;
import org.apache.http.HttpHost;
@ -25,8 +25,7 @@ import org.apache.http.client.AuthCache;
import org.apache.http.impl.auth.BasicScheme;
import org.apache.http.impl.client.BasicAuthCache;
import org.apache.http.impl.nio.client.CloseableHttpAsyncClient;
import org.elasticsearch.client.RestClient.NodeTuple;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.RestClient.NodeTuple;
import java.io.IOException;
import java.net.URI;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.elasticsearch.client.documentation;
package org.opensearch.client.documentation;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
@ -36,17 +36,17 @@ import org.apache.http.nio.entity.NStringEntity;
import org.apache.http.ssl.SSLContextBuilder;
import org.apache.http.ssl.SSLContexts;
import org.apache.http.util.EntityUtils;
import org.elasticsearch.client.Cancellable;
import org.elasticsearch.client.HttpAsyncResponseConsumerFactory;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.NodeSelector;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseListener;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestClientBuilder.HttpClientConfigCallback;
import org.opensearch.client.Cancellable;
import org.opensearch.client.HttpAsyncResponseConsumerFactory;
import org.opensearch.client.Node;
import org.opensearch.client.NodeSelector;
import org.opensearch.client.Request;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseListener;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientBuilder;
import org.opensearch.client.RestClientBuilder.HttpClientConfigCallback;
import javax.net.ssl.SSLContext;
import java.io.IOException;

View File

@ -19,7 +19,7 @@
package org.opensearch.client.sniff;
import org.elasticsearch.client.Node;
import org.opensearch.client.Node;
import java.io.IOException;
import java.util.List;

View File

@ -26,11 +26,11 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.Node.Roles;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Node;
import org.opensearch.client.Node.Roles;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.client.RestClient;
import java.io.IOException;
import java.io.InputStream;

View File

@ -19,8 +19,8 @@
package org.opensearch.client.sniff;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Node;
import org.opensearch.client.RestClient;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;

View File

@ -21,9 +21,9 @@ package org.opensearch.client.sniff;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.opensearch.client.Node;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientBuilder;
import java.io.Closeable;
import java.io.IOException;

View File

@ -19,7 +19,7 @@
package org.opensearch.client.sniff;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.RestClient;
import java.util.Objects;
import java.util.concurrent.TimeUnit;

View File

@ -20,7 +20,7 @@
package org.opensearch.client.sniff;
import org.apache.http.HttpHost;
import org.elasticsearch.client.Node;
import org.opensearch.client.Node;
import java.util.Collections;
import java.util.List;

View File

@ -24,8 +24,8 @@ import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.InputStreamEntity;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.Node.Roles;
import org.opensearch.client.Node;
import org.opensearch.client.Node.Roles;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.sniff.OpenSearchNodesSniffer.Scheme;

View File

@ -30,10 +30,10 @@ import com.sun.net.httpserver.HttpServer;
import org.apache.http.Consts;
import org.apache.http.HttpHost;
import org.apache.http.client.methods.HttpGet;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Node;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientTestCase;
import org.elasticsearch.mocksocket.MockHttpServer;
import org.junit.After;

View File

@ -20,8 +20,8 @@
package org.opensearch.client.sniff;
import org.apache.http.HttpHost;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Node;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientTestCase;
import static org.junit.Assert.assertEquals;

View File

@ -21,7 +21,7 @@ package org.opensearch.client.sniff;
import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientTestCase;
import static org.junit.Assert.assertEquals;

View File

@ -20,8 +20,8 @@
package org.opensearch.client.sniff;
import org.apache.http.HttpHost;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Node;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientTestCase;
import org.opensearch.client.sniff.Sniffer.DefaultScheduler;
import org.opensearch.client.sniff.Sniffer.Scheduler;

View File

@ -20,8 +20,8 @@
package org.opensearch.client.sniff.documentation;
import org.apache.http.HttpHost;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Node;
import org.opensearch.client.RestClient;
import org.opensearch.client.sniff.OpenSearchNodesSniffer;
import org.opensearch.client.sniff.NodesSniffer;
import org.opensearch.client.sniff.SniffOnFailureListener;

View File

@ -19,8 +19,8 @@
package org.elasticsearch.test.rest;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import java.io.IOException;

View File

@ -19,9 +19,9 @@
package org.elasticsearch.test.rest;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.opensearch.common.Strings;
import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.opensearch.search.builder.SearchSourceBuilder;

View File

@ -19,8 +19,8 @@
package org.elasticsearch.test.rest;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.client.Request;
import org.opensearch.client.ResponseException;
import org.opensearch.client.Request;
import java.io.IOException;

View File

@ -22,10 +22,10 @@ package org.elasticsearch.test.rest;
import org.apache.http.util.EntityUtils;
import org.opensearch.action.ActionFuture;
import org.opensearch.action.support.PlainActionFuture;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.client.ResponseListener;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.opensearch.client.ResponseListener;
import org.junit.After;
import org.junit.Before;

View File

@ -20,7 +20,7 @@ package org.elasticsearch.docker.test;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.opensearch.OpenSearchException;
import org.elasticsearch.client.Request;
import org.opensearch.client.Request;
import org.elasticsearch.common.io.PathUtils;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;

View File

@ -22,8 +22,8 @@ package org.elasticsearch.kibana;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.apache.http.util.EntityUtils;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.test.rest.ESRestTestCase;

View File

@ -19,8 +19,8 @@
package org.opensearch.script.mustache;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.ResponseException;
import org.opensearch.client.Request;
import org.opensearch.client.ResponseException;
import org.elasticsearch.test.rest.ESRestTestCase;
import java.io.IOException;

View File

@ -19,7 +19,7 @@
package org.opensearch.index.reindex;
import org.elasticsearch.client.Request;
import org.opensearch.client.Request;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.junit.Before;

View File

@ -19,8 +19,8 @@
package org.opensearch.index.reindex;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.ResponseException;
import org.opensearch.client.Request;
import org.opensearch.client.ResponseException;
import org.elasticsearch.test.rest.ESRestTestCase;
import java.io.IOException;

View File

@ -22,9 +22,9 @@ package org.opensearch.index.reindex.remote;
import org.apache.http.HttpHost;
import org.apache.http.util.EntityUtils;
import org.apache.lucene.util.Constants;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.client.RestClient;
import org.elasticsearch.common.Booleans;
import org.elasticsearch.test.rest.ESRestTestCase;

View File

@ -36,8 +36,8 @@ import org.opensearch.action.bulk.BulkItemResponse;
import org.elasticsearch.action.index.IndexRequest;
import org.opensearch.client.Client;
import org.opensearch.client.ParentTaskAssigningClient;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientBuilder;
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.Strings;
import org.opensearch.common.bytes.BytesReference;

View File

@ -24,7 +24,7 @@ import org.apache.http.nio.entity.NStringEntity;
import org.opensearch.OpenSearchException;
import org.opensearch.Version;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.client.Request;
import org.opensearch.client.Request;
import org.opensearch.common.Strings;
import org.opensearch.common.bytes.BytesReference;
import org.elasticsearch.common.logging.DeprecationLogger;

View File

@ -31,10 +31,10 @@ import org.opensearch.OpenSearchStatusException;
import org.opensearch.Version;
import org.opensearch.action.bulk.BackoffPolicy;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.client.ResponseListener;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Request;
import org.opensearch.client.ResponseException;
import org.opensearch.client.ResponseListener;
import org.opensearch.client.RestClient;
import org.elasticsearch.common.Nullable;
import org.opensearch.common.Strings;
import org.opensearch.common.bytes.BytesReference;

View File

@ -19,7 +19,7 @@
package org.opensearch.index.reindex;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilderTestCase;
import org.opensearch.common.bytes.BytesArray;
import org.opensearch.common.bytes.BytesReference;

View File

@ -23,9 +23,9 @@ import com.sun.net.httpserver.HttpsConfigurator;
import com.sun.net.httpserver.HttpsExchange;
import com.sun.net.httpserver.HttpsParameters;
import com.sun.net.httpserver.HttpsServer;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.client.RestClient;
import org.elasticsearch.common.SuppressForbidden;
import org.opensearch.common.bytes.BytesArray;
import org.elasticsearch.common.io.PathUtils;

View File

@ -23,7 +23,7 @@ import org.apache.http.HttpEntity;
import org.apache.http.entity.ContentType;
import org.opensearch.Version;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.client.Request;
import org.opensearch.client.Request;
import org.opensearch.common.bytes.BytesArray;
import org.opensearch.common.bytes.BytesReference;
import org.elasticsearch.common.io.Streams;

View File

@ -41,8 +41,8 @@ import org.opensearch.OpenSearchStatusException;
import org.opensearch.Version;
import org.opensearch.action.bulk.BackoffPolicy;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.client.HeapBufferedAsyncResponseConsumer;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.HeapBufferedAsyncResponseConsumer;
import org.opensearch.client.RestClient;
import org.opensearch.common.ParsingException;
import org.opensearch.common.bytes.BytesArray;
import org.elasticsearch.common.io.FileSystemUtils;

View File

@ -24,8 +24,8 @@ import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.apache.http.HttpEntity;
import org.apache.http.entity.ContentType;
import org.apache.http.nio.entity.NStringEntity;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.common.Strings;
import org.elasticsearch.common.io.PathUtils;
import org.elasticsearch.common.settings.Settings;

View File

@ -23,11 +23,11 @@ import org.apache.http.HttpHost;
import org.opensearch.OpenSearchNetty4IntegTestCase;
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
import org.opensearch.client.Client;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.client.RestClient;
import org.opensearch.client.Node;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.opensearch.client.RestClient;
import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.routing.UnassignedInfo;
import org.opensearch.common.Priority;

View File

@ -19,10 +19,10 @@
package org.opensearch.rest;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
import org.opensearch.client.Request;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeValue;

View File

@ -19,8 +19,8 @@
package org.opensearch.rest;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.common.Strings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.test.rest.ESRestTestCase;

View File

@ -62,8 +62,8 @@ import org.opensearch.client.AdminClient;
import org.opensearch.client.Client;
import org.opensearch.client.ClusterAdminClient;
import org.opensearch.client.Requests;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientBuilder;
import org.opensearch.client.transport.TransportClient;
import org.opensearch.cluster.ClusterModule;
import org.opensearch.cluster.ClusterState;

View File

@ -32,14 +32,14 @@ import org.apache.lucene.util.SetOnce;
import org.opensearch.Version;
import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksAction;
import org.opensearch.action.admin.cluster.repositories.put.PutRepositoryRequest;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RequestOptions.Builder;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.WarningsHandler;
import org.opensearch.client.Request;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.RequestOptions.Builder;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientBuilder;
import org.opensearch.client.WarningsHandler;
import org.elasticsearch.common.CheckedRunnable;
import org.opensearch.common.Strings;
import org.elasticsearch.common.io.PathUtils;

View File

@ -22,12 +22,12 @@ package org.elasticsearch.test.rest.yaml;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.opensearch.Version;
import org.elasticsearch.client.NodeSelector;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.opensearch.client.NodeSelector;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientBuilder;
import org.opensearch.common.CheckedSupplier;
import org.elasticsearch.test.rest.yaml.restspec.ClientYamlSuiteRestSpec;

View File

@ -27,14 +27,14 @@ import org.apache.http.util.EntityUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.Version;
import org.elasticsearch.client.NodeSelector;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.WarningsHandler;
import org.opensearch.client.NodeSelector;
import org.opensearch.client.Request;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientBuilder;
import org.opensearch.client.WarningsHandler;
import org.opensearch.common.CheckedSupplier;
import org.elasticsearch.test.rest.yaml.restspec.ClientYamlSuiteRestApi;
import org.elasticsearch.test.rest.yaml.restspec.ClientYamlSuiteRestSpec;

View File

@ -27,7 +27,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.lucene.util.BytesRef;
import org.opensearch.Version;
import org.elasticsearch.client.NodeSelector;
import org.opensearch.client.NodeSelector;
import org.opensearch.common.bytes.BytesReference;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;

View File

@ -21,7 +21,7 @@ package org.elasticsearch.test.rest.yaml;
import org.apache.http.Header;
import org.apache.http.client.methods.HttpHead;
import org.apache.http.util.EntityUtils;
import org.elasticsearch.client.Response;
import org.opensearch.client.Response;
import org.opensearch.common.Strings;
import org.opensearch.common.bytes.BytesArray;
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.test.rest.yaml;
import org.elasticsearch.client.ResponseException;
import org.opensearch.client.ResponseException;
import java.io.IOException;

View File

@ -24,13 +24,13 @@ import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.http.HttpHost;
import org.apache.lucene.util.TimeUnits;
import org.opensearch.Version;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.WarningsHandler;
import org.opensearch.client.Node;
import org.opensearch.client.Request;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.Response;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientBuilder;
import org.opensearch.client.WarningsHandler;
import org.opensearch.client.sniff.OpenSearchNodesSniffer;
import org.opensearch.common.Strings;
import org.elasticsearch.common.collect.Tuple;

View File

@ -19,9 +19,9 @@
package org.elasticsearch.test.rest.yaml;
import org.apache.http.util.EntityUtils;
import org.elasticsearch.client.Response;
import org.opensearch.common.bytes.BytesArray;
import org.opensearch.common.bytes.BytesReference;
import org.opensearch.client.Response;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.xcontent.DeprecationHandler;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.common.xcontent.XContent;

View File

@ -24,7 +24,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.elasticsearch.client.NodeSelector;
import org.opensearch.client.NodeSelector;
import static java.util.Collections.unmodifiableMap;

View File

@ -18,7 +18,7 @@
*/
package org.elasticsearch.test.rest.yaml.section;
import org.elasticsearch.client.NodeSelector;
import org.opensearch.client.NodeSelector;
import org.opensearch.common.ParsingException;
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;

View File

@ -22,9 +22,9 @@ package org.elasticsearch.test.rest.yaml.section;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.Version;
import org.elasticsearch.client.HasAttributeNodeSelector;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.NodeSelector;
import org.opensearch.client.HasAttributeNodeSelector;
import org.opensearch.client.Node;
import org.opensearch.client.NodeSelector;
import org.opensearch.common.ParsingException;
import org.opensearch.common.Strings;
import org.elasticsearch.common.collect.Tuple;

View File

@ -20,7 +20,7 @@
package org.elasticsearch.upgrades;
import org.opensearch.Version;
import org.elasticsearch.client.Request;
import org.opensearch.client.Request;
import org.elasticsearch.common.Booleans;
import org.opensearch.common.Strings;
import org.elasticsearch.common.xcontent.XContentBuilder;

View File

@ -20,7 +20,7 @@
package org.elasticsearch.test.rest;
import org.opensearch.Version;
import org.elasticsearch.client.WarningsHandler;
import org.opensearch.client.WarningsHandler;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.rest.ESRestTestCase.VersionSensitiveWarningsHandler;

Some files were not shown because too many files have changed in this diff Show More