[Rename] Rename files under three server sub folders (#195)
Refactor below three folders as part of the Elasticsearch to OpenSearch renaming effort. . server/src/internalClusterTest . server/src/main/java11 . server/src/main/resources . rest-api-spec Signed-off-by: Harold Wang <harowang@amazon.com>
This commit is contained in:
parent
ad8ecf08dc
commit
a71f725dd8
|
@ -17,14 +17,14 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.test.rest;
|
||||
package org.opensearch.test.rest;
|
||||
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
|
||||
import org.apache.lucene.util.TimeUnits;
|
||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
import org.opensearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.opensearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
|
||||
/** Rest integration test. Runs against a cluster started by {@code gradle integTest} */
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action;
|
||||
package org.opensearch.action;
|
||||
|
||||
import org.opensearch.action.admin.indices.alias.Alias;
|
||||
import org.opensearch.action.admin.indices.analyze.AnalyzeAction;
|
||||
|
@ -53,50 +53,51 @@ import org.opensearch.action.admin.indices.stats.IndicesStatsAction;
|
|||
import org.opensearch.action.admin.indices.stats.IndicesStatsRequest;
|
||||
import org.opensearch.action.admin.indices.validate.query.ValidateQueryAction;
|
||||
import org.opensearch.action.admin.indices.validate.query.ValidateQueryRequest;
|
||||
import org.elasticsearch.action.bulk.BulkAction;
|
||||
import org.elasticsearch.action.bulk.BulkRequest;
|
||||
import org.elasticsearch.action.delete.DeleteRequest;
|
||||
import org.elasticsearch.action.explain.ExplainAction;
|
||||
import org.elasticsearch.action.explain.ExplainRequest;
|
||||
import org.elasticsearch.action.fieldcaps.FieldCapabilitiesAction;
|
||||
import org.elasticsearch.action.fieldcaps.FieldCapabilitiesRequest;
|
||||
import org.elasticsearch.action.get.GetAction;
|
||||
import org.elasticsearch.action.get.GetRequest;
|
||||
import org.elasticsearch.action.get.MultiGetAction;
|
||||
import org.elasticsearch.action.get.MultiGetRequest;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchTransportService;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
import org.elasticsearch.action.support.replication.TransportReplicationActionTests;
|
||||
import org.elasticsearch.action.termvectors.MultiTermVectorsAction;
|
||||
import org.elasticsearch.action.termvectors.MultiTermVectorsRequest;
|
||||
import org.elasticsearch.action.termvectors.TermVectorsAction;
|
||||
import org.elasticsearch.action.termvectors.TermVectorsRequest;
|
||||
import org.elasticsearch.action.update.UpdateAction;
|
||||
import org.elasticsearch.action.update.UpdateRequest;
|
||||
import org.elasticsearch.action.update.UpdateResponse;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.concurrent.ThreadContext;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.plugins.NetworkPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.plugins.PluginsService;
|
||||
import org.elasticsearch.script.MockScriptPlugin;
|
||||
import org.elasticsearch.script.Script;
|
||||
import org.elasticsearch.script.ScriptType;
|
||||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.elasticsearch.transport.TransportChannel;
|
||||
import org.elasticsearch.transport.TransportInterceptor;
|
||||
import org.elasticsearch.transport.TransportRequest;
|
||||
import org.elasticsearch.transport.TransportRequestHandler;
|
||||
import org.opensearch.action.bulk.BulkAction;
|
||||
import org.opensearch.action.bulk.BulkRequest;
|
||||
import org.opensearch.action.delete.DeleteRequest;
|
||||
import org.opensearch.action.explain.ExplainAction;
|
||||
import org.opensearch.action.explain.ExplainRequest;
|
||||
import org.opensearch.action.fieldcaps.FieldCapabilitiesAction;
|
||||
import org.opensearch.action.fieldcaps.FieldCapabilitiesRequest;
|
||||
import org.opensearch.action.get.GetAction;
|
||||
import org.opensearch.action.get.GetRequest;
|
||||
import org.opensearch.action.get.MultiGetAction;
|
||||
import org.opensearch.action.get.MultiGetRequest;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.action.search.SearchRequest;
|
||||
import org.opensearch.action.search.SearchResponse;
|
||||
import org.opensearch.action.search.SearchTransportService;
|
||||
import org.opensearch.action.search.SearchType;
|
||||
import org.opensearch.action.support.replication.TransportReplicationActionTests;
|
||||
import org.opensearch.action.termvectors.MultiTermVectorsAction;
|
||||
import org.opensearch.action.termvectors.MultiTermVectorsRequest;
|
||||
import org.opensearch.action.termvectors.TermVectorsAction;
|
||||
import org.opensearch.action.termvectors.TermVectorsRequest;
|
||||
import org.opensearch.action.update.UpdateAction;
|
||||
import org.opensearch.action.update.UpdateRequest;
|
||||
import org.opensearch.action.update.UpdateResponse;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.util.concurrent.ThreadContext;
|
||||
import org.opensearch.index.query.QueryBuilders;
|
||||
import org.opensearch.plugins.NetworkPlugin;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.plugins.PluginsService;
|
||||
import org.opensearch.script.MockScriptPlugin;
|
||||
import org.opensearch.script.Script;
|
||||
import org.opensearch.script.ScriptType;
|
||||
import org.opensearch.tasks.Task;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
import org.opensearch.transport.TransportChannel;
|
||||
import org.opensearch.transport.TransportInterceptor;
|
||||
import org.opensearch.transport.TransportRequest;
|
||||
import org.opensearch.transport.TransportRequestHandler;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.opensearch.action.DocWriteResponse;
|
||||
|
@ -113,15 +114,15 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures;
|
||||
import static org.hamcrest.Matchers.emptyIterable;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
import static org.hamcrest.Matchers.hasItem;
|
||||
|
||||
@ClusterScope(scope = Scope.SUITE, numClientNodes = 1, minNumDataNodes = 2)
|
||||
public class IndicesRequestIT extends ESIntegTestCase {
|
||||
public class IndicesRequestIT extends OpenSearchIntegTestCase {
|
||||
|
||||
private final List<String> indices = new ArrayList<>();
|
||||
|
|
@ -17,20 +17,19 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action;
|
||||
package org.opensearch.action;
|
||||
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.client.transport.TransportClient;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.client.transport.TransportClient;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class ListenerActionIT extends ESIntegTestCase {
|
||||
public class ListenerActionIT extends OpenSearchIntegTestCase {
|
||||
public void testThreadedListeners() throws Throwable {
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
final AtomicReference<Throwable> failure = new AtomicReference<>();
|
|
@ -17,20 +17,18 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action;
|
||||
package org.opensearch.action;
|
||||
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.action.search.SearchPhaseExecutionException;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
import org.elasticsearch.action.search.ShardSearchFailure;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.LatchedActionListener;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.action.search.SearchPhaseExecutionException;
|
||||
import org.opensearch.action.search.SearchResponse;
|
||||
import org.opensearch.action.search.SearchType;
|
||||
import org.opensearch.action.search.ShardSearchFailure;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.opensearch.index.query.QueryBuilders;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
@ -40,8 +38,8 @@ import static org.hamcrest.Matchers.anyOf;
|
|||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 2)
|
||||
public class RejectionActionIT extends ESIntegTestCase {
|
||||
@ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 2)
|
||||
public class RejectionActionIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Settings nodeSettings(int nodeOrdinal) {
|
|
@ -16,15 +16,15 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.action.admin;
|
||||
package org.opensearch.action.admin;
|
||||
|
||||
import org.apache.lucene.util.Constants;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.admin.cluster.node.hotthreads.NodeHotThreads;
|
||||
import org.opensearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRequestBuilder;
|
||||
import org.opensearch.action.admin.cluster.node.hotthreads.NodesHotThreadsResponse;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.hamcrest.Matcher;
|
||||
|
||||
import java.util.Map;
|
||||
|
@ -32,10 +32,10 @@ import java.util.concurrent.CountDownLatch;
|
|||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.opensearch.index.query.QueryBuilders.boolQuery;
|
||||
import static org.opensearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.opensearch.index.query.QueryBuilders.termQuery;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.notNullValue;
|
||||
|
@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.lessThan;
|
|||
import static org.hamcrest.Matchers.not;
|
||||
import static org.hamcrest.collection.IsEmptyCollection.empty;
|
||||
|
||||
public class HotThreadsIT extends ESIntegTestCase {
|
||||
public class HotThreadsIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testHotThreadsDontFail() throws ExecutionException, InterruptedException {
|
||||
/**
|
||||
|
@ -142,7 +142,7 @@ public class HotThreadsIT extends ESIntegTestCase {
|
|||
NodesHotThreadsResponse response = builder.execute().get();
|
||||
|
||||
final Matcher<String> containsCachedTimeThreadRunMethod
|
||||
= containsString("org.elasticsearch.threadpool.ThreadPool$CachedTimeThread.run");
|
||||
= containsString("org.opensearch.threadpool.ThreadPool$CachedTimeThread.run");
|
||||
|
||||
int totSizeAll = 0;
|
||||
for (NodeHotThreads node : response.getNodesMap().values()) {
|
|
@ -17,22 +17,22 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin;
|
||||
package org.opensearch.action.admin;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.admin.cluster.node.reload.NodesReloadSecureSettingsResponse;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.settings.KeyStoreWrapper;
|
||||
import org.elasticsearch.common.settings.SecureSettings;
|
||||
import org.elasticsearch.common.settings.SecureString;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.plugins.PluginsService;
|
||||
import org.elasticsearch.plugins.ReloadablePlugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.transport.RemoteTransportException;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.settings.KeyStoreWrapper;
|
||||
import org.opensearch.common.settings.SecureSettings;
|
||||
import org.opensearch.common.settings.SecureString;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.plugins.PluginsService;
|
||||
import org.opensearch.plugins.ReloadablePlugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.transport.RemoteTransportException;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
|
@ -52,8 +52,8 @@ import static org.hamcrest.Matchers.instanceOf;
|
|||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(minNumDataNodes = 2)
|
||||
public class ReloadSecureSettingsIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2)
|
||||
public class ReloadSecureSettingsIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testMissingKeystoreFile() throws Exception {
|
||||
final PluginsService pluginsService = internalCluster().getInstance(PluginsService.class);
|
|
@ -17,38 +17,37 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.cluster.allocation;
|
||||
package org.opensearch.action.admin.cluster.allocation;
|
||||
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
import org.elasticsearch.cluster.ClusterInfo;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.routing.ShardRoutingState;
|
||||
import org.elasticsearch.cluster.routing.UnassignedInfo;
|
||||
import org.elasticsearch.cluster.routing.UnassignedInfo.AllocationStatus;
|
||||
import org.elasticsearch.cluster.routing.UnassignedInfo.Reason;
|
||||
import org.elasticsearch.cluster.routing.allocation.AllocateUnassignedDecision;
|
||||
import org.elasticsearch.cluster.routing.allocation.AllocationDecision;
|
||||
import org.elasticsearch.cluster.routing.allocation.MoveDecision;
|
||||
import org.elasticsearch.cluster.routing.allocation.NodeAllocationResult;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.Decision;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.set.Sets;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.common.xcontent.XContentParser.Token;
|
||||
import org.elasticsearch.common.xcontent.json.JsonXContent;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplanation;
|
||||
import org.opensearch.action.support.ActiveShardCount;
|
||||
import org.opensearch.cluster.ClusterInfo;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.ShardRoutingState;
|
||||
import org.opensearch.cluster.routing.UnassignedInfo;
|
||||
import org.opensearch.cluster.routing.UnassignedInfo.AllocationStatus;
|
||||
import org.opensearch.cluster.routing.UnassignedInfo.Reason;
|
||||
import org.opensearch.cluster.routing.allocation.AllocateUnassignedDecision;
|
||||
import org.opensearch.cluster.routing.allocation.AllocationDecision;
|
||||
import org.opensearch.cluster.routing.allocation.MoveDecision;
|
||||
import org.opensearch.cluster.routing.allocation.NodeAllocationResult;
|
||||
import org.opensearch.cluster.routing.allocation.decider.Decision;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.set.Sets;
|
||||
import org.opensearch.common.xcontent.ToXContent;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.common.xcontent.XContentParser;
|
||||
import org.opensearch.common.xcontent.XContentParser.Token;
|
||||
import org.opensearch.common.xcontent.json.JsonXContent;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
|
@ -58,7 +57,7 @@ import java.util.Locale;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
|
@ -71,8 +70,8 @@ import static org.hamcrest.Matchers.startsWith;
|
|||
/**
|
||||
* Tests for the cluster allocation explanation
|
||||
*/
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public final class ClusterAllocationExplainIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public final class ClusterAllocationExplainIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testUnassignedPrimaryWithExistingIndex() throws Exception {
|
||||
logger.info("--> starting 2 nodes");
|
|
@ -16,11 +16,11 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.action.admin.cluster.node.tasks;
|
||||
package org.opensearch.action.admin.cluster.node.tasks;
|
||||
|
||||
import org.apache.lucene.util.SetOnce;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.ResourceNotFoundException;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.ResourceNotFoundException;
|
||||
import org.opensearch.action.ActionFuture;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.ActionRequest;
|
||||
|
@ -31,32 +31,33 @@ import org.opensearch.action.ActionType;
|
|||
import org.opensearch.action.LatchedActionListener;
|
||||
import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksResponse;
|
||||
import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.GroupedActionListener;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
import org.elasticsearch.action.support.PlainActionFuture;
|
||||
import org.elasticsearch.client.node.NodeClient;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.elasticsearch.common.util.set.Sets;
|
||||
import org.elasticsearch.plugins.ActionPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.tasks.CancellableTask;
|
||||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.tasks.TaskCancelledException;
|
||||
import org.elasticsearch.tasks.TaskId;
|
||||
import org.elasticsearch.tasks.TaskInfo;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportException;
|
||||
import org.elasticsearch.transport.TransportResponseHandler;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.action.support.ActionFilters;
|
||||
import org.opensearch.action.support.GroupedActionListener;
|
||||
import org.opensearch.action.support.HandledTransportAction;
|
||||
import org.opensearch.action.support.PlainActionFuture;
|
||||
import org.opensearch.client.node.NodeClient;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.inject.Inject;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.opensearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.opensearch.common.util.set.Sets;
|
||||
import org.opensearch.plugins.ActionPlugin;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.tasks.CancellableTask;
|
||||
import org.opensearch.tasks.Task;
|
||||
import org.opensearch.tasks.TaskCancelledException;
|
||||
import org.opensearch.tasks.TaskId;
|
||||
import org.opensearch.tasks.TaskInfo;
|
||||
import org.opensearch.tasks.TaskManager;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.opensearch.transport.TransportException;
|
||||
import org.opensearch.transport.TransportResponseHandler;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import org.junit.Before;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -80,7 +81,7 @@ import static org.hamcrest.Matchers.equalTo;
|
|||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.hamcrest.Matchers.instanceOf;
|
||||
|
||||
public class CancellableTasksIT extends ESIntegTestCase {
|
||||
public class CancellableTasksIT extends OpenSearchIntegTestCase {
|
||||
|
||||
static int idGenerator = 0;
|
||||
static final Map<TestRequest, CountDownLatch> beforeSendLatches = ConcurrentCollections.newConcurrentMap();
|
|
@ -17,17 +17,17 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.cluster.node.tasks;
|
||||
package org.opensearch.action.admin.cluster.node.tasks;
|
||||
|
||||
import org.opensearch.action.admin.cluster.node.tasks.get.GetTaskResponse;
|
||||
import org.elasticsearch.action.support.PlainListenableActionFuture;
|
||||
import org.elasticsearch.client.node.NodeClient;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.tasks.TaskId;
|
||||
import org.elasticsearch.test.ESSingleNodeTestCase;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.opensearch.action.support.PlainListenableActionFuture;
|
||||
import org.opensearch.client.node.NodeClient;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.tasks.Task;
|
||||
import org.opensearch.tasks.TaskId;
|
||||
import org.opensearch.test.OpenSearchSingleNodeTestCase;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
@ -41,7 +41,7 @@ import static java.util.Collections.singletonMap;
|
|||
* Makes sure that tasks that attempt to store themselves on completion retry if
|
||||
* they don't succeed at first.
|
||||
*/
|
||||
public class TaskStorageRetryIT extends ESSingleNodeTestCase {
|
||||
public class TaskStorageRetryIT extends OpenSearchSingleNodeTestCase {
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> getPlugins() {
|
||||
return Arrays.asList(TestTaskPlugin.class);
|
|
@ -16,12 +16,13 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.action.admin.cluster.node.tasks;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.OpenSearchTimeoutException;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.ResourceNotFoundException;
|
||||
package org.opensearch.action.admin.cluster.node.tasks;
|
||||
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.OpenSearchTimeoutException;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.ResourceNotFoundException;
|
||||
import org.opensearch.action.ActionFuture;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.TaskOperationFailure;
|
||||
|
@ -34,36 +35,36 @@ import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
|||
import org.opensearch.action.admin.indices.refresh.RefreshAction;
|
||||
import org.opensearch.action.admin.indices.upgrade.post.UpgradeAction;
|
||||
import org.opensearch.action.admin.indices.validate.query.ValidateQueryAction;
|
||||
import org.elasticsearch.action.bulk.BulkAction;
|
||||
import org.elasticsearch.action.index.IndexAction;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.action.search.SearchAction;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchTransportService;
|
||||
import org.elasticsearch.action.support.WriteRequest;
|
||||
import org.elasticsearch.action.support.replication.ReplicationResponse;
|
||||
import org.elasticsearch.action.support.replication.TransportReplicationActionTests;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.collect.Tuple;
|
||||
import org.elasticsearch.common.regex.Regex;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.search.builder.SearchSourceBuilder;
|
||||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.tasks.TaskId;
|
||||
import org.elasticsearch.tasks.TaskInfo;
|
||||
import org.elasticsearch.tasks.TaskResult;
|
||||
import org.elasticsearch.tasks.TaskResultsService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.tasks.MockTaskManager;
|
||||
import org.elasticsearch.test.tasks.MockTaskManagerListener;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.elasticsearch.transport.ReceiveTimeoutTransportException;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.action.bulk.BulkAction;
|
||||
import org.opensearch.action.index.IndexAction;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.action.search.SearchAction;
|
||||
import org.opensearch.action.search.SearchResponse;
|
||||
import org.opensearch.action.search.SearchTransportService;
|
||||
import org.opensearch.action.support.WriteRequest;
|
||||
import org.opensearch.action.support.replication.ReplicationResponse;
|
||||
import org.opensearch.action.support.replication.TransportReplicationActionTests;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.collect.Tuple;
|
||||
import org.opensearch.common.regex.Regex;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.index.query.QueryBuilders;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.search.builder.SearchSourceBuilder;
|
||||
import org.opensearch.tasks.Task;
|
||||
import org.opensearch.tasks.TaskId;
|
||||
import org.opensearch.tasks.TaskInfo;
|
||||
import org.opensearch.tasks.TaskResult;
|
||||
import org.opensearch.tasks.TaskResultsService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.tasks.MockTaskManager;
|
||||
import org.opensearch.test.tasks.MockTaskManagerListener;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
import org.opensearch.transport.ReceiveTimeoutTransportException;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -82,12 +83,12 @@ import java.util.function.Function;
|
|||
|
||||
import static java.util.Collections.emptyList;
|
||||
import static java.util.Collections.singleton;
|
||||
import static org.elasticsearch.common.unit.TimeValue.timeValueMillis;
|
||||
import static org.elasticsearch.common.unit.TimeValue.timeValueSeconds;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_MAX_HEADER_SIZE;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFutureThrows;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
|
||||
import static org.opensearch.common.unit.TimeValue.timeValueMillis;
|
||||
import static org.opensearch.common.unit.TimeValue.timeValueSeconds;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_MAX_HEADER_SIZE;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFutureThrows;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse;
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.empty;
|
||||
|
@ -105,8 +106,8 @@ import static org.hamcrest.Matchers.startsWith;
|
|||
* <p>
|
||||
* We need at least 2 nodes so we have a master node a non-master node
|
||||
*/
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, minNumDataNodes = 2, transportClientRatio = 0.0)
|
||||
public class TasksIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, minNumDataNodes = 2, transportClientRatio = 0.0)
|
||||
public class TasksIT extends OpenSearchIntegTestCase {
|
||||
|
||||
private Map<Tuple<String, String>, RecordingTaskManagerListener> listeners = new HashMap<>();
|
||||
|
|
@ -17,17 +17,17 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.cluster.repositories;
|
||||
package org.opensearch.action.admin.cluster.repositories;
|
||||
|
||||
import org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesResponse;
|
||||
import org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
|
||||
|
@ -36,8 +36,8 @@ import static org.hamcrest.Matchers.hasSize;
|
|||
*
|
||||
* The @NodeScope TEST is needed because this class updates the cluster setting "cluster.blocks.read_only".
|
||||
*/
|
||||
@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class RepositoryBlocksIT extends ESIntegTestCase {
|
||||
@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class RepositoryBlocksIT extends OpenSearchIntegTestCase {
|
||||
public void testPutRepositoryWithBlocks() {
|
||||
logger.info("--> registering a repository is blocked when the cluster is read only");
|
||||
try {
|
|
@ -16,24 +16,27 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.action.admin.cluster.snapshots;
|
||||
|
||||
package org.opensearch.action.admin.cluster.snapshots;
|
||||
|
||||
import org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse;
|
||||
import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
|
||||
import org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse;
|
||||
import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
|
||||
import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import org.junit.Before;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
|
||||
|
@ -42,8 +45,8 @@ import static org.hamcrest.Matchers.hasSize;
|
|||
*
|
||||
* The @NodeScope TEST is needed because this class updates the cluster setting "cluster.blocks.read_only".
|
||||
*/
|
||||
@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class SnapshotBlocksIT extends ESIntegTestCase {
|
||||
@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class SnapshotBlocksIT extends OpenSearchIntegTestCase {
|
||||
|
||||
protected static final String INDEX_NAME = "test-blocks-1";
|
||||
protected static final String OTHER_INDEX_NAME = "test-blocks-2";
|
|
@ -16,23 +16,22 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.action.admin.cluster.state;
|
||||
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.coordination.ClusterBootstrapService;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.discovery.MasterNotDiscoveredException;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateRequestBuilder;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
package org.opensearch.action.admin.cluster.state;
|
||||
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.coordination.ClusterBootstrapService;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.node.DiscoveryNodes;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.discovery.MasterNotDiscoveredException;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -41,15 +40,15 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(numDataNodes = 0, scope = ESIntegTestCase.Scope.TEST, transportClientRatio = 0)
|
||||
public class TransportClusterStateActionDisruptionIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(numDataNodes = 0, scope = OpenSearchIntegTestCase.Scope.TEST, transportClientRatio = 0)
|
||||
public class TransportClusterStateActionDisruptionIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -17,25 +17,26 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.cluster.stats;
|
||||
package org.opensearch.action.admin.cluster.stats;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.opensearch.action.admin.cluster.node.stats.NodeStats;
|
||||
import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNodeRole;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.mapper.MapperService;
|
||||
import org.elasticsearch.monitor.os.OsStats;
|
||||
import org.elasticsearch.node.NodeRoleSettings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.cluster.node.DiscoveryNodeRole;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.util.concurrent.EsExecutors;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.index.mapper.MapperService;
|
||||
import org.opensearch.monitor.os.OsStats;
|
||||
import org.opensearch.node.NodeRoleSettings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
|
||||
import org.hamcrest.Matchers;
|
||||
import org.opensearch.action.admin.cluster.stats.ClusterStatsIndices;
|
||||
import org.opensearch.action.admin.cluster.stats.ClusterStatsNodes;
|
||||
|
@ -56,7 +57,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
|||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
|
||||
public class ClusterStatsIT extends ESIntegTestCase {
|
||||
public class ClusterStatsIT extends OpenSearchIntegTestCase {
|
||||
|
||||
private void assertCounts(ClusterStatsNodes.Counts counts, int total, Map<String, Integer> roles) {
|
||||
assertThat(counts.getTotal(), equalTo(total));
|
|
@ -17,23 +17,22 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.cluster.tasks;
|
||||
package org.opensearch.action.admin.cluster.tasks;
|
||||
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.gateway.GatewayService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.opensearch.action.admin.cluster.tasks.PendingClusterTasksResponse;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.gateway.GatewayService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
|
||||
public class PendingTasksBlocksIT extends ESIntegTestCase {
|
||||
public class PendingTasksBlocksIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testPendingTasksWithIndexBlocks() {
|
||||
createIndex("test");
|
|
@ -17,21 +17,19 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.alias;
|
||||
package org.opensearch.action.admin.indices.alias;
|
||||
|
||||
import org.opensearch.action.RequestValidators;
|
||||
import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest;
|
||||
import org.opensearch.action.admin.indices.alias.exists.AliasesExistResponse;
|
||||
import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest;
|
||||
import org.opensearch.action.admin.indices.alias.get.GetAliasesResponse;
|
||||
import org.elasticsearch.cluster.metadata.AliasMetadata;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.plugins.ActionPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESSingleNodeTestCase;
|
||||
|
||||
import org.opensearch.cluster.metadata.AliasMetadata;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.plugins.ActionPlugin;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchSingleNodeTestCase;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -39,13 +37,13 @@ import java.util.Locale;
|
|||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.hamcrest.Matchers.hasToString;
|
||||
|
||||
public class ValidateIndicesAliasesRequestIT extends ESSingleNodeTestCase {
|
||||
public class ValidateIndicesAliasesRequestIT extends OpenSearchSingleNodeTestCase {
|
||||
|
||||
public static class IndicesAliasesPlugin extends Plugin implements ActionPlugin {
|
||||
|
||||
|
@ -83,12 +81,12 @@ public class ValidateIndicesAliasesRequestIT extends ESSingleNodeTestCase {
|
|||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> getPlugins() {
|
||||
return Collections.singletonList(IndicesAliasesPlugin.class);
|
||||
return Collections.singletonList(IndicesAliasopensearchplugin.class);
|
||||
}
|
||||
|
||||
public void testAllowed() {
|
||||
final Settings settings = Settings.builder()
|
||||
.putList(IndicesAliasesPlugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("allowed"))
|
||||
.putList(IndicesAliasopensearchplugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("allowed"))
|
||||
.build();
|
||||
createIndex("index", settings);
|
||||
final IndicesAliasesRequest request = new IndicesAliasesRequest().origin("allowed");
|
||||
|
@ -104,7 +102,7 @@ public class ValidateIndicesAliasesRequestIT extends ESSingleNodeTestCase {
|
|||
|
||||
public void testNotAllowed() {
|
||||
final Settings settings = Settings.builder()
|
||||
.putList(IndicesAliasesPlugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("allowed"))
|
||||
.putList(IndicesAliasopensearchplugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("allowed"))
|
||||
.build();
|
||||
createIndex("index", settings);
|
||||
final String origin = randomFrom("", "not-allowed");
|
||||
|
@ -116,11 +114,11 @@ public class ValidateIndicesAliasesRequestIT extends ESSingleNodeTestCase {
|
|||
|
||||
public void testSomeAllowed() {
|
||||
final Settings fooIndexSettings = Settings.builder()
|
||||
.putList(IndicesAliasesPlugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("foo_allowed"))
|
||||
.putList(IndicesAliasopensearchplugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("foo_allowed"))
|
||||
.build();
|
||||
createIndex("foo", fooIndexSettings);
|
||||
final Settings barIndexSettings = Settings.builder()
|
||||
.putList(IndicesAliasesPlugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("bar_allowed"))
|
||||
.putList(IndicesAliasopensearchplugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("bar_allowed"))
|
||||
.build();
|
||||
createIndex("bar", barIndexSettings);
|
||||
final String origin = randomFrom("foo_allowed", "bar_allowed");
|
|
@ -17,25 +17,24 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.cache.clear;
|
||||
package org.opensearch.action.admin.indices.cache.clear;
|
||||
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.action.admin.indices.cache.clear.ClearIndicesCacheResponse;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class ClearIndicesCacheBlocksIT extends ESIntegTestCase {
|
||||
@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class ClearIndicesCacheBlocksIT extends OpenSearchIntegTestCase {
|
||||
public void testClearIndicesCacheWithBlocks() {
|
||||
createIndex("test");
|
||||
ensureGreen("test");
|
|
@ -16,25 +16,25 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.action.admin.indices.create;
|
||||
package org.opensearch.action.admin.indices.create;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse;
|
||||
import org.opensearch.action.admin.indices.shrink.ResizeType;
|
||||
import org.opensearch.action.admin.indices.stats.IndicesStatsResponse;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.query.TermsQueryBuilder;
|
||||
import org.elasticsearch.index.seqno.SeqNoStats;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.VersionUtils;
|
||||
import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.index.query.TermsQueryBuilder;
|
||||
import org.opensearch.index.seqno.SeqNoStats;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.VersionUtils;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class CloneIndexIT extends ESIntegTestCase {
|
||||
public class CloneIndexIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected boolean forbidPrivateIndexSettings() {
|
|
@ -17,45 +17,44 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.create;
|
||||
package org.opensearch.action.admin.indices.create;
|
||||
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.UnavailableShardsException;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
import org.opensearch.action.admin.indices.alias.Alias;
|
||||
import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.MappingMetadata;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.index.IndexNotFoundException;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.mapper.MapperParsingException;
|
||||
import org.elasticsearch.index.query.RangeQueryBuilder;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.opensearch.action.admin.indices.create.CreateIndexResponse;
|
||||
import org.opensearch.action.search.SearchResponse;
|
||||
import org.opensearch.action.support.ActiveShardCount;
|
||||
import org.opensearch.action.support.IndicesOptions;
|
||||
import org.opensearch.action.support.master.AcknowledgedResponse;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.MappingMetadata;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.common.collect.ImmutableOpenMap;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.xcontent.XContentFactory;
|
||||
import org.opensearch.index.IndexNotFoundException;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.mapper.MapperParsingException;
|
||||
import org.opensearch.index.query.RangeQueryBuilder;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_WAIT_FOR_ACTIVE_SHARDS;
|
||||
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_WAIT_FOR_ACTIVE_SHARDS;
|
||||
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows;
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
|
@ -65,7 +64,7 @@ import static org.hamcrest.Matchers.startsWith;
|
|||
import static org.hamcrest.core.IsNull.notNullValue;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST)
|
||||
public class CreateIndexIT extends ESIntegTestCase {
|
||||
public class CreateIndexIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testCreationDateGivenFails() {
|
||||
try {
|
|
@ -17,14 +17,15 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.create;
|
||||
package org.opensearch.action.admin.indices.create;
|
||||
|
||||
import org.apache.lucene.search.Sort;
|
||||
import org.apache.lucene.search.SortField;
|
||||
import org.apache.lucene.search.SortedSetSelector;
|
||||
import org.apache.lucene.search.SortedSetSortField;
|
||||
import org.apache.lucene.util.Constants;
|
||||
import org.elasticsearch.Version;
|
||||
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.admin.cluster.reroute.ClusterRerouteResponse;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateRequest;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
|
@ -36,46 +37,46 @@ import org.opensearch.action.admin.indices.shrink.ResizeType;
|
|||
import org.opensearch.action.admin.indices.stats.CommonStats;
|
||||
import org.opensearch.action.admin.indices.stats.IndicesStatsResponse;
|
||||
import org.opensearch.action.admin.indices.stats.ShardStats;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterInfoService;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.InternalClusterInfoService;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.routing.Murmur3HashFunction;
|
||||
import org.elasticsearch.cluster.routing.RoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.UnassignedInfo;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.engine.SegmentsStats;
|
||||
import org.elasticsearch.index.query.TermsQueryBuilder;
|
||||
import org.elasticsearch.index.seqno.SeqNoStats;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.elasticsearch.test.VersionUtils;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.action.support.ActiveShardCount;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.ClusterInfoService;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.InternalClusterInfoService;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.Murmur3HashFunction;
|
||||
import org.opensearch.cluster.routing.RoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.UnassignedInfo;
|
||||
import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.collect.ImmutableOpenMap;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.engine.SegmentsStats;
|
||||
import org.opensearch.index.query.TermsQueryBuilder;
|
||||
import org.opensearch.index.seqno.SeqNoStats;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
import org.opensearch.test.VersionUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
|
||||
public class ShrinkIndexIT extends ESIntegTestCase {
|
||||
public class ShrinkIndexIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected boolean forbidPrivateIndexSettings() {
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.create;
|
||||
package org.opensearch.action.admin.indices.create;
|
||||
|
||||
import org.apache.lucene.search.Sort;
|
||||
import org.apache.lucene.search.SortField;
|
||||
|
@ -25,7 +25,8 @@ import org.apache.lucene.search.SortedSetSelector;
|
|||
import org.apache.lucene.search.SortedSetSortField;
|
||||
import org.apache.lucene.search.join.ScoreMode;
|
||||
import org.apache.lucene.util.Constants;
|
||||
import org.elasticsearch.Version;
|
||||
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateRequest;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse;
|
||||
|
@ -33,31 +34,30 @@ import org.opensearch.action.admin.indices.shrink.ResizeType;
|
|||
import org.opensearch.action.admin.indices.stats.CommonStats;
|
||||
import org.opensearch.action.admin.indices.stats.IndicesStatsResponse;
|
||||
import org.opensearch.action.admin.indices.stats.ShardStats;
|
||||
import org.elasticsearch.action.get.GetResponse;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.MetadataCreateIndexService;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.routing.Murmur3HashFunction;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.engine.SegmentsStats;
|
||||
import org.elasticsearch.index.query.TermsQueryBuilder;
|
||||
import org.elasticsearch.index.seqno.SeqNoStats;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.VersionUtils;
|
||||
import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder;
|
||||
import org.opensearch.action.get.GetResponse;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.action.index.IndexRequestBuilder;
|
||||
import org.opensearch.action.search.SearchResponse;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.MetadataCreateIndexService;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.Murmur3HashFunction;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.engine.SegmentsStats;
|
||||
import org.opensearch.index.query.TermsQueryBuilder;
|
||||
import org.opensearch.index.seqno.SeqNoStats;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.VersionUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
|
@ -67,16 +67,16 @@ import java.util.Set;
|
|||
import java.util.function.BiFunction;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.nestedQuery;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.opensearch.index.query.QueryBuilders.nestedQuery;
|
||||
import static org.opensearch.index.query.QueryBuilders.termQuery;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class SplitIndexIT extends ESIntegTestCase {
|
||||
public class SplitIndexIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected boolean forbidPrivateIndexSettings() {
|
|
@ -17,20 +17,20 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.delete;
|
||||
package org.opensearch.action.admin.indices.delete;
|
||||
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.action.support.IndicesOptions;
|
||||
import org.opensearch.cluster.block.ClusterBlockException;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits;
|
||||
|
||||
public class DeleteIndexBlocksIT extends ESIntegTestCase {
|
||||
public class DeleteIndexBlocksIT extends OpenSearchIntegTestCase {
|
||||
public void testDeleteIndexWithBlocks() {
|
||||
createIndex("test");
|
||||
ensureGreen("test");
|
|
@ -17,23 +17,23 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.exists;
|
||||
package org.opensearch.action.admin.indices.exists;
|
||||
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.discovery.MasterNotDiscoveredException;
|
||||
import org.elasticsearch.gateway.GatewayService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.discovery.MasterNotDiscoveredException;
|
||||
import org.opensearch.gateway.GatewayService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows;
|
||||
|
||||
@ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0.0,
|
||||
@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0.0,
|
||||
autoManageMasterNodes = false)
|
||||
public class IndicesExistsIT extends ESIntegTestCase {
|
||||
public class IndicesExistsIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testIndexExistsWithBlocksInPlace() throws IOException {
|
||||
internalCluster().setBootstrapMasterNodeIndex(0);
|
|
@ -17,24 +17,23 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.flush;
|
||||
package org.opensearch.action.admin.indices.flush;
|
||||
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.action.admin.indices.flush.FlushResponse;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class FlushBlocksIT extends ESIntegTestCase {
|
||||
@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class FlushBlocksIT extends OpenSearchIntegTestCase {
|
||||
public void testFlushWithBlocks() {
|
||||
createIndex("test");
|
||||
ensureGreen("test");
|
|
@ -17,25 +17,24 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.forcemerge;
|
||||
package org.opensearch.action.admin.indices.forcemerge;
|
||||
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.action.admin.indices.forcemerge.ForceMergeResponse;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class ForceMergeBlocksIT extends ESIntegTestCase {
|
||||
@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class ForceMergeBlocksIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testForceMergeWithBlocks() {
|
||||
createIndex("test");
|
|
@ -17,20 +17,19 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.forcemerge;
|
||||
package org.opensearch.action.admin.indices.forcemerge;
|
||||
|
||||
import org.opensearch.action.admin.indices.flush.FlushResponse;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.IndexRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.engine.Engine;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.action.admin.indices.forcemerge.ForceMergeResponse;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.IndexRoutingTable;
|
||||
import org.opensearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.engine.Engine;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -38,7 +37,7 @@ import static org.hamcrest.Matchers.is;
|
|||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
public class ForceMergeIT extends ESIntegTestCase {
|
||||
public class ForceMergeIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testForceMergeUUIDConsistent() throws IOException {
|
||||
internalCluster().ensureAtLeastNumDataNodes(2);
|
|
@ -17,39 +17,37 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.get;
|
||||
package org.opensearch.action.admin.indices.get;
|
||||
|
||||
import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
|
||||
import org.opensearch.action.admin.indices.alias.Alias;
|
||||
import org.opensearch.action.admin.indices.get.GetIndexRequest.Feature;
|
||||
import org.elasticsearch.cluster.metadata.AliasMetadata;
|
||||
import org.elasticsearch.cluster.metadata.MappingMetadata;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.IndexNotFoundException;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.action.admin.indices.get.GetIndexRequestBuilder;
|
||||
import org.opensearch.action.admin.indices.get.GetIndexResponse;
|
||||
import org.opensearch.cluster.metadata.AliasMetadata;
|
||||
import org.opensearch.cluster.metadata.MappingMetadata;
|
||||
import org.opensearch.common.collect.ImmutableOpenMap;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.index.IndexNotFoundException;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
|
||||
@ESIntegTestCase.SuiteScopeTestCase
|
||||
public class GetIndexIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.SuiteScopeTestCase
|
||||
public class GetIndexIT extends OpenSearchIntegTestCase {
|
||||
@Override
|
||||
protected void setupSuiteScopeCluster() throws Exception {
|
||||
assertAcked(prepareCreate("idx").addAlias(new Alias("alias_idx")).addMapping("type1", "{\"type1\":{}}", XContentType.JSON)
|
|
@ -17,15 +17,14 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.mapping.put;
|
||||
package org.opensearch.action.admin.indices.mapping.put;
|
||||
|
||||
import org.opensearch.action.RequestValidators;
|
||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.plugins.ActionPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESSingleNodeTestCase;
|
||||
import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest;
|
||||
import org.opensearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.plugins.ActionPlugin;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchSingleNodeTestCase;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
@ -33,11 +32,11 @@ import java.util.Collections;
|
|||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class ValidateMappingRequestPluginIT extends ESSingleNodeTestCase {
|
||||
public class ValidateMappingRequestPluginIT extends OpenSearchSingleNodeTestCase {
|
||||
static final Map<String, Collection<String>> allowedOrigins = ConcurrentCollections.newConcurrentMap();
|
||||
public static class TestPlugin extends Plugin implements ActionPlugin {
|
||||
@Override
|
|
@ -17,25 +17,23 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.refresh;
|
||||
package org.opensearch.action.admin.indices.refresh;
|
||||
|
||||
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.action.admin.indices.refresh.RefreshResponse;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class RefreshBlocksIT extends ESIntegTestCase {
|
||||
@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class RefreshBlocksIT extends OpenSearchIntegTestCase {
|
||||
public void testRefreshWithBlocks() {
|
||||
createIndex("test");
|
||||
ensureGreen("test");
|
|
@ -17,33 +17,30 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.rollover;
|
||||
package org.opensearch.action.admin.indices.rollover;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.ResourceAlreadyExistsException;
|
||||
|
||||
import org.opensearch.ResourceAlreadyExistsException;
|
||||
import org.opensearch.action.admin.indices.alias.Alias;
|
||||
import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse;
|
||||
import org.opensearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.AutoExpandReplicas;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.allocation.AllocationService;
|
||||
import org.elasticsearch.common.logging.Loggers;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.time.DateFormatter;
|
||||
import org.elasticsearch.common.unit.ByteSizeUnit;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalSettingsPlugin;
|
||||
import org.elasticsearch.test.MockLogAppender;
|
||||
import org.opensearch.action.admin.indices.rollover.Condition;
|
||||
import org.opensearch.action.admin.indices.rollover.MaxAgeCondition;
|
||||
import org.opensearch.action.admin.indices.rollover.MaxSizeCondition;
|
||||
import org.opensearch.action.admin.indices.rollover.RolloverResponse;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.AutoExpandReplicas;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.allocation.AllocationService;
|
||||
import org.opensearch.common.logging.Loggers;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.time.DateFormatter;
|
||||
import org.opensearch.common.unit.ByteSizeUnit;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalSettingsPlugin;
|
||||
import org.opensearch.test.MockLogAppender;
|
||||
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.ZonedDateTime;
|
||||
|
@ -52,8 +49,8 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.elasticsearch.index.mapper.MapperService.SINGLE_MAPPING_NAME;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.index.mapper.MapperService.SINGLE_MAPPING_NAME;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.containsInAnyOrder;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.everyItem;
|
||||
|
@ -64,8 +61,8 @@ import static org.hamcrest.collection.IsEmptyCollection.empty;
|
|||
import static org.hamcrest.core.CombinableMatcher.both;
|
||||
import static org.hamcrest.number.OrderingComparison.greaterThanOrEqualTo;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class RolloverIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class RolloverIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -17,24 +17,23 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.segments;
|
||||
package org.opensearch.action.admin.indices.segments;
|
||||
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.action.admin.indices.segments.IndicesSegmentResponse;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures;
|
||||
|
||||
@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class IndicesSegmentsBlocksIT extends ESIntegTestCase {
|
||||
@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class IndicesSegmentsBlocksIT extends OpenSearchIntegTestCase {
|
||||
public void testIndicesSegmentsWithBlocks() {
|
||||
createIndex("test-blocks");
|
||||
ensureGreen("test-blocks");
|
|
@ -17,29 +17,28 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.shards;
|
||||
package org.opensearch.action.admin.indices.shards;
|
||||
|
||||
import com.carrotsearch.hppc.cursors.IntObjectCursor;
|
||||
import com.carrotsearch.hppc.cursors.ObjectCursor;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.IndexRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.ShardRoutingState;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenIntMap;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.store.MockFSIndexStore;
|
||||
import org.opensearch.action.admin.indices.shards.IndicesShardStoresResponse;
|
||||
import org.opensearch.action.index.IndexRequestBuilder;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.IndexRoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.ShardRoutingState;
|
||||
import org.opensearch.common.collect.ImmutableOpenIntMap;
|
||||
import org.opensearch.common.collect.ImmutableOpenMap;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.store.MockFSIndexStore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
@ -51,15 +50,15 @@ import java.util.Set;
|
|||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoTimeout;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class IndicesShardStoreRequestIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class IndicesShardStoreRequestIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -17,23 +17,22 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.admin.indices.stats;
|
||||
package org.opensearch.action.admin.indices.stats;
|
||||
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.action.admin.indices.stats.IndicesStatsResponse;
|
||||
import org.opensearch.cluster.block.ClusterBlockException;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
|
||||
@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class IndicesStatsBlocksIT extends ESIntegTestCase {
|
||||
@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class IndicesStatsBlocksIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testIndicesStatsWithBlocks() {
|
||||
createIndex("ro");
|
|
@ -17,27 +17,27 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.opensearch.action.bulk;
|
||||
|
||||
package org.elasticsearch.action.bulk;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.ActionRequestValidationException;
|
||||
import org.opensearch.action.admin.indices.alias.Alias;
|
||||
import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.action.ingest.PutPipelineRequest;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.action.support.replication.ReplicationRequest;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.ingest.IngestTestPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.action.ingest.PutPipelineRequest;
|
||||
import org.opensearch.action.support.master.AcknowledgedResponse;
|
||||
import org.opensearch.action.support.replication.ReplicationRequest;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.ingest.IngestTestPlugin;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
@ -51,9 +51,9 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
|
||||
import static org.opensearch.action.DocWriteResponse.Result.CREATED;
|
||||
import static org.opensearch.action.DocWriteResponse.Result.UPDATED;
|
||||
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.opensearch.test.StreamsUtils.copyToStringFromClasspath;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.containsInAnyOrder;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
@ -61,7 +61,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
|||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.oneOf;
|
||||
|
||||
public class BulkIntegrationIT extends ESIntegTestCase {
|
||||
public class BulkIntegrationIT extends OpenSearchIntegTestCase {
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
||||
return Arrays.asList(IngestTestPlugin.class);
|
|
@ -17,16 +17,16 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.bulk;
|
||||
package org.opensearch.action.bulk;
|
||||
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
|
||||
public class BulkProcessorClusterSettingsIT extends ESIntegTestCase {
|
||||
public class BulkProcessorClusterSettingsIT extends OpenSearchIntegTestCase {
|
||||
public void testBulkProcessorAutoCreateRestrictions() throws Exception {
|
||||
// See issue #8125
|
||||
Settings settings = Settings.builder().put("action.auto_create_index", false).build();
|
|
@ -17,27 +17,27 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.bulk;
|
||||
package org.opensearch.action.bulk;
|
||||
|
||||
import com.carrotsearch.randomizedtesting.generators.RandomPicks;
|
||||
import org.elasticsearch.action.get.MultiGetItemResponse;
|
||||
import org.elasticsearch.action.get.MultiGetRequestBuilder;
|
||||
import org.elasticsearch.action.get.MultiGetResponse;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeUnit;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.common.xcontent.json.JsonXContent;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.transport.MockTransportClient;
|
||||
import org.opensearch.action.get.MultiGetItemResponse;
|
||||
import org.opensearch.action.get.MultiGetRequestBuilder;
|
||||
import org.opensearch.action.get.MultiGetResponse;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.bytes.BytesArray;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeUnit;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.common.xcontent.json.JsonXContent;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.transport.MockTransportClient;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
@ -48,7 +48,7 @@ import java.util.concurrent.CountDownLatch;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.both;
|
||||
import static org.hamcrest.Matchers.either;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
@ -57,7 +57,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
|||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.lessThanOrEqualTo;
|
||||
|
||||
public class BulkProcessorIT extends ESIntegTestCase {
|
||||
public class BulkProcessorIT extends OpenSearchIntegTestCase {
|
||||
public void testThatBulkProcessorCountIsCorrect() throws Exception {
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
BulkProcessorTestListener listener = new BulkProcessorTestListener(latch);
|
|
@ -16,16 +16,17 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.action.bulk;
|
||||
package org.opensearch.action.bulk;
|
||||
|
||||
import org.opensearch.action.admin.indices.refresh.RefreshRequest;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
|
||||
import org.opensearch.action.search.SearchResponse;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.index.query.QueryBuilders;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.transport.RemoteTransportException;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.transport.RemoteTransportException;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
|
@ -35,13 +36,13 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.lessThan;
|
||||
import static org.hamcrest.Matchers.lessThanOrEqualTo;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 2)
|
||||
public class BulkProcessorRetryIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 2)
|
||||
public class BulkProcessorRetryIT extends OpenSearchIntegTestCase {
|
||||
private static final String INDEX_NAME = "test";
|
||||
private static final String TYPE_NAME = "type";
|
||||
|
|
@ -16,26 +16,26 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.action.bulk;
|
||||
package org.opensearch.action.bulk;
|
||||
|
||||
import org.opensearch.action.ActionFuture;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.support.WriteRequest;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalSettingsPlugin;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.action.support.WriteRequest;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalSettingsPlugin;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 2)
|
||||
public class BulkRejectionIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 2)
|
||||
public class BulkRejectionIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Settings nodeSettings(int nodeOrdinal) {
|
|
@ -17,34 +17,34 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.bulk;
|
||||
package org.opensearch.action.bulk;
|
||||
|
||||
import org.opensearch.action.DocWriteRequest.OpType;
|
||||
import org.opensearch.action.DocWriteResponse;
|
||||
import org.opensearch.action.admin.indices.alias.Alias;
|
||||
import org.elasticsearch.action.delete.DeleteRequest;
|
||||
import org.elasticsearch.action.get.GetResponse;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.support.WriteRequest.RefreshPolicy;
|
||||
import org.elasticsearch.action.update.UpdateRequest;
|
||||
import org.elasticsearch.action.update.UpdateRequestBuilder;
|
||||
import org.elasticsearch.action.update.UpdateResponse;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.VersionType;
|
||||
import org.elasticsearch.indices.IndexClosedException;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.script.MockScriptPlugin;
|
||||
import org.elasticsearch.script.Script;
|
||||
import org.elasticsearch.script.ScriptException;
|
||||
import org.elasticsearch.script.ScriptType;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalSettingsPlugin;
|
||||
import org.opensearch.action.delete.DeleteRequest;
|
||||
import org.opensearch.action.get.GetResponse;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.action.search.SearchResponse;
|
||||
import org.opensearch.action.support.WriteRequest.RefreshPolicy;
|
||||
import org.opensearch.action.update.UpdateRequest;
|
||||
import org.opensearch.action.update.UpdateRequestBuilder;
|
||||
import org.opensearch.action.update.UpdateResponse;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.index.VersionType;
|
||||
import org.opensearch.indices.IndexClosedException;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.script.MockScriptPlugin;
|
||||
import org.opensearch.script.Script;
|
||||
import org.opensearch.script.ScriptException;
|
||||
import org.opensearch.script.ScriptType;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalSettingsPlugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -55,10 +55,10 @@ import java.util.Map;
|
|||
import java.util.concurrent.CyclicBarrier;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
|
||||
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures;
|
||||
import static org.hamcrest.Matchers.arrayWithSize;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
@ -66,7 +66,7 @@ import static org.hamcrest.Matchers.instanceOf;
|
|||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
public class BulkWithUpdatesIT extends ESIntegTestCase {
|
||||
public class BulkWithUpdatesIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -16,33 +16,33 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.action.ingest;
|
||||
package org.opensearch.action.ingest;
|
||||
|
||||
import org.elasticsearch.action.bulk.BulkRequest;
|
||||
import org.elasticsearch.action.bulk.BulkResponse;
|
||||
import org.elasticsearch.action.get.GetRequest;
|
||||
import org.elasticsearch.action.get.GetResponse;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.ingest.AbstractProcessor;
|
||||
import org.elasticsearch.ingest.IngestDocument;
|
||||
import org.elasticsearch.ingest.Processor;
|
||||
import org.elasticsearch.plugins.IngestPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.repositories.RepositoriesService;
|
||||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.test.ESSingleNodeTestCase;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.watcher.ResourceWatcherService;
|
||||
import org.opensearch.action.bulk.BulkRequest;
|
||||
import org.opensearch.action.bulk.BulkResponse;
|
||||
import org.opensearch.action.get.GetRequest;
|
||||
import org.opensearch.action.get.GetResponse;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.bytes.BytesArray;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.ingest.AbstractProcessor;
|
||||
import org.opensearch.ingest.IngestDocument;
|
||||
import org.opensearch.ingest.Processor;
|
||||
import org.opensearch.plugins.IngestPlugin;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.repositories.RepositoriesService;
|
||||
import org.opensearch.script.ScriptService;
|
||||
import org.opensearch.test.OpenSearchSingleNodeTestCase;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.opensearch.watcher.ResourceWatcherService;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -61,7 +61,7 @@ import static org.hamcrest.Matchers.equalTo;
|
|||
* executes asynchronously. The result of the operation should be the same and also the order in which the
|
||||
* bulk responses are returned should be the same as how the corresponding index requests were defined.
|
||||
*/
|
||||
public class AsyncIngestProcessorIT extends ESSingleNodeTestCase {
|
||||
public class AsyncIngestProcessorIT extends OpenSearchSingleNodeTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> getPlugins() {
|
|
@ -17,21 +17,22 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.search;
|
||||
package org.opensearch.action.search;
|
||||
|
||||
import org.apache.lucene.search.TotalHits;
|
||||
import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.client.node.NodeClient;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.search.SearchShardTarget;
|
||||
import org.elasticsearch.search.aggregations.AggregationBuilders;
|
||||
import org.elasticsearch.search.aggregations.InternalAggregations;
|
||||
import org.elasticsearch.search.builder.SearchSourceBuilder;
|
||||
import org.elasticsearch.search.sort.FieldSortBuilder;
|
||||
import org.elasticsearch.search.sort.SortOrder;
|
||||
import org.elasticsearch.tasks.TaskId;
|
||||
import org.elasticsearch.test.ESSingleNodeTestCase;
|
||||
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.client.node.NodeClient;
|
||||
import org.opensearch.index.query.QueryBuilders;
|
||||
import org.opensearch.search.SearchShardTarget;
|
||||
import org.opensearch.search.aggregations.AggregationBuilders;
|
||||
import org.opensearch.search.aggregations.InternalAggregations;
|
||||
import org.opensearch.search.builder.SearchSourceBuilder;
|
||||
import org.opensearch.search.sort.FieldSortBuilder;
|
||||
import org.opensearch.search.sort.SortOrder;
|
||||
import org.opensearch.tasks.TaskId;
|
||||
import org.opensearch.test.OpenSearchSingleNodeTestCase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -45,11 +46,11 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.lessThan;
|
||||
|
||||
public class SearchProgressActionListenerIT extends ESSingleNodeTestCase {
|
||||
public class SearchProgressActionListenerIT extends OpenSearchSingleNodeTestCase {
|
||||
private List<SearchShard> shards;
|
||||
|
||||
public void setUp() throws Exception {
|
|
@ -17,60 +17,61 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.search;
|
||||
package org.opensearch.action.search;
|
||||
|
||||
import org.apache.lucene.index.LeafReaderContext;
|
||||
import org.apache.lucene.search.CollectionTerminatedException;
|
||||
import org.apache.lucene.search.ScoreMode;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.admin.cluster.node.stats.NodeStats;
|
||||
import org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest;
|
||||
import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.action.support.WriteRequest;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.breaker.CircuitBreaker;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.AtomicArray;
|
||||
import org.elasticsearch.common.xcontent.ObjectParser;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.index.IndexSettings;
|
||||
import org.elasticsearch.index.query.QueryShardContext;
|
||||
import org.elasticsearch.index.query.RangeQueryBuilder;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.plugins.SearchPlugin;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.action.support.IndicesOptions;
|
||||
import org.opensearch.action.support.WriteRequest;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.breaker.CircuitBreaker;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.concurrent.AtomicArray;
|
||||
import org.opensearch.common.xcontent.ObjectParser;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.index.IndexSettings;
|
||||
import org.opensearch.index.query.QueryShardContext;
|
||||
import org.opensearch.index.query.RangeQueryBuilder;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.plugins.SearchPlugin;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
import org.elasticsearch.search.DocValueFormat;
|
||||
import org.elasticsearch.search.SearchHit;
|
||||
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
|
||||
import org.elasticsearch.search.aggregations.AggregationBuilder;
|
||||
import org.elasticsearch.search.aggregations.Aggregations;
|
||||
import org.elasticsearch.search.aggregations.Aggregator;
|
||||
import org.elasticsearch.search.aggregations.AggregatorBase;
|
||||
import org.elasticsearch.search.aggregations.AggregatorFactories;
|
||||
import org.elasticsearch.search.aggregations.AggregatorFactory;
|
||||
import org.elasticsearch.search.aggregations.CardinalityUpperBound;
|
||||
import org.elasticsearch.search.aggregations.InternalAggregation;
|
||||
import org.elasticsearch.search.aggregations.LeafBucketCollector;
|
||||
import org.elasticsearch.search.aggregations.bucket.terms.LongTerms;
|
||||
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
|
||||
import org.elasticsearch.search.aggregations.metrics.InternalMax;
|
||||
import org.elasticsearch.search.aggregations.support.ValueType;
|
||||
import org.elasticsearch.search.builder.SearchSourceBuilder;
|
||||
import org.elasticsearch.search.fetch.FetchSubPhase;
|
||||
import org.elasticsearch.search.fetch.FetchSubPhaseProcessor;
|
||||
import org.elasticsearch.search.internal.SearchContext;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.search.DocValueFormat;
|
||||
import org.opensearch.search.SearchHit;
|
||||
import org.opensearch.search.aggregations.AbstractAggregationBuilder;
|
||||
import org.opensearch.search.aggregations.AggregationBuilder;
|
||||
import org.opensearch.search.aggregations.Aggregations;
|
||||
import org.opensearch.search.aggregations.Aggregator;
|
||||
import org.opensearch.search.aggregations.AggregatorBase;
|
||||
import org.opensearch.search.aggregations.AggregatorFactories;
|
||||
import org.opensearch.search.aggregations.AggregatorFactory;
|
||||
import org.opensearch.search.aggregations.CardinalityUpperBound;
|
||||
import org.opensearch.search.aggregations.InternalAggregation;
|
||||
import org.opensearch.search.aggregations.LeafBucketCollector;
|
||||
import org.opensearch.search.aggregations.bucket.terms.LongTerms;
|
||||
import org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
|
||||
import org.opensearch.search.aggregations.metrics.InternalMax;
|
||||
import org.opensearch.search.aggregations.support.ValueType;
|
||||
import org.opensearch.search.builder.SearchSourceBuilder;
|
||||
import org.opensearch.search.fetch.FetchSubPhase;
|
||||
import org.opensearch.search.fetch.FetchSubPhaseProcessor;
|
||||
import org.opensearch.search.internal.SearchContext;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
@ -79,11 +80,11 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class TransportSearchIT extends ESIntegTestCase {
|
||||
public class TransportSearchIT extends OpenSearchIntegTestCase {
|
||||
public static class TestPlugin extends Plugin implements SearchPlugin {
|
||||
@Override
|
||||
public List<AggregationSpec> getAggregations() {
|
|
@ -17,23 +17,23 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.support;
|
||||
package org.opensearch.action.support;
|
||||
|
||||
import org.opensearch.action.ActionFuture;
|
||||
import org.opensearch.action.admin.indices.create.CreateIndexResponse;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
|
||||
/**
|
||||
* Tests that the index creation operation waits for the appropriate
|
||||
* number of active shards to be started before returning.
|
||||
*/
|
||||
public class ActiveShardsObserverIT extends ESIntegTestCase {
|
||||
public class ActiveShardsObserverIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testCreateIndexNoActiveShardsTimesOut() throws Exception {
|
||||
Settings.Builder settingsBuilder = Settings.builder()
|
|
@ -17,28 +17,29 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.support;
|
||||
package org.opensearch.action.support;
|
||||
|
||||
import org.opensearch.action.UnavailableShardsException;
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.opensearch.action.admin.indices.create.CreateIndexResponse;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
|
||||
import static org.elasticsearch.common.unit.TimeValue.timeValueMillis;
|
||||
import static org.elasticsearch.common.unit.TimeValue.timeValueSeconds;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import static org.opensearch.common.unit.TimeValue.timeValueMillis;
|
||||
import static org.opensearch.common.unit.TimeValue.timeValueSeconds;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.startsWith;
|
||||
|
||||
/**
|
||||
* Tests setting the active shard count for replication operations (e.g. index) operates correctly.
|
||||
*/
|
||||
public class WaitActiveShardCountIT extends ESIntegTestCase {
|
||||
public class WaitActiveShardCountIT extends OpenSearchIntegTestCase {
|
||||
public void testReplicationWaitsForActiveShardCount() throws Exception {
|
||||
CreateIndexResponse createIndexResponse =
|
||||
prepareCreate("test", 1, Settings.builder().put("index.number_of_shards", 1).put("index.number_of_replicas", 2)).get();
|
|
@ -17,15 +17,15 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.support.master;
|
||||
package org.opensearch.action.support.master;
|
||||
|
||||
import org.opensearch.action.DocWriteResponse;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.disruption.NetworkDisruption;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.disruption.NetworkDisruption;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
|
@ -34,8 +34,8 @@ import java.util.concurrent.CyclicBarrier;
|
|||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class IndexingMasterFailoverIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class IndexingMasterFailoverIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -17,39 +17,40 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.support.replication;
|
||||
package org.opensearch.action.support.replication;
|
||||
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.ActionRequest;
|
||||
import org.opensearch.action.ActionResponse;
|
||||
import org.opensearch.action.ActionType;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.cluster.action.shard.ShardStateAction;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.concurrent.ThreadContext;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.plugins.ActionPlugin;
|
||||
import org.elasticsearch.plugins.NetworkPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.plugins.PluginsService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.Transport;
|
||||
import org.elasticsearch.transport.TransportInterceptor;
|
||||
import org.elasticsearch.transport.TransportRequest;
|
||||
import org.elasticsearch.transport.TransportRequestOptions;
|
||||
import org.elasticsearch.transport.TransportResponse;
|
||||
import org.elasticsearch.transport.TransportResponseHandler;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.action.support.ActionFilters;
|
||||
import org.opensearch.cluster.action.shard.ShardStateAction;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.inject.Inject;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.util.concurrent.ThreadContext;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.plugins.ActionPlugin;
|
||||
import org.opensearch.plugins.NetworkPlugin;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.plugins.PluginsService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.opensearch.transport.Transport;
|
||||
import org.opensearch.transport.TransportInterceptor;
|
||||
import org.opensearch.transport.TransportRequest;
|
||||
import org.opensearch.transport.TransportRequestOptions;
|
||||
import org.opensearch.transport.TransportResponse;
|
||||
import org.opensearch.transport.TransportResponseHandler;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import org.hamcrest.Matchers;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -60,11 +61,11 @@ import java.util.concurrent.CountDownLatch;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class TransportReplicationActionRetryOnClosedNodeIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class TransportReplicationActionRetryOnClosedNodeIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.termvectors;
|
||||
package org.opensearch.action.termvectors;
|
||||
|
||||
import org.apache.lucene.document.FieldType;
|
||||
import org.apache.lucene.index.DirectoryReader;
|
||||
|
@ -29,15 +29,15 @@ import org.apache.lucene.util.BytesRef;
|
|||
import org.opensearch.action.ActionFuture;
|
||||
import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsResponse;
|
||||
import org.opensearch.action.admin.indices.alias.Alias;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.lucene.uid.Versions;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.index.engine.VersionConflictEngineException;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.MockKeywordPlugin;
|
||||
import org.opensearch.action.index.IndexRequestBuilder;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.lucene.uid.Versions;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.ToXContent;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.index.engine.VersionConflictEngineException;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.MockKeywordPlugin;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -52,9 +52,9 @@ import java.util.Set;
|
|||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows;
|
||||
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
|
@ -17,22 +17,22 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.termvectors;
|
||||
package org.opensearch.action.termvectors;
|
||||
|
||||
import org.apache.lucene.index.DirectoryReader;
|
||||
import org.apache.lucene.index.Fields;
|
||||
import org.apache.lucene.index.Terms;
|
||||
import org.apache.lucene.index.TermsEnum;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.action.admin.indices.alias.Alias;
|
||||
import org.elasticsearch.common.lucene.uid.Versions;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.IndexNotFoundException;
|
||||
import org.elasticsearch.index.engine.VersionConflictEngineException;
|
||||
import org.opensearch.common.lucene.uid.Versions;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.index.IndexNotFoundException;
|
||||
import org.opensearch.index.engine.VersionConflictEngineException;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.instanceOf;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.aliases;
|
||||
package org.opensearch.aliases;
|
||||
|
||||
import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
|
||||
import org.opensearch.action.admin.indices.alias.Alias;
|
||||
|
@ -25,32 +25,32 @@ import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActi
|
|||
import org.opensearch.action.admin.indices.alias.exists.AliasesExistResponse;
|
||||
import org.opensearch.action.admin.indices.alias.get.GetAliasesResponse;
|
||||
import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder;
|
||||
import org.elasticsearch.action.delete.DeleteResponse;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.action.support.WriteRequest.RefreshPolicy;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.AliasMetadata;
|
||||
import org.elasticsearch.cluster.metadata.IndexAbstraction;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.common.StopWatch;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.index.query.TermQueryBuilder;
|
||||
import org.opensearch.action.delete.DeleteResponse;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.action.search.SearchResponse;
|
||||
import org.opensearch.action.support.IndicesOptions;
|
||||
import org.opensearch.action.support.WriteRequest.RefreshPolicy;
|
||||
import org.opensearch.action.support.master.AcknowledgedResponse;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.AliasMetadata;
|
||||
import org.opensearch.cluster.metadata.IndexAbstraction;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.common.StopWatch;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.index.query.QueryBuilder;
|
||||
import org.opensearch.index.query.QueryBuilders;
|
||||
import org.opensearch.index.query.TermQueryBuilder;
|
||||
import org.opensearch.rest.action.admin.indices.AliasesNotFoundException;
|
||||
import org.elasticsearch.search.SearchHit;
|
||||
import org.elasticsearch.search.SearchHits;
|
||||
import org.elasticsearch.search.aggregations.AggregationBuilders;
|
||||
import org.elasticsearch.search.aggregations.bucket.global.Global;
|
||||
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
|
||||
import org.elasticsearch.search.sort.SortOrder;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.search.SearchHit;
|
||||
import org.opensearch.search.SearchHits;
|
||||
import org.opensearch.search.aggregations.AggregationBuilders;
|
||||
import org.opensearch.search.aggregations.bucket.global.Global;
|
||||
import org.opensearch.search.aggregations.bucket.terms.Terms;
|
||||
import org.opensearch.search.sort.SortOrder;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
|
@ -64,22 +64,22 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.elasticsearch.client.Requests.createIndexRequest;
|
||||
import static org.elasticsearch.client.Requests.deleteRequest;
|
||||
import static org.elasticsearch.client.Requests.indexRequest;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_READ_ONLY_BLOCK;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.rangeQuery;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
|
||||
import static org.elasticsearch.test.hamcrest.CollectionAssertions.hasKey;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
|
||||
import static org.opensearch.client.Requests.createIndexRequest;
|
||||
import static org.opensearch.client.Requests.deleteRequest;
|
||||
import static org.opensearch.client.Requests.indexRequest;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_READ_ONLY_BLOCK;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.index.query.QueryBuilders.rangeQuery;
|
||||
import static org.opensearch.index.query.QueryBuilders.termQuery;
|
||||
import static org.opensearch.test.hamcrest.CollectionAssertions.hasKey;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse;
|
||||
import static org.hamcrest.Matchers.containsInAnyOrder;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.emptyArray;
|
||||
|
@ -88,7 +88,7 @@ import static org.hamcrest.Matchers.lessThan;
|
|||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
public class IndexAliasesIT extends ESIntegTestCase {
|
||||
public class IndexAliasesIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testAliases() throws Exception {
|
||||
logger.info("--> creating index [test]");
|
|
@ -17,28 +17,29 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.blocks;
|
||||
package org.opensearch.blocks;
|
||||
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.action.ActionRequestValidationException;
|
||||
import org.opensearch.action.admin.indices.create.CreateIndexResponse;
|
||||
import org.opensearch.action.admin.indices.exists.indices.IndicesExistsResponse;
|
||||
import org.opensearch.action.admin.indices.readonly.AddIndexBlockRequestBuilder;
|
||||
import org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequestBuilder;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata.APIBlock;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.IndexNotFoundException;
|
||||
import org.elasticsearch.test.BackgroundIndexer;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
|
||||
import org.opensearch.action.index.IndexRequestBuilder;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.action.support.ActiveShardCount;
|
||||
import org.opensearch.action.support.master.AcknowledgedResponse;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.block.ClusterBlockException;
|
||||
import org.opensearch.cluster.block.ClusterBlockLevel;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata.APIBlock;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.index.IndexNotFoundException;
|
||||
import org.opensearch.test.BackgroundIndexer;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -51,13 +52,13 @@ import java.util.stream.IntStream;
|
|||
|
||||
import static java.util.Collections.emptySet;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
import static org.elasticsearch.action.support.IndicesOptions.lenientExpandOpen;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.search.internal.SearchContext.TRACK_TOTAL_HITS_ACCURATE;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.opensearch.action.support.IndicesOptions.lenientExpandOpen;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.search.internal.SearchContext.TRACK_TOTAL_HITS_ACCURATE;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
|
@ -65,8 +66,8 @@ import static org.hamcrest.Matchers.instanceOf;
|
|||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class SimpleBlocksIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class SimpleBlocksIT extends OpenSearchIntegTestCase {
|
||||
public void testVerifyIndexAndClusterReadOnly() throws Exception {
|
||||
// cluster.read_only = null: write and metadata not blocked
|
||||
canCreateIndex("test1");
|
|
@ -17,21 +17,21 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.broadcast;
|
||||
package org.opensearch.broadcast;
|
||||
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.action.search.SearchResponse;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.common.xcontent.XContentFactory;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.elasticsearch.client.Requests.indexRequest;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.client.Requests.indexRequest;
|
||||
import static org.opensearch.index.query.QueryBuilders.termQuery;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class BroadcastActionsIT extends ESIntegTestCase {
|
||||
public class BroadcastActionsIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected int maximumNumberOfReplicas() {
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.bwcompat;
|
||||
package org.opensearch.bwcompat;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -28,18 +28,18 @@ import java.util.List;
|
|||
|
||||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.apache.lucene.util.TestUtil;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.gateway.CorruptStateException;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.gateway.CorruptStateException;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
|
||||
@LuceneTestCase.SuppressCodecs("*")
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0)
|
||||
public class RecoveryWithUnsupportedIndicesIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0)
|
||||
public class RecoveryWithUnsupportedIndicesIT extends OpenSearchIntegTestCase {
|
||||
|
||||
/**
|
||||
* Return settings that could be used to start a node that has the given zipped home directory.
|
|
@ -17,14 +17,14 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.client.documentation;
|
||||
package org.opensearch.client.documentation;
|
||||
|
||||
import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.metadata.MappingMetadata;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.metadata.MappingMetadata;
|
||||
import org.opensearch.common.collect.ImmutableOpenMap;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import static java.util.Collections.singletonMap;
|
||||
import static org.hamcrest.Matchers.instanceOf;
|
||||
|
@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.instanceOf;
|
|||
* include-tagged::{client-tests}/IndicesDocumentationIT.java[your-example-tag-here]
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
public class IndicesDocumentationIT extends ESIntegTestCase {
|
||||
public class IndicesDocumentationIT extends OpenSearchIntegTestCase {
|
||||
|
||||
/**
|
||||
* This test method is used to generate the Put Mapping Java Indices API documentation
|
|
@ -16,18 +16,18 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.node;
|
||||
package org.opensearch.client.node;
|
||||
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
@ClusterScope(scope = Scope.SUITE)
|
||||
public class NodeClientIT extends ESIntegTestCase {
|
||||
public class NodeClientIT extends OpenSearchIntegTestCase {
|
||||
@Override
|
||||
protected Settings nodeSettings(int nodeOrdinal) {
|
||||
return Settings.builder().put(super.nodeSettings(nodeOrdinal)).put(Client.CLIENT_TYPE_SETTING_S.getKey(), "anything").build();
|
|
@ -16,16 +16,16 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.client.transport;
|
||||
package org.opensearch.client.transport;
|
||||
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.transport.TransportAddress;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.elasticsearch.transport.MockTransportClient;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.transport.TransportAddress;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
import org.opensearch.transport.MockTransportClient;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
|
@ -33,10 +33,10 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.elasticsearch.client.transport.TransportClient.CLIENT_TRANSPORT_NODES_SAMPLER_INTERVAL;
|
||||
import static org.opensearch.client.transport.TransportClient.CLIENT_TRANSPORT_NODES_SAMPLER_INTERVAL;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST)
|
||||
public class NodeDisconnectIT extends ESIntegTestCase {
|
||||
public class NodeDisconnectIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testNotifyOnDisconnect() throws IOException {
|
||||
internalCluster().ensureAtLeastNumDataNodes(2);
|
|
@ -17,37 +17,37 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.client.transport;
|
||||
package org.opensearch.client.transport;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.coordination.ClusterBootstrapService;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.network.NetworkModule;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.transport.TransportAddress;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.node.MockNode;
|
||||
import org.elasticsearch.node.Node;
|
||||
import org.elasticsearch.node.NodeValidationException;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.elasticsearch.test.MockHttpTransport;
|
||||
import org.elasticsearch.transport.MockTransportClient;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.coordination.ClusterBootstrapService;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.network.NetworkModule;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.transport.TransportAddress;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.node.MockNode;
|
||||
import org.opensearch.node.Node;
|
||||
import org.opensearch.node.NodeValidationException;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
import org.opensearch.test.MockHttpTransport;
|
||||
import org.opensearch.transport.MockTransportClient;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.elasticsearch.test.NodeRoles.nonDataNode;
|
||||
import static org.opensearch.test.NodeRoles.nonDataNode;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.startsWith;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, transportClientRatio = 1.0)
|
||||
public class TransportClientIT extends ESIntegTestCase {
|
||||
public class TransportClientIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testPickingUpChangesInDiscoveryNode() {
|
||||
String nodeName = internalCluster().startNode(nonDataNode());
|
|
@ -17,23 +17,23 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.client.transport;
|
||||
package org.opensearch.client.transport;
|
||||
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateRequest;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
import org.elasticsearch.action.support.PlainActionFuture;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.ClusterName;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.common.network.NetworkModule;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.transport.TransportAddress;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.elasticsearch.transport.MockTransportClient;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.action.support.PlainActionFuture;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.ClusterName;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.common.network.NetworkModule;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.transport.TransportAddress;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
import org.opensearch.transport.MockTransportClient;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
@ -41,7 +41,7 @@ import java.util.concurrent.ExecutionException;
|
|||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST, numClientNodes = 0, supportsDedicatedMasters = false)
|
||||
public class TransportClientRetryIT extends ESIntegTestCase {
|
||||
public class TransportClientRetryIT extends OpenSearchIntegTestCase {
|
||||
public void testRetry() throws IOException, ExecutionException, InterruptedException {
|
||||
Iterable<TransportService> instances = internalCluster().getInstances(TransportService.class);
|
||||
TransportAddress[] addresses = new TransportAddress[internalCluster().size()];
|
|
@ -17,33 +17,33 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster;
|
||||
package org.opensearch.cluster;
|
||||
|
||||
import org.opensearch.action.ActionFuture;
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.action.support.PlainActionFuture;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.UnassignedInfo;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.opensearch.action.support.IndicesOptions;
|
||||
import org.opensearch.action.support.PlainActionFuture;
|
||||
import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.UnassignedInfo;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
public class ClusterHealthIT extends ESIntegTestCase {
|
||||
public class ClusterHealthIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testSimpleLocalHealth() {
|
||||
createIndex("test");
|
|
@ -17,38 +17,39 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster;
|
||||
package org.opensearch.cluster;
|
||||
|
||||
import com.carrotsearch.hppc.cursors.ObjectCursor;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.ActionRequest;
|
||||
import org.opensearch.action.admin.cluster.node.stats.NodesStatsAction;
|
||||
import org.opensearch.action.admin.indices.stats.IndicesStatsAction;
|
||||
import org.elasticsearch.action.support.ActionFilter;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.routing.RoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.indices.SystemIndexDescriptor;
|
||||
import org.elasticsearch.plugins.ActionPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.plugins.SystemIndexPlugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.action.support.ActionFilter;
|
||||
import org.opensearch.action.support.ActionFilters;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.RoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.collect.ImmutableOpenMap;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.store.Store;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.indices.SystemIndexDescriptor;
|
||||
import org.opensearch.plugins.ActionPlugin;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.plugins.SystemIndexPlugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import org.hamcrest.Matchers;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@ -62,8 +63,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
import static java.util.Collections.emptySet;
|
||||
import static java.util.Collections.singletonList;
|
||||
import static java.util.Collections.unmodifiableSet;
|
||||
import static org.elasticsearch.common.util.set.Sets.newHashSet;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.common.util.set.Sets.newHashSet;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
|
@ -71,8 +72,8 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
|||
/**
|
||||
* Integration tests for the ClusterInfoService collecting information
|
||||
*/
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class ClusterInfoServiceIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class ClusterInfoServiceIT extends OpenSearchIntegTestCase {
|
||||
|
||||
private static final String TEST_SYSTEM_INDEX_NAME = ".test-cluster-info-system-index";
|
||||
|
||||
|
@ -96,7 +97,7 @@ public class ClusterInfoServiceIT extends ESIntegTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
public static class BlockingActionFilter extends org.elasticsearch.action.support.ActionFilter.Simple {
|
||||
public static class BlockingActionFilter extends org.opensearch.action.support.ActionFilter.Simple {
|
||||
private Set<String> blockedActions = emptySet();
|
||||
|
||||
@Override
|
|
@ -17,48 +17,48 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster;
|
||||
package org.opensearch.cluster;
|
||||
|
||||
import com.carrotsearch.hppc.cursors.ObjectCursor;
|
||||
import org.elasticsearch.cluster.block.ClusterBlock;
|
||||
import org.elasticsearch.cluster.block.ClusterBlocks;
|
||||
import org.elasticsearch.cluster.coordination.CoordinationMetadata;
|
||||
import org.elasticsearch.cluster.coordination.CoordinationMetadata.VotingConfigExclusion;
|
||||
import org.elasticsearch.cluster.coordination.NoMasterBlockService;
|
||||
import org.elasticsearch.cluster.metadata.AliasMetadata;
|
||||
import org.elasticsearch.cluster.metadata.IndexGraveyard;
|
||||
import org.elasticsearch.cluster.metadata.IndexGraveyardTests;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.cluster.metadata.RepositoriesMetadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||
import org.elasticsearch.cluster.routing.IndexRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.RoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.ShardRoutingState;
|
||||
import org.elasticsearch.cluster.routing.TestShardRouting;
|
||||
import org.elasticsearch.cluster.routing.UnassignedInfo;
|
||||
import org.elasticsearch.common.UUIDs;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.common.io.stream.BytesStreamOutput;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.set.Sets;
|
||||
import org.elasticsearch.gateway.GatewayService;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.snapshots.Snapshot;
|
||||
import org.elasticsearch.snapshots.SnapshotId;
|
||||
import org.elasticsearch.snapshots.SnapshotInfoTests;
|
||||
import org.elasticsearch.snapshots.SnapshotsInProgressSerializationTests;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.cluster.block.ClusterBlock;
|
||||
import org.opensearch.cluster.block.ClusterBlocks;
|
||||
import org.opensearch.cluster.coordination.CoordinationMetadata;
|
||||
import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfigExclusion;
|
||||
import org.opensearch.cluster.coordination.NoMasterBlockService;
|
||||
import org.opensearch.cluster.metadata.AliasMetadata;
|
||||
import org.opensearch.cluster.metadata.IndexGraveyard;
|
||||
import org.opensearch.cluster.metadata.IndexGraveyardTests;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.IndexTemplateMetadata;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.cluster.metadata.RepositoriesMetadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.node.DiscoveryNodes;
|
||||
import org.opensearch.cluster.routing.IndexRoutingTable;
|
||||
import org.opensearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.opensearch.cluster.routing.RoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.ShardRoutingState;
|
||||
import org.opensearch.cluster.routing.TestShardRouting;
|
||||
import org.opensearch.cluster.routing.UnassignedInfo;
|
||||
import org.opensearch.common.UUIDs;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.collect.ImmutableOpenMap;
|
||||
import org.opensearch.common.io.stream.BytesStreamOutput;
|
||||
import org.opensearch.common.io.stream.NamedWriteableAwareStreamInput;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.util.set.Sets;
|
||||
import org.opensearch.gateway.GatewayService;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.query.QueryBuilders;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.snapshots.Snapshot;
|
||||
import org.opensearch.snapshots.SnapshotId;
|
||||
import org.opensearch.snapshots.SnapshotInfoTests;
|
||||
import org.opensearch.snapshots.SnapshotsInProgressSerializationTests;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -67,18 +67,18 @@ import java.util.Set;
|
|||
import static java.util.Collections.emptyList;
|
||||
import static java.util.Collections.emptyMap;
|
||||
import static java.util.Collections.emptySet;
|
||||
import static org.elasticsearch.cluster.metadata.AliasMetadata.newAliasMetadataBuilder;
|
||||
import static org.elasticsearch.cluster.routing.RandomShardRoutingMutator.randomChange;
|
||||
import static org.elasticsearch.cluster.routing.RandomShardRoutingMutator.randomReason;
|
||||
import static org.elasticsearch.test.VersionUtils.randomVersion;
|
||||
import static org.elasticsearch.test.XContentTestUtils.convertToMap;
|
||||
import static org.elasticsearch.test.XContentTestUtils.differenceBetweenMapsIgnoringArrayOrder;
|
||||
import static org.opensearch.cluster.metadata.AliasMetadata.newAliasMetadataBuilder;
|
||||
import static org.opensearch.cluster.routing.RandomShardRoutingMutator.randomChange;
|
||||
import static org.opensearch.cluster.routing.RandomShardRoutingMutator.randomReason;
|
||||
import static org.opensearch.test.VersionUtils.randomVersion;
|
||||
import static org.opensearch.test.XContentTestUtils.convertToMap;
|
||||
import static org.opensearch.test.XContentTestUtils.differenceBetweenMapsIgnoringArrayOrder;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 0, numClientNodes = 0)
|
||||
public class ClusterStateDiffIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 0, numClientNodes = 0)
|
||||
public class ClusterStateDiffIT extends OpenSearchIntegTestCase {
|
||||
public void testClusterStateDiffSerialization() throws Exception {
|
||||
NamedWriteableRegistry namedWriteableRegistry = new NamedWriteableRegistry(ClusterModule.getNamedWriteables());
|
||||
DiscoveryNode masterNode = randomNode("master");
|
|
@ -17,34 +17,34 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster;
|
||||
package org.opensearch.cluster;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.metadata.IndexGraveyard;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.CheckedFunction;
|
||||
import org.elasticsearch.common.ParseField;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.repositories.RepositoriesService;
|
||||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.watcher.ResourceWatcherService;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.metadata.IndexGraveyard;
|
||||
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.CheckedFunction;
|
||||
import org.opensearch.common.ParseField;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.collect.ImmutableOpenMap;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.common.io.stream.Writeable;
|
||||
import org.opensearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.common.xcontent.XContentParser;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.repositories.RepositoriesService;
|
||||
import org.opensearch.script.ScriptService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.opensearch.watcher.ResourceWatcherService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -59,8 +59,8 @@ import java.util.Set;
|
|||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK;
|
||||
import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST;
|
||||
import static org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK;
|
||||
import static org.opensearch.test.OpenSearchIntegTestCase.Scope.TEST;
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.CoreMatchers.not;
|
||||
import static org.hamcrest.Matchers.hasItem;
|
||||
|
@ -72,8 +72,8 @@ import static org.hamcrest.Matchers.instanceOf;
|
|||
* check that the client can de-serialize a cluster state response based on the fact that the response should not contain customs that the
|
||||
* transport client does not understand based on the fact that it only presents the node-and-transport-client-feature.
|
||||
*/
|
||||
@ESIntegTestCase.ClusterScope(scope = TEST)
|
||||
public class ClusterStateIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = TEST)
|
||||
public class ClusterStateIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public abstract static
|
||||
class Custom implements Metadata.Custom {
|
|
@ -17,30 +17,30 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster;
|
||||
package org.opensearch.cluster;
|
||||
|
||||
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction;
|
||||
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest;
|
||||
import org.opensearch.action.admin.cluster.configuration.ClearVotingConfigExclusionsAction;
|
||||
import org.opensearch.action.admin.cluster.configuration.ClearVotingConfigExclusionsRequest;
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.coordination.FailedToCommitClusterStateException;
|
||||
import org.elasticsearch.cluster.coordination.NoMasterBlockService;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.set.Sets;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.elasticsearch.test.disruption.NetworkDisruption;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.coordination.FailedToCommitClusterStateException;
|
||||
import org.opensearch.cluster.coordination.NoMasterBlockService;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.util.set.Sets;
|
||||
import org.opensearch.index.query.QueryBuilders;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
import org.opensearch.test.disruption.NetworkDisruption;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -52,8 +52,8 @@ import java.util.Set;
|
|||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoTimeout;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.instanceOf;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
|
@ -61,7 +61,7 @@ import static org.hamcrest.Matchers.notNullValue;
|
|||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class MinimumMasterNodesIT extends ESIntegTestCase {
|
||||
public class MinimumMasterNodesIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -17,37 +17,37 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster;
|
||||
package org.opensearch.cluster;
|
||||
|
||||
import org.opensearch.action.ActionRequestBuilder;
|
||||
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction;
|
||||
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
import org.elasticsearch.action.bulk.BulkRequestBuilder;
|
||||
import org.elasticsearch.action.get.GetResponse;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.support.AutoCreateIndex;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.action.index.MappingUpdatedAction;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.coordination.NoMasterBlockService;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.discovery.MasterNotDiscoveredException;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.opensearch.action.bulk.BulkRequestBuilder;
|
||||
import org.opensearch.action.get.GetResponse;
|
||||
import org.opensearch.action.search.SearchResponse;
|
||||
import org.opensearch.action.support.AutoCreateIndex;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.action.index.MappingUpdatedAction;
|
||||
import org.opensearch.cluster.block.ClusterBlockException;
|
||||
import org.opensearch.cluster.coordination.NoMasterBlockService;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.xcontent.XContentFactory;
|
||||
import org.opensearch.discovery.MasterNotDiscoveredException;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
import org.elasticsearch.script.Script;
|
||||
import org.elasticsearch.script.ScriptType;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.elasticsearch.test.disruption.NetworkDisruption;
|
||||
import org.elasticsearch.test.disruption.NetworkDisruption.IsolateAllNodes;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.opensearch.script.Script;
|
||||
import org.opensearch.script.ScriptType;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
import org.opensearch.test.disruption.NetworkDisruption;
|
||||
import org.opensearch.test.disruption.NetworkDisruption.IsolateAllNodes;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -55,14 +55,14 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertExists;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertExists;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
|
||||
public class NoMasterNodeIT extends ESIntegTestCase {
|
||||
public class NoMasterNodeIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected int numberOfReplicas() {
|
|
@ -17,44 +17,45 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster;
|
||||
package org.opensearch.cluster;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
import org.opensearch.action.admin.indices.template.get.GetIndexTemplatesResponse;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.elasticsearch.cluster.metadata.MappingMetadata;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.cluster.routing.RoutingTable;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.UUIDs;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.index.IndexNotFoundException;
|
||||
import org.elasticsearch.index.mapper.MapperService;
|
||||
import org.elasticsearch.plugins.ClusterPlugin;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.repositories.RepositoriesService;
|
||||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.hamcrest.CollectionAssertions;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.watcher.ResourceWatcherService;
|
||||
import org.opensearch.action.support.IndicesOptions;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.opensearch.cluster.metadata.MappingMetadata;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.cluster.routing.RoutingTable;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.UUIDs;
|
||||
import org.opensearch.common.collect.ImmutableOpenMap;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.common.xcontent.XContentFactory;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.index.IndexNotFoundException;
|
||||
import org.opensearch.index.mapper.MapperService;
|
||||
import org.opensearch.plugins.ClusterPlugin;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.repositories.RepositoriesService;
|
||||
import org.opensearch.script.ScriptService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.hamcrest.CollectionAssertions;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.opensearch.watcher.ResourceWatcherService;
|
||||
|
||||
import org.junit.Before;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -65,9 +66,9 @@ import java.util.List;
|
|||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertIndexTemplateExists;
|
||||
import static org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertIndexTemplateExists;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
|
@ -77,7 +78,7 @@ import static org.hamcrest.Matchers.is;
|
|||
* Checking simple filtering capabilities of the cluster state
|
||||
*
|
||||
*/
|
||||
public class SimpleClusterStateIT extends ESIntegTestCase {
|
||||
public class SimpleClusterStateIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -17,30 +17,31 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster;
|
||||
package org.opensearch.cluster;
|
||||
|
||||
import org.opensearch.action.UnavailableShardsException;
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.action.support.ActiveShardCount;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
|
||||
import static org.opensearch.client.Requests.createIndexRequest;
|
||||
import static org.opensearch.common.unit.TimeValue.timeValueSeconds;
|
||||
import static org.opensearch.test.NodeRoles.dataNode;
|
||||
import static org.opensearch.test.NodeRoles.nonDataNode;
|
||||
|
||||
import static org.elasticsearch.client.Requests.createIndexRequest;
|
||||
import static org.elasticsearch.common.unit.TimeValue.timeValueSeconds;
|
||||
import static org.elasticsearch.test.NodeRoles.dataNode;
|
||||
import static org.elasticsearch.test.NodeRoles.nonDataNode;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
|
||||
public class SimpleDataNodesIT extends ESIntegTestCase {
|
||||
public class SimpleDataNodesIT extends OpenSearchIntegTestCase {
|
||||
|
||||
private static final String SOURCE = "{\"type1\":{\"id\":\"1\",\"name\":\"test\"}}";
|
||||
|
|
@ -17,31 +17,31 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster;
|
||||
package org.opensearch.cluster;
|
||||
|
||||
import org.apache.lucene.search.join.ScoreMode;
|
||||
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction;
|
||||
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.discovery.MasterNotDiscoveredException;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.discovery.MasterNotDiscoveredException;
|
||||
import org.opensearch.index.query.QueryBuilders;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.elasticsearch.test.NodeRoles.dataOnlyNode;
|
||||
import static org.elasticsearch.test.NodeRoles.masterNode;
|
||||
import static org.elasticsearch.test.NodeRoles.nonDataNode;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.NodeRoles.dataOnlyNode;
|
||||
import static org.opensearch.test.NodeRoles.masterNode;
|
||||
import static org.opensearch.test.NodeRoles.nonDataNode;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class SpecificMasterNodesIT extends ESIntegTestCase {
|
||||
public class SpecificMasterNodesIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testSimpleOnlyMasterNodeElection() throws IOException {
|
||||
internalCluster().setBootstrapMasterNodeIndex(0);
|
|
@ -17,21 +17,21 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster;
|
||||
package org.opensearch.cluster;
|
||||
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
|
||||
import static org.elasticsearch.test.NodeRoles.nonDataNode;
|
||||
import static org.elasticsearch.test.NodeRoles.nonMasterNode;
|
||||
import static org.opensearch.test.NodeRoles.nonDataNode;
|
||||
import static org.opensearch.test.NodeRoles.nonMasterNode;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ClusterScope(scope= Scope.TEST, numDataNodes =0)
|
||||
public class UpdateSettingsValidationIT extends ESIntegTestCase {
|
||||
public class UpdateSettingsValidationIT extends OpenSearchIntegTestCase {
|
||||
public void testUpdateSettingsValidation() throws Exception {
|
||||
internalCluster().startNodes(nonDataNode(), nonMasterNode(), nonMasterNode());
|
||||
|
|
@ -16,31 +16,32 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.action.shard;
|
||||
|
||||
package org.opensearch.cluster.action.shard;
|
||||
|
||||
import org.opensearch.action.ActionFuture;
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.ClusterStateUpdateTask;
|
||||
import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class ShardStateActionIT extends ESIntegTestCase {
|
||||
public class ShardStateActionIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Settings nodeSettings(int nodeOrdinal) {
|
|
@ -17,36 +17,36 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.allocation;
|
||||
package org.opensearch.cluster.allocation;
|
||||
|
||||
import com.carrotsearch.hppc.ObjectIntHashMap;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata.State;
|
||||
import org.elasticsearch.cluster.routing.IndexRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.AwarenessAllocationDecider;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata.State;
|
||||
import org.opensearch.cluster.routing.IndexRoutingTable;
|
||||
import org.opensearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.allocation.decider.AwarenessAllocationDecider;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.anyOf;
|
||||
import static org.hamcrest.Matchers.empty;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ClusterScope(scope= ESIntegTestCase.Scope.TEST, numDataNodes =0, minNumDataNodes = 2)
|
||||
public class AwarenessAllocationIT extends ESIntegTestCase {
|
||||
@ClusterScope(scope= OpenSearchIntegTestCase.Scope.TEST, numDataNodes =0, minNumDataNodes = 2)
|
||||
public class AwarenessAllocationIT extends OpenSearchIntegTestCase {
|
||||
|
||||
private final Logger logger = LogManager.getLogger(AwarenessAllocationIT.class);
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.allocation;
|
||||
package org.opensearch.cluster.allocation;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
@ -26,51 +26,51 @@ import org.apache.lucene.util.LuceneTestCase;
|
|||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.opensearch.action.admin.cluster.reroute.ClusterRerouteResponse;
|
||||
import org.opensearch.action.admin.cluster.reroute.TransportClusterRerouteAction;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
import org.elasticsearch.action.support.WriteRequest.RefreshPolicy;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.ShardRoutingState;
|
||||
import org.elasticsearch.cluster.routing.UnassignedInfo;
|
||||
import org.elasticsearch.cluster.routing.allocation.RerouteExplanation;
|
||||
import org.elasticsearch.cluster.routing.allocation.RoutingExplanations;
|
||||
import org.elasticsearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand;
|
||||
import org.elasticsearch.cluster.routing.allocation.command.AllocationCommand;
|
||||
import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.Decision;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.Allocation;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.io.FileSystemUtils;
|
||||
import org.elasticsearch.common.logging.Loggers;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.core.internal.io.IOUtils;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.elasticsearch.test.MockLogAppender;
|
||||
import org.opensearch.action.support.ActiveShardCount;
|
||||
import org.opensearch.action.support.WriteRequest.RefreshPolicy;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.ShardRoutingState;
|
||||
import org.opensearch.cluster.routing.UnassignedInfo;
|
||||
import org.opensearch.cluster.routing.allocation.RerouteExplanation;
|
||||
import org.opensearch.cluster.routing.allocation.RoutingExplanations;
|
||||
import org.opensearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand;
|
||||
import org.opensearch.cluster.routing.allocation.command.AllocationCommand;
|
||||
import org.opensearch.cluster.routing.allocation.command.MoveAllocationCommand;
|
||||
import org.opensearch.cluster.routing.allocation.decider.Decision;
|
||||
import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.Allocation;
|
||||
import org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.io.FileSystemUtils;
|
||||
import org.opensearch.common.logging.Loggers;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.core.internal.io.IOUtils;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
import org.opensearch.test.MockLogAppender;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
|
@ -78,7 +78,7 @@ import static org.hamcrest.Matchers.hasSize;
|
|||
// testDelayWithALargeAmountOfShards does a lot of cluster state updates, and WindowsFS slows it down too much (#52000)
|
||||
@LuceneTestCase.SuppressFileSystems(value = "WindowsFS")
|
||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
|
||||
public class ClusterRerouteIT extends ESIntegTestCase {
|
||||
public class ClusterRerouteIT extends OpenSearchIntegTestCase {
|
||||
private final Logger logger = LogManager.getLogger(ClusterRerouteIT.class);
|
||||
|
||||
public void testRerouteWithCommands_disableAllocationSettings() throws Exception {
|
|
@ -17,35 +17,35 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.allocation;
|
||||
package org.opensearch.cluster.allocation;
|
||||
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.cluster.metadata.AutoExpandReplicas;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.IndexRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.ShardRoutingState;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.cluster.metadata.AutoExpandReplicas;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.IndexRoutingTable;
|
||||
import org.opensearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.ShardRoutingState;
|
||||
import org.opensearch.cluster.routing.allocation.decider.FilterAllocationDecider;
|
||||
import org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.index.query.QueryBuilders;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ClusterScope(scope= Scope.TEST, numDataNodes =0)
|
||||
public class FilteringAllocationIT extends ESIntegTestCase {
|
||||
public class FilteringAllocationIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testDecommissionNodeNoReplicas() {
|
||||
logger.info("--> starting 2 nodes");
|
|
@ -16,18 +16,18 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.allocation;
|
||||
package org.opensearch.cluster.allocation;
|
||||
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.routing.RoutingNode;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.routing.RoutingNode;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class SimpleAllocationIT extends ESIntegTestCase {
|
||||
public class SimpleAllocationIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected int numberOfShards() {
|
|
@ -17,40 +17,41 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.coordination;
|
||||
package org.opensearch.cluster.coordination;
|
||||
|
||||
import org.opensearch.OpenSearchParseException;
|
||||
import org.opensearch.Version;
|
||||
|
||||
import org.elasticsearch.OpenSearchParseException;
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.action.ActionFuture;
|
||||
import org.opensearch.action.ActionRequest;
|
||||
import org.opensearch.action.ActionRequestBuilder;
|
||||
import org.opensearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
||||
import org.elasticsearch.cluster.block.ClusterBlocks;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.MappingMetadata;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||
import org.elasticsearch.cluster.routing.RoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.allocation.AllocationService;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.discovery.Discovery;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.mapper.DocumentMapper;
|
||||
import org.elasticsearch.index.mapper.MapperService;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.disruption.BlockClusterStateProcessing;
|
||||
import org.elasticsearch.transport.TransportSettings;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.action.support.master.AcknowledgedResponse;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.ClusterStateUpdateTask;
|
||||
import org.opensearch.cluster.block.ClusterBlocks;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.MappingMetadata;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.node.DiscoveryNodes;
|
||||
import org.opensearch.cluster.routing.RoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.allocation.AllocationService;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.collect.ImmutableOpenMap;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.discovery.Discovery;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.mapper.DocumentMapper;
|
||||
import org.opensearch.index.mapper.MapperService;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.disruption.BlockClusterStateProcessing;
|
||||
import org.opensearch.transport.TransportSettings;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -59,15 +60,17 @@ import java.util.concurrent.TimeUnit;
|
|||
import static java.util.Collections.emptyMap;
|
||||
import static java.util.Collections.emptySet;
|
||||
import static org.opensearch.action.DocWriteResponse.Result.CREATED;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.hasItem;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.hamcrest.Matchers.instanceOf;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0)
|
||||
public class RareClusterStateIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0)
|
||||
public class RareClusterStateIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected int numberOfShards() {
|
|
@ -16,21 +16,21 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.coordination;
|
||||
package org.opensearch.cluster.coordination;
|
||||
|
||||
import joptsimple.OptionSet;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.cli.MockTerminal;
|
||||
import org.elasticsearch.cli.UserException;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.TestEnvironment;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.cli.MockTerminal;
|
||||
import org.opensearch.cli.UserException;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.env.TestEnvironment;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class RemoveCustomsCommandIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class RemoveCustomsCommandIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testRemoveCustomsAbortedByUser() throws Exception {
|
||||
internalCluster().setBootstrapMasterNodeIndex(0);
|
|
@ -16,24 +16,24 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.coordination;
|
||||
package org.opensearch.cluster.coordination;
|
||||
|
||||
import joptsimple.OptionSet;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.cli.MockTerminal;
|
||||
import org.elasticsearch.cli.UserException;
|
||||
import org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.TestEnvironment;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.cli.MockTerminal;
|
||||
import org.opensearch.cli.UserException;
|
||||
import org.opensearch.cluster.routing.allocation.DiskThresholdSettings;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.env.TestEnvironment;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import static org.hamcrest.Matchers.contains;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class RemoveSettingsCommandIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class RemoveSettingsCommandIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testRemoveSettingsAbortedByUser() throws Exception {
|
||||
internalCluster().setBootstrapMasterNodeIndex(0);
|
|
@ -16,43 +16,44 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.coordination;
|
||||
package org.opensearch.cluster.coordination;
|
||||
|
||||
import joptsimple.OptionSet;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest;
|
||||
import org.elasticsearch.cli.MockTerminal;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.discovery.DiscoverySettings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.env.TestEnvironment;
|
||||
import org.elasticsearch.gateway.GatewayMetaState;
|
||||
import org.elasticsearch.gateway.PersistedClusterStateService;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.opensearch.cli.MockTerminal;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.discovery.DiscoverySettings;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.env.TestEnvironment;
|
||||
import org.opensearch.gateway.GatewayMetaState;
|
||||
import org.opensearch.gateway.PersistedClusterStateService;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE;
|
||||
import static org.elasticsearch.gateway.DanglingIndicesState.AUTO_IMPORT_DANGLING_INDICES_SETTING;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.elasticsearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING;
|
||||
import static org.elasticsearch.test.NodeRoles.nonMasterNode;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE;
|
||||
import static org.opensearch.gateway.DanglingIndicesState.AUTO_IMPORT_DANGLING_INDICES_SETTING;
|
||||
import static org.opensearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.opensearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING;
|
||||
import static org.opensearch.test.NodeRoles.nonMasterNode;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class UnsafeBootstrapAndDetachCommandIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class UnsafeBootstrapAndDetachCommandIT extends OpenSearchIntegTestCase {
|
||||
|
||||
private MockTerminal executeCommand(OpenSearchNodeCommand command, Environment environment, int nodeOrdinal, boolean abort)
|
||||
throws Exception {
|
|
@ -16,18 +16,18 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.coordination;
|
||||
package org.opensearch.cluster.coordination;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction;
|
||||
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -40,8 +40,8 @@ import static org.hamcrest.Matchers.hasItem;
|
|||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class VotingConfigurationIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false)
|
||||
public class VotingConfigurationIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -16,7 +16,8 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.coordination;
|
||||
|
||||
package org.opensearch.cluster.coordination;
|
||||
|
||||
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction;
|
||||
import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest;
|
||||
|
@ -26,27 +27,27 @@ import org.opensearch.action.admin.cluster.health.ClusterHealthRequest;
|
|||
import org.opensearch.action.admin.cluster.health.ClusterHealthRequestBuilder;
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.opensearch.action.admin.indices.create.CreateIndexRequest;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.Manifest;
|
||||
import org.elasticsearch.cluster.routing.UnassignedInfo;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.Allocation;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.discovery.Discovery;
|
||||
import org.elasticsearch.discovery.DiscoveryModule;
|
||||
import org.elasticsearch.discovery.zen.ElectMasterService;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.gateway.MetaStateService;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster.RestartCallback;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.Manifest;
|
||||
import org.opensearch.cluster.routing.UnassignedInfo;
|
||||
import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.Allocation;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.discovery.Discovery;
|
||||
import org.opensearch.discovery.DiscoveryModule;
|
||||
import org.opensearch.discovery.zen.ElectMasterService;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.gateway.MetaStateService;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster.RestartCallback;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -56,22 +57,22 @@ import java.util.stream.Collectors;
|
|||
import java.util.stream.IntStream;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import static org.elasticsearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING;
|
||||
import static org.elasticsearch.cluster.coordination.Coordinator.ZEN1_BWC_TERM;
|
||||
import static org.elasticsearch.cluster.coordination.FollowersChecker.FOLLOWER_CHECK_ACTION_NAME;
|
||||
import static org.elasticsearch.cluster.coordination.JoinHelper.START_JOIN_ACTION_NAME;
|
||||
import static org.elasticsearch.cluster.coordination.PublicationTransportHandler.PUBLISH_STATE_ACTION_NAME;
|
||||
import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING;
|
||||
import static org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider.CLUSTER_ROUTING_EXCLUDE_GROUP_SETTING;
|
||||
import static org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK;
|
||||
import static org.elasticsearch.node.Node.NODE_NAME_SETTING;
|
||||
import static org.elasticsearch.test.InternalTestCluster.REMOVED_MINIMUM_MASTER_NODES;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING;
|
||||
import static org.opensearch.cluster.coordination.Coordinator.ZEN1_BWC_TERM;
|
||||
import static org.opensearch.cluster.coordination.FollowersChecker.FOLLOWER_CHECK_ACTION_NAME;
|
||||
import static org.opensearch.cluster.coordination.JoinHelper.START_JOIN_ACTION_NAME;
|
||||
import static org.opensearch.cluster.coordination.PublicationTransportHandler.PUBLISH_STATE_ACTION_NAME;
|
||||
import static org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING;
|
||||
import static org.opensearch.cluster.routing.allocation.decider.FilterAllocationDecider.CLUSTER_ROUTING_EXCLUDE_GROUP_SETTING;
|
||||
import static org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK;
|
||||
import static org.opensearch.node.Node.NODE_NAME_SETTING;
|
||||
import static org.opensearch.test.InternalTestCluster.REMOVED_MINIMUM_MASTER_NODES;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class Zen1IT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class Zen1IT extends OpenSearchIntegTestCase {
|
||||
|
||||
private static Settings ZEN1_SETTINGS = Coordinator.addZen1Attribute(true, Settings.builder()
|
||||
.put(DiscoveryModule.DISCOVERY_TYPE_SETTING.getKey(), DiscoveryModule.ZEN_DISCOVERY_TYPE)
|
|
@ -17,27 +17,27 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.coordination;
|
||||
package org.opensearch.cluster.coordination;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse;
|
||||
import org.opensearch.action.admin.indices.recovery.RecoveryResponse;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.discovery.Discovery;
|
||||
import org.elasticsearch.discovery.DiscoveryStats;
|
||||
import org.elasticsearch.discovery.zen.FaultDetection;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.TestCustomMetadata;
|
||||
import org.elasticsearch.transport.RemoteTransportException;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.ToXContent;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.common.xcontent.XContentFactory;
|
||||
import org.opensearch.discovery.Discovery;
|
||||
import org.opensearch.discovery.DiscoveryStats;
|
||||
import org.opensearch.discovery.zen.FaultDetection;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.TestCustomMetadata;
|
||||
import org.opensearch.transport.RemoteTransportException;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Optional;
|
||||
|
@ -47,8 +47,8 @@ import java.util.concurrent.TimeUnit;
|
|||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import static org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest.Metric.DISCOVERY;
|
||||
import static org.elasticsearch.test.NodeRoles.dataNode;
|
||||
import static org.elasticsearch.test.NodeRoles.masterOnlyNode;
|
||||
import static org.opensearch.test.NodeRoles.dataNode;
|
||||
import static org.opensearch.test.NodeRoles.masterOnlyNode;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
|
@ -56,8 +56,8 @@ import static org.hamcrest.Matchers.is;
|
|||
import static org.hamcrest.Matchers.not;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0)
|
||||
public class ZenDiscoveryIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0)
|
||||
public class ZenDiscoveryIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testNoShardRelocationsOccurWhenElectedMasterNodeFails() throws Exception {
|
||||
Settings defaultSettings = Settings.builder()
|
|
@ -17,24 +17,24 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.metadata;
|
||||
package org.opensearch.cluster.metadata;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.repositories.RepositoriesService;
|
||||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.watcher.ResourceWatcherService;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.repositories.RepositoriesService;
|
||||
import org.opensearch.script.ScriptService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.opensearch.watcher.ResourceWatcherService;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -44,12 +44,12 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import java.util.function.Supplier;
|
||||
import java.util.function.UnaryOperator;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class TemplateUpgradeServiceIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class TemplateUpgradeServiceIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -17,15 +17,15 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.metadata;
|
||||
package org.opensearch.cluster.metadata;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESSingleNodeTestCase;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.test.OpenSearchSingleNodeTestCase;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class UpgradeIndexSettingsIT extends ESSingleNodeTestCase {
|
||||
public class UpgradeIndexSettingsIT extends OpenSearchSingleNodeTestCase {
|
||||
|
||||
@Override
|
||||
protected boolean forbidPrivateIndexSettings() {
|
|
@ -17,14 +17,15 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.node;
|
||||
package org.opensearch.cluster.node;
|
||||
|
||||
import org.opensearch.action.admin.cluster.node.info.NodesInfoResponse;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import org.hamcrest.Matcher;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -32,13 +33,13 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.elasticsearch.test.NodeRoles.addRoles;
|
||||
import static org.elasticsearch.test.NodeRoles.removeRoles;
|
||||
import static org.opensearch.test.NodeRoles.addRoles;
|
||||
import static org.opensearch.test.NodeRoles.removeRoles;
|
||||
import static org.hamcrest.Matchers.hasItem;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
|
||||
public class DiscoveryNodeRoleIT extends ESIntegTestCase {
|
||||
public class DiscoveryNodeRoleIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public static class AdditionalRolePlugin extends Plugin {
|
||||
|
|
@ -17,35 +17,36 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.routing;
|
||||
package org.opensearch.cluster.routing;
|
||||
|
||||
import org.apache.lucene.store.SimpleFSDirectory;
|
||||
|
||||
import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplanation;
|
||||
import org.opensearch.action.admin.indices.stats.ShardStats;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.client.Requests;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.allocation.AllocationDecision;
|
||||
import org.elasticsearch.cluster.routing.allocation.ShardAllocationDecision;
|
||||
import org.elasticsearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.IndexSettings;
|
||||
import org.elasticsearch.index.MockEngineFactoryPlugin;
|
||||
import org.elasticsearch.index.engine.Engine;
|
||||
import org.elasticsearch.index.shard.RemoveCorruptedShardDataCommandIT;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.shard.ShardPath;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.DummyShardLock;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalSettingsPlugin;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.opensearch.action.index.IndexRequestBuilder;
|
||||
import org.opensearch.client.Requests;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.allocation.AllocationDecision;
|
||||
import org.opensearch.cluster.routing.allocation.ShardAllocationDecision;
|
||||
import org.opensearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.IndexSettings;
|
||||
import org.opensearch.index.MockEngineFactoryPlugin;
|
||||
import org.opensearch.index.engine.Engine;
|
||||
import org.opensearch.index.shard.RemoveCorruptedShardDataCommandIT;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.shard.ShardPath;
|
||||
import org.opensearch.index.store.Store;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.DummyShardLock;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalSettingsPlugin;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
|
@ -54,16 +55,16 @@ import java.util.Collection;
|
|||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.opensearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 0)
|
||||
public class AllocationIdIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 0)
|
||||
public class AllocationIdIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -17,24 +17,24 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.routing;
|
||||
package org.opensearch.cluster.routing;
|
||||
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.opensearch.action.index.IndexRequestBuilder;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class DelayedAllocationIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class DelayedAllocationIT extends OpenSearchIntegTestCase {
|
||||
|
||||
/**
|
||||
* Verifies that when there is no delay timeout, a 1/1 index shard will immediately
|
|
@ -1,4 +1,4 @@
|
|||
package org.elasticsearch.cluster.routing;
|
||||
package org.opensearch.cluster.routing;
|
||||
|
||||
/*
|
||||
* Licensed to Elasticsearch under one or more contributor
|
||||
|
@ -24,35 +24,35 @@ import org.opensearch.action.DocWriteResponse;
|
|||
import org.opensearch.action.admin.cluster.reroute.ClusterRerouteRequestBuilder;
|
||||
import org.opensearch.action.admin.indices.shards.IndicesShardStoresResponse;
|
||||
import org.opensearch.action.admin.indices.stats.ShardStats;
|
||||
import org.elasticsearch.action.bulk.BulkResponse;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateListener;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand;
|
||||
import org.elasticsearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenIntMap;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.set.Sets;
|
||||
import org.elasticsearch.gateway.GatewayAllocator;
|
||||
import org.elasticsearch.index.IndexNotFoundException;
|
||||
import org.elasticsearch.index.engine.Engine;
|
||||
import org.elasticsearch.index.engine.EngineTestCase;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.IndexShardTestCase;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalSettingsPlugin;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.elasticsearch.test.disruption.NetworkDisruption;
|
||||
import org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.opensearch.action.bulk.BulkResponse;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.action.support.ActiveShardCount;
|
||||
import org.opensearch.action.support.IndicesOptions;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.ClusterStateListener;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand;
|
||||
import org.opensearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.collect.ImmutableOpenIntMap;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.util.set.Sets;
|
||||
import org.opensearch.gateway.GatewayAllocator;
|
||||
import org.opensearch.index.IndexNotFoundException;
|
||||
import org.opensearch.index.engine.Engine;
|
||||
import org.opensearch.index.engine.EngineTestCase;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.IndexShardTestCase;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalSettingsPlugin;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
import org.opensearch.test.disruption.NetworkDisruption;
|
||||
import org.opensearch.test.disruption.NetworkDisruption.TwoPartitions;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -67,12 +67,12 @@ import java.util.concurrent.TimeUnit;
|
|||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS;
|
||||
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS;
|
||||
import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
|
||||
import static org.opensearch.index.query.QueryBuilders.matchAllQuery;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount;
|
||||
import static org.hamcrest.Matchers.empty;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.everyItem;
|
||||
|
@ -81,8 +81,8 @@ import static org.hamcrest.Matchers.in;
|
|||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class PrimaryAllocationIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class PrimaryAllocationIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -16,20 +16,20 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.routing.allocation;
|
||||
package org.opensearch.cluster.routing.allocation;
|
||||
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.health.ClusterHealthStatus;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class ShardStateIT extends ESIntegTestCase {
|
||||
public class ShardStateIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testPrimaryFailureIncreasesTerm() throws Exception {
|
||||
internalCluster().ensureAtLeastNumDataNodes(2);
|
|
@ -17,42 +17,44 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.routing.allocation.decider;
|
||||
package org.opensearch.cluster.routing.allocation.decider;
|
||||
|
||||
import org.apache.lucene.mockfile.FilterFileStore;
|
||||
import org.apache.lucene.mockfile.FilterFileSystemProvider;
|
||||
import org.apache.lucene.mockfile.FilterPath;
|
||||
import org.apache.lucene.util.Constants;
|
||||
|
||||
import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
|
||||
import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
|
||||
import org.opensearch.action.admin.indices.stats.ShardStats;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.cluster.ClusterInfoService;
|
||||
import org.elasticsearch.cluster.InternalClusterInfoService;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.ShardRoutingState;
|
||||
import org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.Rebalance;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.io.PathUtils;
|
||||
import org.elasticsearch.common.io.PathUtilsForTesting;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeUnit;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.core.internal.io.IOUtils;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.monitor.fs.FsService;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.repositories.fs.FsRepository;
|
||||
import org.elasticsearch.snapshots.RestoreInfo;
|
||||
import org.elasticsearch.snapshots.SnapshotInfo;
|
||||
import org.elasticsearch.snapshots.SnapshotState;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalSettingsPlugin;
|
||||
import org.opensearch.action.index.IndexRequestBuilder;
|
||||
import org.opensearch.cluster.ClusterInfoService;
|
||||
import org.opensearch.cluster.InternalClusterInfoService;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.ShardRoutingState;
|
||||
import org.opensearch.cluster.routing.allocation.DiskThresholdSettings;
|
||||
import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.Rebalance;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.io.PathUtils;
|
||||
import org.opensearch.common.io.PathUtilsForTesting;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeUnit;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.core.internal.io.IOUtils;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.monitor.fs.FsService;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.repositories.fs.FsRepository;
|
||||
import org.opensearch.snapshots.RestoreInfo;
|
||||
import org.opensearch.snapshots.SnapshotInfo;
|
||||
import org.opensearch.snapshots.SnapshotState;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalSettingsPlugin;
|
||||
|
||||
import org.hamcrest.Matcher;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
|
@ -77,9 +79,9 @@ import java.util.concurrent.TimeUnit;
|
|||
import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import static org.elasticsearch.common.util.concurrent.ConcurrentCollections.newConcurrentMap;
|
||||
import static org.elasticsearch.index.store.Store.INDEX_STORE_STATS_REFRESH_INTERVAL_SETTING;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.common.util.concurrent.ConcurrentCollections.newConcurrentMap;
|
||||
import static org.opensearch.index.store.Store.INDEX_STORE_STATS_REFRESH_INTERVAL_SETTING;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.anyOf;
|
||||
import static org.hamcrest.Matchers.empty;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
@ -87,8 +89,8 @@ import static org.hamcrest.Matchers.greaterThan;
|
|||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class DiskThresholdDeciderIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class DiskThresholdDeciderIT extends OpenSearchIntegTestCase {
|
||||
|
||||
private static TestFileSystemProvider fileSystemProvider;
|
||||
|
|
@ -16,24 +16,25 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.routing.allocation.decider;
|
||||
|
||||
package org.opensearch.cluster.routing.allocation.decider;
|
||||
|
||||
import org.opensearch.action.admin.indices.stats.ShardStats;
|
||||
import org.elasticsearch.action.support.WriteRequest;
|
||||
import org.elasticsearch.cluster.ClusterInfoService;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.MockInternalClusterInfoService;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.RoutingNode;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.monitor.fs.FsInfo;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.action.support.WriteRequest;
|
||||
import org.opensearch.cluster.ClusterInfoService;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.MockInternalClusterInfoService;
|
||||
import org.opensearch.cluster.block.ClusterBlockException;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.RoutingNode;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.monitor.fs.FsInfo;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
|
@ -46,22 +47,22 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import static org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_FLOOD_STAGE_WATERMARK_SETTING;
|
||||
import static org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING;
|
||||
import static org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING;
|
||||
import static org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING;
|
||||
import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits;
|
||||
import static org.opensearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_FLOOD_STAGE_WATERMARK_SETTING;
|
||||
import static org.opensearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING;
|
||||
import static org.opensearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING;
|
||||
import static org.opensearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING;
|
||||
import static org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
import static org.hamcrest.Matchers.lessThanOrEqualTo;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
import static org.hamcrest.Matchers.startsWith;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class MockDiskUsagesIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class MockDiskUsagesIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -16,26 +16,26 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.routing.allocation.decider;
|
||||
package org.opensearch.cluster.routing.allocation.decider;
|
||||
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.ShardRoutingState;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.ShardRoutingState;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import static org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider.CLUSTER_ROUTING_ALLOCATION_SAME_HOST_SETTING;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.cluster.routing.allocation.decider.SameShardAllocationDecider.CLUSTER_ROUTING_ALLOCATION_SAME_HOST_SETTING;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
/**
|
||||
* An integration test for testing updating shard allocation/routing settings and
|
||||
* ensuring the updated settings take effect as expected.
|
||||
*/
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class UpdateShardAllocationSettingsIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class UpdateShardAllocationSettingsIT extends OpenSearchIntegTestCase {
|
||||
|
||||
/**
|
||||
* Tests that updating the {@link EnableAllocationDecider} related settings works as expected.
|
|
@ -16,20 +16,20 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.service;
|
||||
package org.opensearch.cluster.service;
|
||||
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.opensearch.action.admin.cluster.tasks.PendingClusterTasksResponse;
|
||||
import org.elasticsearch.cluster.AckedClusterStateUpdateTask;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.opensearch.cluster.AckedClusterStateUpdateTask;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.ClusterStateUpdateTask;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.greaterThan;
|
|||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
|
||||
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
|
||||
public class ClusterServiceIT extends ESIntegTestCase {
|
||||
public class ClusterServiceIT extends OpenSearchIntegTestCase {
|
||||
|
||||
public void testAckedUpdateTask() throws Exception {
|
||||
internalCluster().startNode();
|
|
@ -17,35 +17,36 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.settings;
|
||||
package org.opensearch.cluster.settings;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequestBuilder;
|
||||
import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeUnit;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.indices.recovery.RecoverySettings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeUnit;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.indices.recovery.RecoverySettings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import org.junit.After;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING;
|
||||
import static org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.opensearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING;
|
||||
import static org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
public class ClusterSettingsIT extends ESIntegTestCase {
|
||||
public class ClusterSettingsIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@After
|
||||
public void cleanup() throws Exception {
|
|
@ -17,30 +17,32 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.cluster.settings;
|
||||
package org.opensearch.cluster.settings;
|
||||
|
||||
import org.opensearch.action.admin.cluster.node.info.NodeInfo;
|
||||
import org.opensearch.action.admin.cluster.node.info.NodesInfoResponse;
|
||||
import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static org.opensearch.action.admin.cluster.node.info.NodesInfoRequest.Metric.SETTINGS;
|
||||
import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
|
||||
import static org.opensearch.test.OpenSearchIntegTestCase.Scope.SUITE;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
|
||||
@ClusterScope(scope = SUITE, supportsDedicatedMasters = false, numDataNodes = 1)
|
||||
public class SettingsFilteringIT extends ESIntegTestCase {
|
||||
public class SettingsFilteringIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -16,29 +16,29 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.cluster.shards;
|
||||
package org.opensearch.cluster.shards;
|
||||
|
||||
import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsGroup;
|
||||
import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsResponse;
|
||||
import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
import org.elasticsearch.test.ESIntegTestCase.Scope;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase.Scope;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ClusterScope(scope= Scope.SUITE, numDataNodes = 2)
|
||||
public class ClusterSearchShardsIT extends ESIntegTestCase {
|
||||
public class ClusterSearchShardsIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Settings nodeSettings(int nodeOrdinal) {
|
|
@ -17,38 +17,38 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.opensearch.cluster.shards;
|
||||
|
||||
package org.elasticsearch.cluster.shards;
|
||||
import org.opensearch.Version;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.action.admin.cluster.health.ClusterHealthResponse;
|
||||
import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse;
|
||||
import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
|
||||
import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.common.Priority;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeUnit;
|
||||
import org.elasticsearch.indices.ShardLimitValidator;
|
||||
import org.elasticsearch.snapshots.SnapshotInfo;
|
||||
import org.elasticsearch.snapshots.SnapshotState;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.action.support.master.AcknowledgedResponse;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeUnit;
|
||||
import org.opensearch.indices.ShardLimitValidator;
|
||||
import org.opensearch.snapshots.SnapshotInfo;
|
||||
import org.opensearch.snapshots.SnapshotState;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS;
|
||||
import static org.elasticsearch.test.NodeRoles.dataNode;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS;
|
||||
import static org.opensearch.test.NodeRoles.dataNode;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class ClusterShardLimitIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class ClusterShardLimitIT extends OpenSearchIntegTestCase {
|
||||
private static final String shardsPerNodeKey = ShardLimitValidator.SETTING_CLUSTER_MAX_SHARDS_PER_NODE.getKey();
|
||||
|
||||
public void testSettingClusterMaxShards() {
|
|
@ -17,13 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.common.settings;
|
||||
package org.opensearch.common.settings;
|
||||
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.settings.Setting.AffixSetting;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.settings.Setting.AffixSetting;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -33,8 +33,8 @@ import java.util.List;
|
|||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Function;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
|
||||
public class ConsistentSettingsIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST)
|
||||
public class ConsistentSettingsIT extends OpenSearchIntegTestCase {
|
||||
|
||||
static final Setting<SecureString> DUMMY_STRING_CONSISTENT_SETTING = SecureSetting
|
||||
.secureString("dummy.consistent.secure.string.setting", null, Setting.Property.Consistent);
|
|
@ -17,15 +17,16 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.common.settings;
|
||||
package org.opensearch.common.settings;
|
||||
|
||||
import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequestBuilder;
|
||||
import org.opensearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
import org.elasticsearch.cluster.metadata.Metadata;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESSingleNodeTestCase;
|
||||
import org.elasticsearch.transport.RemoteClusterService;
|
||||
import org.elasticsearch.transport.SniffConnectionStrategy;
|
||||
import org.opensearch.cluster.metadata.Metadata;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchSingleNodeTestCase;
|
||||
import org.opensearch.transport.RemoteClusterService;
|
||||
import org.opensearch.transport.SniffConnectionStrategy;
|
||||
|
||||
import org.junit.After;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@ -37,7 +38,7 @@ import java.util.function.Function;
|
|||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class UpgradeSettingsIT extends ESSingleNodeTestCase {
|
||||
public class UpgradeSettingsIT extends OpenSearchSingleNodeTestCase {
|
||||
|
||||
@After
|
||||
public void cleanup() throws Exception {
|
|
@ -17,26 +17,26 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.discovery;
|
||||
package org.opensearch.discovery;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.indices.store.IndicesStoreIntegrationIT;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.opensearch.action.index.IndexRequestBuilder;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.indices.store.IndicesStoreIntegrationIT;
|
||||
import org.opensearch.plugins.Plugin;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
|
||||
public class ClusterDisruptionCleanSettingsIT extends ESIntegTestCase {
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
|
||||
public class ClusterDisruptionCleanSettingsIT extends OpenSearchIntegTestCase {
|
||||
|
||||
@Override
|
||||
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
@ -17,40 +17,41 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.discovery;
|
||||
package org.opensearch.discovery;
|
||||
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.NoShardAvailableActionException;
|
||||
import org.elasticsearch.action.get.GetResponse;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.action.shard.ShardStateAction;
|
||||
import org.elasticsearch.cluster.coordination.ClusterBootstrapService;
|
||||
import org.elasticsearch.cluster.coordination.LagDetector;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.routing.Murmur3HashFunction;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.routing.ShardRoutingState;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.VersionType;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.IndexShardTestCase;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.elasticsearch.test.disruption.NetworkDisruption;
|
||||
import org.elasticsearch.test.disruption.NetworkDisruption.Bridge;
|
||||
import org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions;
|
||||
import org.elasticsearch.test.disruption.ServiceDisruptionScheme;
|
||||
import org.elasticsearch.test.junit.annotations.TestIssueLogging;
|
||||
import org.opensearch.action.get.GetResponse;
|
||||
import org.opensearch.action.index.IndexRequestBuilder;
|
||||
import org.opensearch.action.index.IndexResponse;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.action.shard.ShardStateAction;
|
||||
import org.opensearch.cluster.coordination.ClusterBootstrapService;
|
||||
import org.opensearch.cluster.coordination.LagDetector;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.routing.Murmur3HashFunction;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.routing.ShardRoutingState;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.index.VersionType;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.IndexShardTestCase;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
import org.opensearch.test.disruption.NetworkDisruption;
|
||||
import org.opensearch.test.disruption.NetworkDisruption.Bridge;
|
||||
import org.opensearch.test.disruption.NetworkDisruption.TwoPartitions;
|
||||
import org.opensearch.test.disruption.ServiceDisruptionScheme;
|
||||
import org.opensearch.test.junit.annotations.TestIssueLogging;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -69,7 +70,7 @@ import java.util.stream.IntStream;
|
|||
|
||||
import static org.opensearch.action.DocWriteResponse.Result.CREATED;
|
||||
import static org.opensearch.action.DocWriteResponse.Result.UPDATED;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.hamcrest.Matchers.everyItem;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
|
@ -81,7 +82,7 @@ import static org.hamcrest.Matchers.oneOf;
|
|||
/**
|
||||
* Tests various cluster operations (e.g., indexing) during disruptions.
|
||||
*/
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
|
||||
public class ClusterDisruptionIT extends AbstractDisruptionTestCase {
|
||||
|
||||
private enum ConflictMode {
|
||||
|
@ -102,10 +103,10 @@ public class ClusterDisruptionIT extends AbstractDisruptionTestCase {
|
|||
* <p>
|
||||
* This test is a superset of tests run in the Jepsen test suite, with the exception of versioned updates
|
||||
*/
|
||||
@TestIssueLogging(value = "_root:DEBUG,org.elasticsearch.action.bulk:TRACE,org.elasticsearch.action.get:TRACE," +
|
||||
"org.elasticsearch.discovery:TRACE,org.elasticsearch.action.support.replication:TRACE," +
|
||||
"org.elasticsearch.cluster.service:TRACE,org.elasticsearch.indices.recovery:TRACE," +
|
||||
"org.elasticsearch.indices.cluster:TRACE,org.elasticsearch.index.shard:TRACE",
|
||||
@TestIssueLogging(value = "_root:DEBUG,org.opensearch.action.bulk:TRACE,org.opensearch.action.get:TRACE," +
|
||||
"org.opensearch.discovery:TRACE,org.opensearch.action.support.replication:TRACE," +
|
||||
"org.opensearch.cluster.service:TRACE,org.opensearch.indices.recovery:TRACE," +
|
||||
"org.opensearch.indices.cluster:TRACE,org.opensearch.index.shard:TRACE",
|
||||
issueUrl = "https://github.com/elastic/elasticsearch/issues/41068")
|
||||
public void testAckedIndexing() throws Exception {
|
||||
|
|
@ -17,38 +17,38 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.discovery;
|
||||
package org.opensearch.discovery;
|
||||
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.coordination.JoinHelper;
|
||||
import org.elasticsearch.cluster.coordination.PublicationTransportHandler;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.discovery.zen.MembershipAction;
|
||||
import org.elasticsearch.discovery.zen.PublishClusterStateAction;
|
||||
import org.elasticsearch.discovery.zen.ZenDiscovery;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.disruption.NetworkDisruption;
|
||||
import org.elasticsearch.test.disruption.ServiceDisruptionScheme;
|
||||
import org.elasticsearch.test.disruption.SlowClusterStateProcessing;
|
||||
import org.elasticsearch.test.transport.MockTransportService;
|
||||
import org.elasticsearch.transport.Transport;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.coordination.JoinHelper;
|
||||
import org.opensearch.cluster.coordination.PublicationTransportHandler;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.node.DiscoveryNodes;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.discovery.zen.MembershipAction;
|
||||
import org.opensearch.discovery.zen.PublishClusterStateAction;
|
||||
import org.opensearch.discovery.zen.ZenDiscovery;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.disruption.NetworkDisruption;
|
||||
import org.opensearch.test.disruption.ServiceDisruptionScheme;
|
||||
import org.opensearch.test.disruption.SlowClusterStateProcessing;
|
||||
import org.opensearch.test.transport.MockTransportService;
|
||||
import org.opensearch.transport.Transport;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING;
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
|
||||
/**
|
||||
* Tests for discovery during disruptions.
|
||||
*/
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
|
||||
public class DiscoveryDisruptionIT extends AbstractDisruptionTestCase {
|
||||
|
||||
/**
|
|
@ -16,20 +16,21 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.discovery;
|
||||
package org.opensearch.discovery;
|
||||
|
||||
import com.carrotsearch.randomizedtesting.RandomizedTest;
|
||||
import org.apache.lucene.mockfile.FilterFileSystemProvider;
|
||||
import org.opensearch.action.admin.indices.stats.ShardStats;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.common.io.PathUtils;
|
||||
import org.elasticsearch.common.io.PathUtilsForTesting;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.test.BackgroundIndexer;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.test.InternalTestCluster;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.common.io.PathUtils;
|
||||
import org.opensearch.common.io.PathUtilsForTesting;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.index.seqno.SequenceNumbers;
|
||||
import org.opensearch.test.BackgroundIndexer;
|
||||
import org.opensearch.test.OpenSearchIntegTestCase;
|
||||
import org.opensearch.test.InternalTestCluster;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
|
@ -45,10 +46,10 @@ import java.util.Set;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
|
||||
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
||||
|
||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
|
||||
public class DiskDisruptionIT extends AbstractDisruptionTestCase {
|
||||
|
||||
private static DisruptTranslogFileSystemProvider disruptTranslogFileSystemProvider;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue