[Rename] http and indices folder under server module (#285)
* Rename http and indices folder under server module Signed-off-by: Harold Wang <harowang@amazon.com>
This commit is contained in:
parent
e5c3cb6f64
commit
32b93793be
|
@ -25,7 +25,7 @@ import org.opensearch.action.ActionListener;
|
|||
import org.opensearch.action.ActionRunnable;
|
||||
import org.elasticsearch.common.Randomness;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.elasticsearch.common.util.concurrent.OpenSearchRejectedExecutionException;
|
||||
import org.opensearch.threadpool.Scheduler;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
|
||||
|
@ -157,7 +157,7 @@ public abstract class RetryableAction<Response> {
|
|||
logger.debug(() -> new ParameterizedMessage("retrying action that failed in {}", delay), e);
|
||||
try {
|
||||
retryTask = threadPool.schedule(runnable, delay, executor);
|
||||
} catch (EsRejectedExecutionException ree) {
|
||||
} catch (OpenSearchRejectedExecutionException ree) {
|
||||
onFinalFailure(ree);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ import org.elasticsearch.common.settings.Setting.Property;
|
|||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.elasticsearch.common.util.concurrent.OpenSearchRejectedExecutionException;
|
||||
import org.elasticsearch.index.store.StoreStats;
|
||||
import org.elasticsearch.monitor.fs.FsInfo;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
|
@ -445,7 +445,7 @@ public class InternalClusterInfoService implements ClusterInfoService, ClusterSt
|
|||
|
||||
@Override
|
||||
public void onRejection(Exception e) {
|
||||
final boolean shutDown = e instanceof EsRejectedExecutionException && ((EsRejectedExecutionException) e).isExecutorShutdown();
|
||||
final boolean shutDown = e instanceof OpenSearchRejectedExecutionException && ((OpenSearchRejectedExecutionException) e).isExecutorShutdown();
|
||||
logger.log(shutDown ? Level.DEBUG : Level.WARN, "refreshing cluster info rejected [{}]", reason, e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.opensearch.cluster.node.DiscoveryNodes;
|
|||
import org.opensearch.cluster.routing.allocation.RoutingAllocation;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.lease.Releasable;
|
||||
import org.opensearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.opensearch.common.util.concurrent.OpenSearchRejectedExecutionException;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.transport.ReceiveTimeoutTransportException;
|
||||
|
||||
|
@ -215,7 +215,7 @@ public abstract class AsyncShardFetch<T extends BaseNodeResponse> implements Rel
|
|||
// if the entry is there, for the right fetching round and not marked as failed already, process it
|
||||
Throwable unwrappedCause = ExceptionsHelper.unwrapCause(failure.getCause());
|
||||
// if the request got rejected or timed out, we need to try it again next time...
|
||||
if (unwrappedCause instanceof EsRejectedExecutionException ||
|
||||
if (unwrappedCause instanceof OpenSearchRejectedExecutionException ||
|
||||
unwrappedCause instanceof ReceiveTimeoutTransportException ||
|
||||
unwrappedCause instanceof OpenSearchTimeoutException) {
|
||||
nodeEntry.restartFetching();
|
||||
|
|
|
@ -17,34 +17,34 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import com.carrotsearch.hppc.IntHashSet;
|
||||
import com.carrotsearch.hppc.IntSet;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.component.AbstractLifecycleComponent;
|
||||
import org.elasticsearch.common.network.CloseableChannel;
|
||||
import org.elasticsearch.common.network.NetworkAddress;
|
||||
import org.elasticsearch.common.network.NetworkService;
|
||||
import org.elasticsearch.common.settings.ClusterSettings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.transport.BoundTransportAddress;
|
||||
import org.elasticsearch.common.transport.NetworkExceptionHelper;
|
||||
import org.elasticsearch.common.transport.PortsRange;
|
||||
import org.elasticsearch.common.transport.TransportAddress;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.util.BigArrays;
|
||||
import org.elasticsearch.common.util.concurrent.ThreadContext;
|
||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.component.AbstractLifecycleComponent;
|
||||
import org.opensearch.common.network.CloseableChannel;
|
||||
import org.opensearch.common.network.NetworkAddress;
|
||||
import org.opensearch.common.network.NetworkService;
|
||||
import org.opensearch.common.settings.ClusterSettings;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.transport.BoundTransportAddress;
|
||||
import org.opensearch.common.transport.NetworkExceptionHelper;
|
||||
import org.opensearch.common.transport.PortsRange;
|
||||
import org.opensearch.common.transport.TransportAddress;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.util.BigArrays;
|
||||
import org.opensearch.common.util.concurrent.ThreadContext;
|
||||
import org.opensearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.opensearch.rest.RestChannel;
|
||||
import org.opensearch.rest.RestRequest;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.BindTransportException;
|
||||
import org.opensearch.transport.BindTransportException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
|
@ -59,11 +59,11 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_BIND_HOST;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_MAX_CONTENT_LENGTH;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_PORT;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_PUBLISH_HOST;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_PUBLISH_PORT;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_BIND_HOST;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_MAX_CONTENT_LENGTH;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_PORT;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_PUBLISH_HOST;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_PUBLISH_PORT;
|
||||
|
||||
public abstract class AbstractHttpServerTransport extends AbstractLifecycleComponent implements HttpServerTransport {
|
||||
private static final Logger logger = LogManager.getLogger(AbstractHttpServerTransport.class);
|
|
@ -17,9 +17,9 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -36,4 +36,4 @@ public class BindHttpException extends HttpException {
|
|||
public BindHttpException(StreamInput in) throws IOException {
|
||||
super(in);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -32,12 +32,12 @@
|
|||
* the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.settings.SettingsException;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.bytes.BytesArray;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.settings.SettingsException;
|
||||
import org.opensearch.rest.RestRequest;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
import org.opensearch.rest.RestUtils;
|
||||
|
@ -57,12 +57,12 @@ import java.util.Set;
|
|||
import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_CREDENTIALS;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_HEADERS;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_METHODS;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_ORIGIN;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ENABLED;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_MAX_AGE;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_CREDENTIALS;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_HEADERS;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_METHODS;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_CORS_ALLOW_ORIGIN;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_CORS_ENABLED;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_CORS_MAX_AGE;
|
||||
|
||||
/**
|
||||
* This file is forked from the https://netty.io project. In particular it combines the following three
|
|
@ -17,19 +17,19 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.io.stream.BytesStreamOutput;
|
||||
import org.elasticsearch.common.io.stream.ReleasableBytesStreamOutput;
|
||||
import org.elasticsearch.common.lease.Releasable;
|
||||
import org.elasticsearch.common.lease.Releasables;
|
||||
import org.elasticsearch.common.network.CloseableChannel;
|
||||
import org.elasticsearch.common.util.BigArrays;
|
||||
import org.elasticsearch.common.util.concurrent.ThreadContext;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.bytes.BytesArray;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.io.stream.BytesStreamOutput;
|
||||
import org.opensearch.common.io.stream.ReleasableBytesStreamOutput;
|
||||
import org.opensearch.common.lease.Releasable;
|
||||
import org.opensearch.common.lease.Releasables;
|
||||
import org.opensearch.common.network.CloseableChannel;
|
||||
import org.opensearch.common.util.BigArrays;
|
||||
import org.opensearch.common.util.concurrent.ThreadContext;
|
||||
import org.opensearch.rest.AbstractRestChannel;
|
||||
import org.opensearch.rest.RestChannel;
|
||||
import org.opensearch.rest.RestRequest;
|
|
@ -17,10 +17,10 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.elasticsearch.common.network.CloseableChannel;
|
||||
import org.opensearch.common.network.CloseableChannel;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,21 +17,21 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_CORS_ENABLED;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_COMPRESSION;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_COMPRESSION_LEVEL;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_DETAILED_ERRORS_ENABLED;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_MAX_CHUNK_SIZE;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_MAX_CONTENT_LENGTH;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_MAX_HEADER_SIZE;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_MAX_INITIAL_LINE_LENGTH;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_READ_TIMEOUT;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_RESET_COOKIES;
|
||||
import static org.elasticsearch.http.HttpTransportSettings.SETTING_PIPELINING_MAX_EVENTS;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_CORS_ENABLED;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_COMPRESSION;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_COMPRESSION_LEVEL;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_DETAILED_ERRORS_ENABLED;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_MAX_CHUNK_SIZE;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_MAX_CONTENT_LENGTH;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_MAX_HEADER_SIZE;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_MAX_INITIAL_LINE_LENGTH;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_READ_TIMEOUT;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_RESET_COOKIES;
|
||||
import static org.opensearch.http.HttpTransportSettings.SETTING_PIPELINING_MAX_EVENTS;
|
||||
|
||||
public class HttpHandlingSettings {
|
||||
|
|
@ -17,17 +17,17 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.logging.DeprecationLogger;
|
||||
import org.elasticsearch.common.network.InetAddresses;
|
||||
import org.elasticsearch.common.transport.BoundTransportAddress;
|
||||
import org.elasticsearch.common.transport.TransportAddress;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.node.ReportingService;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.common.logging.DeprecationLogger;
|
||||
import org.opensearch.common.network.InetAddresses;
|
||||
import org.opensearch.common.transport.BoundTransportAddress;
|
||||
import org.opensearch.common.transport.TransportAddress;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.node.ReportingService;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
public interface HttpPipelinedMessage extends Comparable<HttpPipelinedMessage> {
|
||||
|
|
@ -17,9 +17,9 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.rest.RestRequest;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
public class HttpPipelinedResponse implements HttpPipelinedMessage, HttpResponse {
|
||||
|
|
@ -16,9 +16,9 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.common.collect.Tuple;
|
||||
import org.opensearch.common.collect.Tuple;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
public class HttpReadTimeoutException extends RuntimeException {
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.rest.RestRequest;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
/**
|
||||
* A basic http response abstraction. Http modules must implement this interface as the server package rest
|
|
@ -17,9 +17,9 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.common.network.CloseableChannel;
|
||||
import org.opensearch.common.network.CloseableChannel;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
|
|
@ -17,12 +17,12 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.common.component.LifecycleComponent;
|
||||
import org.elasticsearch.common.transport.BoundTransportAddress;
|
||||
import org.elasticsearch.common.util.concurrent.ThreadContext;
|
||||
import org.elasticsearch.node.ReportingService;
|
||||
import org.opensearch.common.component.LifecycleComponent;
|
||||
import org.opensearch.common.transport.BoundTransportAddress;
|
||||
import org.opensearch.common.util.concurrent.ThreadContext;
|
||||
import org.opensearch.node.ReportingService;
|
||||
import org.opensearch.rest.RestChannel;
|
||||
import org.opensearch.rest.RestRequest;
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
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.ToXContentFragment;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
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.ToXContentFragment;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,19 +17,19 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.settings.ClusterSettings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.settings.ClusterSettings;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.rest.RestRequest;
|
||||
import org.opensearch.rest.RestResponse;
|
||||
import org.opensearch.tasks.Task;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -17,25 +17,25 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
import org.elasticsearch.common.Booleans;
|
||||
import org.elasticsearch.common.network.NetworkService;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
import org.elasticsearch.common.transport.PortsRange;
|
||||
import org.elasticsearch.common.unit.ByteSizeUnit;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.Booleans;
|
||||
import org.opensearch.common.network.NetworkService;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
import org.opensearch.common.transport.PortsRange;
|
||||
import org.opensearch.common.unit.ByteSizeUnit;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
import static org.elasticsearch.common.settings.Setting.boolSetting;
|
||||
import static org.elasticsearch.common.settings.Setting.intSetting;
|
||||
import static org.elasticsearch.common.settings.Setting.listSetting;
|
||||
import static org.opensearch.common.settings.Setting.boolSetting;
|
||||
import static org.opensearch.common.settings.Setting.intSetting;
|
||||
import static org.opensearch.common.settings.Setting.listSetting;
|
||||
|
||||
public final class HttpTransportSettings {
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.http;
|
||||
package org.opensearch.http;
|
||||
|
||||
public class HttpUtils {
|
||||
|
|
@ -17,12 +17,12 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.cache.RemovalNotification;
|
||||
import org.elasticsearch.index.cache.request.ShardRequestCache;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.cache.RemovalNotification;
|
||||
import org.opensearch.index.cache.request.ShardRequestCache;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
|
||||
/**
|
||||
* Abstract base class for the an {@link IndexShard} level {@linkplain IndicesRequestCache.CacheEntity}.
|
|
@ -17,11 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.index.Index;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
|
||||
import java.io.IOException;
|
|
@ -17,11 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.OpenSearchWrapperException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.OpenSearchWrapperException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
|
||||
import java.io.IOException;
|
|
@ -16,11 +16,11 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
|
||||
import java.io.IOException;
|
|
@ -17,24 +17,24 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.apache.lucene.store.AlreadyClosedException;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
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.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.index.engine.Engine;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.IndexShardState;
|
||||
import org.elasticsearch.index.shard.IndexingOperationListener;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
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.util.concurrent.AbstractRunnable;
|
||||
import org.opensearch.index.engine.Engine;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.IndexShardState;
|
||||
import org.opensearch.index.shard.IndexingOperationListener;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.threadpool.Scheduler.Cancellable;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.opensearch.threadpool.ThreadPool.Names;
|
|
@ -17,52 +17,52 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.opensearch.action.admin.indices.rollover.Condition;
|
||||
import org.opensearch.action.admin.indices.rollover.MaxAgeCondition;
|
||||
import org.opensearch.action.admin.indices.rollover.MaxDocsCondition;
|
||||
import org.opensearch.action.admin.indices.rollover.MaxSizeCondition;
|
||||
import org.elasticsearch.action.resync.TransportResyncReplicationAction;
|
||||
import org.elasticsearch.common.ParseField;
|
||||
import org.elasticsearch.common.inject.AbstractModule;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry;
|
||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.elasticsearch.index.mapper.BinaryFieldMapper;
|
||||
import org.elasticsearch.index.mapper.BooleanFieldMapper;
|
||||
import org.elasticsearch.index.mapper.CompletionFieldMapper;
|
||||
import org.elasticsearch.index.mapper.DateFieldMapper;
|
||||
import org.elasticsearch.index.mapper.FieldAliasMapper;
|
||||
import org.elasticsearch.index.mapper.FieldNamesFieldMapper;
|
||||
import org.elasticsearch.index.mapper.GeoPointFieldMapper;
|
||||
import org.elasticsearch.index.mapper.IdFieldMapper;
|
||||
import org.elasticsearch.index.mapper.IgnoredFieldMapper;
|
||||
import org.elasticsearch.index.mapper.IndexFieldMapper;
|
||||
import org.elasticsearch.index.mapper.IpFieldMapper;
|
||||
import org.elasticsearch.index.mapper.KeywordFieldMapper;
|
||||
import org.elasticsearch.index.mapper.Mapper;
|
||||
import org.elasticsearch.index.mapper.MetadataFieldMapper;
|
||||
import org.elasticsearch.index.mapper.NumberFieldMapper;
|
||||
import org.elasticsearch.index.mapper.ObjectMapper;
|
||||
import org.elasticsearch.index.mapper.RangeType;
|
||||
import org.elasticsearch.index.mapper.RoutingFieldMapper;
|
||||
import org.elasticsearch.index.mapper.SeqNoFieldMapper;
|
||||
import org.elasticsearch.index.mapper.SourceFieldMapper;
|
||||
import org.elasticsearch.index.mapper.TextFieldMapper;
|
||||
import org.elasticsearch.index.mapper.TypeFieldMapper;
|
||||
import org.elasticsearch.index.mapper.VersionFieldMapper;
|
||||
import org.elasticsearch.index.seqno.RetentionLeaseBackgroundSyncAction;
|
||||
import org.elasticsearch.index.seqno.RetentionLeaseSyncAction;
|
||||
import org.elasticsearch.index.seqno.RetentionLeaseSyncer;
|
||||
import org.elasticsearch.index.seqno.GlobalCheckpointSyncAction;
|
||||
import org.elasticsearch.index.shard.PrimaryReplicaSyncer;
|
||||
import org.elasticsearch.indices.cluster.IndicesClusterStateService;
|
||||
import org.elasticsearch.indices.flush.SyncedFlushService;
|
||||
import org.elasticsearch.indices.mapper.MapperRegistry;
|
||||
import org.elasticsearch.indices.store.IndicesStore;
|
||||
import org.elasticsearch.indices.store.TransportNodesListShardStoreMetadata;
|
||||
import org.elasticsearch.plugins.MapperPlugin;
|
||||
import org.opensearch.action.resync.TransportResyncReplicationAction;
|
||||
import org.opensearch.common.ParseField;
|
||||
import org.opensearch.common.inject.AbstractModule;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry;
|
||||
import org.opensearch.common.io.stream.NamedWriteableRegistry.Entry;
|
||||
import org.opensearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.opensearch.index.mapper.BinaryFieldMapper;
|
||||
import org.opensearch.index.mapper.BooleanFieldMapper;
|
||||
import org.opensearch.index.mapper.CompletionFieldMapper;
|
||||
import org.opensearch.index.mapper.DateFieldMapper;
|
||||
import org.opensearch.index.mapper.FieldAliasMapper;
|
||||
import org.opensearch.index.mapper.FieldNamesFieldMapper;
|
||||
import org.opensearch.index.mapper.GeoPointFieldMapper;
|
||||
import org.opensearch.index.mapper.IdFieldMapper;
|
||||
import org.opensearch.index.mapper.IgnoredFieldMapper;
|
||||
import org.opensearch.index.mapper.IndexFieldMapper;
|
||||
import org.opensearch.index.mapper.IpFieldMapper;
|
||||
import org.opensearch.index.mapper.KeywordFieldMapper;
|
||||
import org.opensearch.index.mapper.Mapper;
|
||||
import org.opensearch.index.mapper.MetadataFieldMapper;
|
||||
import org.opensearch.index.mapper.NumberFieldMapper;
|
||||
import org.opensearch.index.mapper.ObjectMapper;
|
||||
import org.opensearch.index.mapper.RangeType;
|
||||
import org.opensearch.index.mapper.RoutingFieldMapper;
|
||||
import org.opensearch.index.mapper.SeqNoFieldMapper;
|
||||
import org.opensearch.index.mapper.SourceFieldMapper;
|
||||
import org.opensearch.index.mapper.TextFieldMapper;
|
||||
import org.opensearch.index.mapper.TypeFieldMapper;
|
||||
import org.opensearch.index.mapper.VersionFieldMapper;
|
||||
import org.opensearch.index.seqno.RetentionLeaseBackgroundSyncAction;
|
||||
import org.opensearch.index.seqno.RetentionLeaseSyncAction;
|
||||
import org.opensearch.index.seqno.RetentionLeaseSyncer;
|
||||
import org.opensearch.index.seqno.GlobalCheckpointSyncAction;
|
||||
import org.opensearch.index.shard.PrimaryReplicaSyncer;
|
||||
import org.opensearch.indices.cluster.IndicesClusterStateService;
|
||||
import org.opensearch.indices.flush.SyncedFlushService;
|
||||
import org.opensearch.indices.mapper.MapperRegistry;
|
||||
import org.opensearch.indices.store.IndicesStore;
|
||||
import org.opensearch.indices.store.TransportNodesListShardStoreMetadata;
|
||||
import org.opensearch.plugins.MapperPlugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -32,13 +32,13 @@ import org.apache.lucene.search.QueryCachingPolicy;
|
|||
import org.apache.lucene.search.Scorer;
|
||||
import org.apache.lucene.search.ScorerSupplier;
|
||||
import org.apache.lucene.search.Weight;
|
||||
import org.elasticsearch.common.lucene.ShardCoreKeyMap;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.index.cache.query.QueryCacheStats;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.opensearch.common.lucene.ShardCoreKeyMap;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.index.cache.query.QueryCacheStats;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
|
@ -54,14 +54,14 @@ public class IndicesQueryCache implements QueryCache, Closeable {
|
|||
|
||||
private static final Logger logger = LogManager.getLogger(IndicesQueryCache.class);
|
||||
|
||||
public static final Setting<ByteSizeValue> INDICES_CACHE_QUERY_SIZE_SETTING =
|
||||
public static final Setting<ByteSizeValue> INDICES_CACHE_QUERY_SIZE_SETTING =
|
||||
Setting.memorySizeSetting("indices.queries.cache.size", "10%", Property.NodeScope);
|
||||
// mostly a way to prevent queries from being the main source of memory usage
|
||||
// of the cache
|
||||
public static final Setting<Integer> INDICES_CACHE_QUERY_COUNT_SETTING =
|
||||
Setting.intSetting("indices.queries.cache.count", 10_000, 1, Property.NodeScope);
|
||||
// enables caching on all segments instead of only the larger ones, for testing only
|
||||
public static final Setting<Boolean> INDICES_QUERIES_CACHE_ALL_SEGMENTS_SETTING =
|
||||
public static final Setting<Boolean> INDICES_QUERIES_CACHE_ALL_SEGMENTS_SETTING =
|
||||
Setting.boolSetting("indices.queries.cache.all_segments", false, Property.NodeScope);
|
||||
|
||||
private final LRUQueryCache cache;
|
||||
|
@ -80,9 +80,9 @@ public class IndicesQueryCache implements QueryCache, Closeable {
|
|||
logger.debug("using [node] query cache with size [{}] max filter count [{}]",
|
||||
size, count);
|
||||
if (INDICES_QUERIES_CACHE_ALL_SEGMENTS_SETTING.get(settings)) {
|
||||
cache = new ElasticsearchLRUQueryCache(count, size.getBytes(), context -> true, 1f);
|
||||
cache = new OpenSearchLRUQueryCache(count, size.getBytes(), context -> true, 1f);
|
||||
} else {
|
||||
cache = new ElasticsearchLRUQueryCache(count, size.getBytes());
|
||||
cache = new OpenSearchLRUQueryCache(count, size.getBytes());
|
||||
}
|
||||
sharedRamBytesUsed = 0;
|
||||
}
|
||||
|
@ -248,13 +248,13 @@ public class IndicesQueryCache implements QueryCache, Closeable {
|
|||
shardStats.remove(shardId);
|
||||
}
|
||||
|
||||
private class ElasticsearchLRUQueryCache extends LRUQueryCache {
|
||||
private class OpenSearchLRUQueryCache extends LRUQueryCache {
|
||||
|
||||
ElasticsearchLRUQueryCache(int maxSize, long maxRamBytesUsed, Predicate<LeafReaderContext> leavesToCache, float skipFactor) {
|
||||
OpenSearchLRUQueryCache(int maxSize, long maxRamBytesUsed, Predicate<LeafReaderContext> leavesToCache, float skipFactor) {
|
||||
super(maxSize, maxRamBytesUsed, leavesToCache, skipFactor);
|
||||
}
|
||||
|
||||
ElasticsearchLRUQueryCache(int maxSize, long maxRamBytesUsed) {
|
||||
OpenSearchLRUQueryCache(int maxSize, long maxRamBytesUsed) {
|
||||
super(maxSize, maxRamBytesUsed);
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import com.carrotsearch.hppc.ObjectHashSet;
|
||||
import com.carrotsearch.hppc.ObjectSet;
|
||||
|
@ -27,20 +27,20 @@ import org.apache.lucene.index.DirectoryReader;
|
|||
import org.apache.lucene.index.IndexReader;
|
||||
import org.apache.lucene.util.Accountable;
|
||||
import org.apache.lucene.util.RamUsageEstimator;
|
||||
import org.elasticsearch.common.CheckedSupplier;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.cache.Cache;
|
||||
import org.elasticsearch.common.cache.CacheBuilder;
|
||||
import org.elasticsearch.common.cache.CacheLoader;
|
||||
import org.elasticsearch.common.cache.RemovalListener;
|
||||
import org.elasticsearch.common.cache.RemovalNotification;
|
||||
import org.elasticsearch.common.lucene.index.OpenSearchDirectoryReader;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.opensearch.common.CheckedSupplier;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.cache.Cache;
|
||||
import org.opensearch.common.cache.CacheBuilder;
|
||||
import org.opensearch.common.cache.CacheLoader;
|
||||
import org.opensearch.common.cache.RemovalListener;
|
||||
import org.opensearch.common.cache.RemovalNotification;
|
||||
import org.opensearch.common.lucene.index.OpenSearchDirectoryReader;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.concurrent.ConcurrentCollections;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -27,112 +27,112 @@ import org.apache.lucene.index.IndexReader.CacheHelper;
|
|||
import org.apache.lucene.store.AlreadyClosedException;
|
||||
import org.apache.lucene.util.CollectionUtil;
|
||||
import org.apache.lucene.util.RamUsageEstimator;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.ResourceAlreadyExistsException;
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.ResourceAlreadyExistsException;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.admin.indices.stats.CommonStats;
|
||||
import org.opensearch.action.admin.indices.stats.CommonStatsFlags;
|
||||
import org.opensearch.action.admin.indices.stats.CommonStatsFlags.Flag;
|
||||
import org.opensearch.action.admin.indices.stats.IndexShardStats;
|
||||
import org.opensearch.action.admin.indices.stats.ShardStats;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.opensearch.action.search.SearchType;
|
||||
import org.opensearch.client.Client;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.routing.RecoverySource;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.CheckedConsumer;
|
||||
import org.elasticsearch.common.CheckedFunction;
|
||||
import org.elasticsearch.common.CheckedSupplier;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.breaker.CircuitBreaker;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.component.AbstractLifecycleComponent;
|
||||
import org.elasticsearch.common.io.FileSystemUtils;
|
||||
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.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.lease.Releasable;
|
||||
import org.elasticsearch.common.settings.IndexScopedSettings;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.BigArrays;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRefCounted;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor;
|
||||
import org.elasticsearch.common.util.iterable.Iterables;
|
||||
import org.elasticsearch.common.util.set.Sets;
|
||||
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
|
||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.core.internal.io.IOUtils;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.env.ShardLock;
|
||||
import org.elasticsearch.env.ShardLockObtainFailedException;
|
||||
import org.elasticsearch.gateway.MetaStateService;
|
||||
import org.elasticsearch.gateway.MetadataStateFormat;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.IndexModule;
|
||||
import org.elasticsearch.index.IndexNotFoundException;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.IndexSettings;
|
||||
import org.elasticsearch.index.analysis.AnalysisRegistry;
|
||||
import org.elasticsearch.index.cache.request.ShardRequestCache;
|
||||
import org.elasticsearch.index.engine.CommitStats;
|
||||
import org.elasticsearch.index.engine.EngineConfig;
|
||||
import org.elasticsearch.index.engine.EngineFactory;
|
||||
import org.elasticsearch.index.engine.InternalEngineFactory;
|
||||
import org.elasticsearch.index.engine.NoOpEngine;
|
||||
import org.elasticsearch.index.fielddata.IndexFieldDataCache;
|
||||
import org.elasticsearch.index.flush.FlushStats;
|
||||
import org.elasticsearch.index.get.GetStats;
|
||||
import org.elasticsearch.index.mapper.IdFieldMapper;
|
||||
import org.elasticsearch.index.mapper.MapperService;
|
||||
import org.elasticsearch.index.merge.MergeStats;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
import org.elasticsearch.index.query.QueryRewriteContext;
|
||||
import org.elasticsearch.index.recovery.RecoveryStats;
|
||||
import org.elasticsearch.index.refresh.RefreshStats;
|
||||
import org.elasticsearch.index.search.stats.SearchStats;
|
||||
import org.elasticsearch.index.seqno.RetentionLeaseStats;
|
||||
import org.elasticsearch.index.seqno.RetentionLeaseSyncer;
|
||||
import org.elasticsearch.index.seqno.SeqNoStats;
|
||||
import org.elasticsearch.index.shard.IllegalIndexShardStateException;
|
||||
import org.elasticsearch.index.shard.IndexEventListener;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.IndexShardState;
|
||||
import org.elasticsearch.index.shard.IndexingOperationListener;
|
||||
import org.elasticsearch.index.shard.IndexingStats;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.indices.breaker.CircuitBreakerService;
|
||||
import org.elasticsearch.indices.cluster.IndicesClusterStateService;
|
||||
import org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache;
|
||||
import org.elasticsearch.indices.mapper.MapperRegistry;
|
||||
import org.elasticsearch.indices.recovery.PeerRecoveryTargetService;
|
||||
import org.elasticsearch.indices.recovery.RecoveryState;
|
||||
import org.elasticsearch.node.Node;
|
||||
import org.elasticsearch.plugins.IndexStorePlugin;
|
||||
import org.elasticsearch.plugins.PluginsService;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.RecoverySource;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.CheckedConsumer;
|
||||
import org.opensearch.common.CheckedFunction;
|
||||
import org.opensearch.common.CheckedSupplier;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.breaker.CircuitBreaker;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.component.AbstractLifecycleComponent;
|
||||
import org.opensearch.common.io.FileSystemUtils;
|
||||
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.io.stream.StreamOutput;
|
||||
import org.opensearch.common.lease.Releasable;
|
||||
import org.opensearch.common.settings.IndexScopedSettings;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.BigArrays;
|
||||
import org.opensearch.common.util.concurrent.AbstractRefCounted;
|
||||
import org.opensearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.opensearch.common.util.concurrent.OpenSearchExecutors;
|
||||
import org.opensearch.common.util.concurrent.OpenSearchRejectedExecutionException;
|
||||
import org.opensearch.common.util.concurrent.OpenSearchThreadPoolExecutor;
|
||||
import org.opensearch.common.util.iterable.Iterables;
|
||||
import org.opensearch.common.util.set.Sets;
|
||||
import org.opensearch.common.xcontent.LoggingDeprecationHandler;
|
||||
import org.opensearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.opensearch.common.xcontent.XContentFactory;
|
||||
import org.opensearch.common.xcontent.XContentParser;
|
||||
import org.opensearch.common.xcontent.XContentType;
|
||||
import org.opensearch.core.internal.io.IOUtils;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.env.ShardLock;
|
||||
import org.opensearch.env.ShardLockObtainFailedException;
|
||||
import org.opensearch.gateway.MetaStateService;
|
||||
import org.opensearch.gateway.MetadataStateFormat;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.IndexModule;
|
||||
import org.opensearch.index.IndexNotFoundException;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.IndexSettings;
|
||||
import org.opensearch.index.analysis.AnalysisRegistry;
|
||||
import org.opensearch.index.cache.request.ShardRequestCache;
|
||||
import org.opensearch.index.engine.CommitStats;
|
||||
import org.opensearch.index.engine.EngineConfig;
|
||||
import org.opensearch.index.engine.EngineFactory;
|
||||
import org.opensearch.index.engine.InternalEngineFactory;
|
||||
import org.opensearch.index.engine.NoOpEngine;
|
||||
import org.opensearch.index.fielddata.IndexFieldDataCache;
|
||||
import org.opensearch.index.flush.FlushStats;
|
||||
import org.opensearch.index.get.GetStats;
|
||||
import org.opensearch.index.mapper.IdFieldMapper;
|
||||
import org.opensearch.index.mapper.MapperService;
|
||||
import org.opensearch.index.merge.MergeStats;
|
||||
import org.opensearch.index.query.QueryBuilder;
|
||||
import org.opensearch.index.query.QueryRewriteContext;
|
||||
import org.opensearch.index.recovery.RecoveryStats;
|
||||
import org.opensearch.index.refresh.RefreshStats;
|
||||
import org.opensearch.index.search.stats.SearchStats;
|
||||
import org.opensearch.index.seqno.RetentionLeaseStats;
|
||||
import org.opensearch.index.seqno.RetentionLeaseSyncer;
|
||||
import org.opensearch.index.seqno.SeqNoStats;
|
||||
import org.opensearch.index.shard.IllegalIndexShardStateException;
|
||||
import org.opensearch.index.shard.IndexEventListener;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.IndexShardState;
|
||||
import org.opensearch.index.shard.IndexingOperationListener;
|
||||
import org.opensearch.index.shard.IndexingStats;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.indices.breaker.CircuitBreakerService;
|
||||
import org.opensearch.indices.cluster.IndicesClusterStateService;
|
||||
import org.opensearch.indices.fielddata.cache.IndicesFieldDataCache;
|
||||
import org.opensearch.indices.mapper.MapperRegistry;
|
||||
import org.opensearch.indices.recovery.PeerRecoveryTargetService;
|
||||
import org.opensearch.indices.recovery.RecoveryState;
|
||||
import org.opensearch.node.Node;
|
||||
import org.opensearch.plugins.IndexStorePlugin;
|
||||
import org.opensearch.plugins.PluginsService;
|
||||
import org.opensearch.repositories.RepositoriesService;
|
||||
import org.opensearch.script.ScriptService;
|
||||
import org.elasticsearch.search.aggregations.support.ValuesSourceRegistry;
|
||||
import org.elasticsearch.search.internal.AliasFilter;
|
||||
import org.elasticsearch.search.internal.SearchContext;
|
||||
import org.elasticsearch.search.internal.ShardSearchRequest;
|
||||
import org.elasticsearch.search.query.QueryPhase;
|
||||
import org.elasticsearch.search.query.QuerySearchResult;
|
||||
import org.opensearch.search.aggregations.support.ValuesSourceRegistry;
|
||||
import org.opensearch.search.internal.AliasFilter;
|
||||
import org.opensearch.search.internal.SearchContext;
|
||||
import org.opensearch.search.internal.ShardSearchRequest;
|
||||
import org.opensearch.search.query.QueryPhase;
|
||||
import org.opensearch.search.query.QuerySearchResult;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
@ -166,13 +166,13 @@ import java.util.stream.Collectors;
|
|||
import static java.util.Collections.emptyList;
|
||||
import static java.util.Collections.emptyMap;
|
||||
import static java.util.Collections.unmodifiableMap;
|
||||
import static org.elasticsearch.common.collect.MapBuilder.newMapBuilder;
|
||||
import static org.elasticsearch.common.util.CollectionUtils.arrayAsArrayList;
|
||||
import static org.elasticsearch.common.util.concurrent.EsExecutors.daemonThreadFactory;
|
||||
import static org.elasticsearch.index.IndexService.IndexCreationContext.CREATE_INDEX;
|
||||
import static org.elasticsearch.index.IndexService.IndexCreationContext.METADATA_VERIFICATION;
|
||||
import static org.elasticsearch.index.query.AbstractQueryBuilder.parseInnerQueryBuilder;
|
||||
import static org.elasticsearch.search.SearchService.ALLOW_EXPENSIVE_QUERIES;
|
||||
import static org.opensearch.common.collect.MapBuilder.newMapBuilder;
|
||||
import static org.opensearch.common.util.CollectionUtils.arrayAsArrayList;
|
||||
import static org.opensearch.common.util.concurrent.OpenSearchExecutors.daemonThreadFactory;
|
||||
import static org.opensearch.index.IndexService.IndexCreationContext.CREATE_INDEX;
|
||||
import static org.opensearch.index.IndexService.IndexCreationContext.METADATA_VERIFICATION;
|
||||
import static org.opensearch.index.query.AbstractQueryBuilder.parseInnerQueryBuilder;
|
||||
import static org.opensearch.search.SearchService.ALLOW_EXPENSIVE_QUERIES;
|
||||
|
||||
public class IndicesService extends AbstractLifecycleComponent
|
||||
implements IndicesClusterStateService.AllocatedIndices<IndexShard, IndexService>, IndexService.ShardStoreDeleter {
|
||||
|
@ -229,7 +229,7 @@ public class IndicesService extends AbstractLifecycleComponent
|
|||
private volatile boolean allowExpensiveQueries;
|
||||
|
||||
@Nullable
|
||||
private final EsThreadPoolExecutor danglingIndicesThreadPoolExecutor;
|
||||
private final OpenSearchThreadPoolExecutor danglingIndicesThreadPoolExecutor;
|
||||
private final Set<Index> danglingIndicesToWrite = Sets.newConcurrentHashSet();
|
||||
private final boolean nodeWriteDanglingIndicesInfo;
|
||||
private final ValuesSourceRegistry valuesSourceRegistry;
|
||||
|
@ -320,7 +320,7 @@ public class IndicesService extends AbstractLifecycleComponent
|
|||
|
||||
final String nodeName = Objects.requireNonNull(Node.NODE_NAME_SETTING.get(settings));
|
||||
nodeWriteDanglingIndicesInfo = WRITE_DANGLING_INDICES_INFO_SETTING.get(settings);
|
||||
danglingIndicesThreadPoolExecutor = nodeWriteDanglingIndicesInfo ? EsExecutors.newScaling(
|
||||
danglingIndicesThreadPoolExecutor = nodeWriteDanglingIndicesInfo ? OpenSearchExecutors.newScaling(
|
||||
nodeName + "/" + DANGLING_INDICES_UPDATE_THREAD_NAME,
|
||||
1, 1,
|
||||
0, TimeUnit.MILLISECONDS,
|
||||
|
@ -1530,7 +1530,7 @@ public class IndicesService extends AbstractLifecycleComponent
|
|||
* Returns a function which given an index name, returns a predicate which fields must match in order to be returned by get mappings,
|
||||
* get index, get field mappings and field capabilities API. Useful to filter the fields that such API return.
|
||||
* The predicate receives the field name as input argument. In case multiple plugins register a field filter through
|
||||
* {@link org.elasticsearch.plugins.MapperPlugin#getFieldFilter()}, only fields that match all the registered filters will be
|
||||
* {@link org.opensearch.plugins.MapperPlugin#getFieldFilter()}, only fields that match all the registered filters will be
|
||||
* returned by get mappings, get index, get field mappings and field capabilities API.
|
||||
*/
|
||||
public Function<String, Predicate<String>> getFieldFilter() {
|
||||
|
@ -1587,7 +1587,7 @@ public class IndicesService extends AbstractLifecycleComponent
|
|||
}
|
||||
}
|
||||
});
|
||||
} catch (EsRejectedExecutionException e) {
|
||||
} catch (OpenSearchRejectedExecutionException e) {
|
||||
// ignore cases where we are shutting down..., there is really nothing interesting to be done here...
|
||||
assert danglingIndicesThreadPoolExecutor.isShutdown();
|
||||
}
|
|
@ -17,11 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
|
||||
import java.io.IOException;
|
|
@ -17,11 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
|
||||
import java.io.IOException;
|
|
@ -16,11 +16,11 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
|
||||
import java.io.IOException;
|
|
@ -17,10 +17,10 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.index.mapper.MapperException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.index.mapper.MapperException;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
|
||||
import java.io.IOException;
|
|
@ -17,34 +17,34 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.opensearch.action.admin.indices.stats.CommonStats;
|
||||
import org.opensearch.action.admin.indices.stats.IndexShardStats;
|
||||
import org.opensearch.action.admin.indices.stats.ShardStats;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
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.ToXContentFragment;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.cache.query.QueryCacheStats;
|
||||
import org.elasticsearch.index.cache.request.RequestCacheStats;
|
||||
import org.elasticsearch.index.engine.SegmentsStats;
|
||||
import org.elasticsearch.index.fielddata.FieldDataStats;
|
||||
import org.elasticsearch.index.flush.FlushStats;
|
||||
import org.elasticsearch.index.get.GetStats;
|
||||
import org.elasticsearch.index.merge.MergeStats;
|
||||
import org.elasticsearch.index.recovery.RecoveryStats;
|
||||
import org.elasticsearch.index.refresh.RefreshStats;
|
||||
import org.elasticsearch.index.search.stats.SearchStats;
|
||||
import org.elasticsearch.index.shard.DocsStats;
|
||||
import org.elasticsearch.index.shard.IndexingStats;
|
||||
import org.elasticsearch.index.store.StoreStats;
|
||||
import org.elasticsearch.index.translog.TranslogStats;
|
||||
import org.elasticsearch.index.warmer.WarmerStats;
|
||||
import org.elasticsearch.search.suggest.completion.CompletionStats;
|
||||
import org.opensearch.common.Nullable;
|
||||
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.ToXContentFragment;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.cache.query.QueryCacheStats;
|
||||
import org.opensearch.index.cache.request.RequestCacheStats;
|
||||
import org.opensearch.index.engine.SegmentsStats;
|
||||
import org.opensearch.index.fielddata.FieldDataStats;
|
||||
import org.opensearch.index.flush.FlushStats;
|
||||
import org.opensearch.index.get.GetStats;
|
||||
import org.opensearch.index.merge.MergeStats;
|
||||
import org.opensearch.index.recovery.RecoveryStats;
|
||||
import org.opensearch.index.refresh.RefreshStats;
|
||||
import org.opensearch.index.search.stats.SearchStats;
|
||||
import org.opensearch.index.shard.DocsStats;
|
||||
import org.opensearch.index.shard.IndexingStats;
|
||||
import org.opensearch.index.store.StoreStats;
|
||||
import org.opensearch.index.translog.TranslogStats;
|
||||
import org.opensearch.index.warmer.WarmerStats;
|
||||
import org.opensearch.search.suggest.completion.CompletionStats;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
|
@ -17,21 +17,21 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.ValidationException;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.ValidationException;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.index.Index;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING;
|
||||
import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING;
|
||||
|
||||
/**
|
||||
* This class contains the logic used to check the cluster-wide shard limit before shards are created and ensuring that the limit is
|
||||
|
@ -39,7 +39,7 @@ import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_S
|
|||
*
|
||||
* NOTE: This is the limit applied at *shard creation time*. If you are looking for the limit applied at *allocation* time, which is
|
||||
* controlled by a different setting,
|
||||
* see {@link org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider}.
|
||||
* see {@link org.opensearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider}.
|
||||
*/
|
||||
public class ShardLimitValidator {
|
||||
public static final Setting<Integer> SETTING_CLUSTER_MAX_SHARDS_PER_NODE =
|
|
@ -17,10 +17,10 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.apache.lucene.util.automaton.CharacterRunAutomaton;
|
||||
import org.elasticsearch.common.regex.Regex;
|
||||
import org.opensearch.common.regex.Regex;
|
||||
|
||||
import java.util.Objects;
|
||||
|
|
@ -17,17 +17,17 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.apache.lucene.util.automaton.Automata;
|
||||
import org.apache.lucene.util.automaton.Automaton;
|
||||
import org.apache.lucene.util.automaton.CharacterRunAutomaton;
|
||||
import org.apache.lucene.util.automaton.MinimizationOperations;
|
||||
import org.apache.lucene.util.automaton.Operations;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.collect.Tuple;
|
||||
import org.elasticsearch.common.regex.Regex;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.collect.Tuple;
|
||||
import org.opensearch.common.regex.Regex;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.tasks.TaskResultsService;
|
||||
|
||||
import java.util.Collection;
|
|
@ -17,25 +17,25 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.ParseField;
|
||||
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.ConstructingObjectParser;
|
||||
import org.elasticsearch.common.xcontent.ToXContentFragment;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.index.query.TermsQueryBuilder;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.ParseField;
|
||||
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.ConstructingObjectParser;
|
||||
import org.opensearch.common.xcontent.ToXContentFragment;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.common.xcontent.XContentParser;
|
||||
import org.opensearch.index.query.TermsQueryBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
import static org.elasticsearch.common.xcontent.ConstructingObjectParser.constructorArg;
|
||||
import static org.elasticsearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg;
|
||||
import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg;
|
||||
import static org.opensearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg;
|
||||
|
||||
/**
|
||||
* Encapsulates the parameters needed to fetch terms.
|
|
@ -17,11 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices;
|
||||
package org.opensearch.indices;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.rest.RestStatus;
|
||||
|
||||
import java.io.IOException;
|
|
@ -17,38 +17,38 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.analysis;
|
||||
package org.opensearch.indices.analysis;
|
||||
|
||||
import org.apache.lucene.analysis.LowerCaseFilter;
|
||||
import org.apache.lucene.analysis.TokenStream;
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.common.NamedRegistry;
|
||||
import org.elasticsearch.common.logging.DeprecationLogger;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.index.IndexSettings;
|
||||
import org.elasticsearch.index.analysis.AbstractTokenFilterFactory;
|
||||
import org.elasticsearch.index.analysis.AnalysisRegistry;
|
||||
import org.elasticsearch.index.analysis.AnalyzerProvider;
|
||||
import org.elasticsearch.index.analysis.CharFilterFactory;
|
||||
import org.elasticsearch.index.analysis.HunspellTokenFilterFactory;
|
||||
import org.elasticsearch.index.analysis.KeywordAnalyzerProvider;
|
||||
import org.elasticsearch.index.analysis.LowercaseNormalizerProvider;
|
||||
import org.elasticsearch.index.analysis.PreBuiltAnalyzerProviderFactory;
|
||||
import org.elasticsearch.index.analysis.PreConfiguredCharFilter;
|
||||
import org.elasticsearch.index.analysis.PreConfiguredTokenFilter;
|
||||
import org.elasticsearch.index.analysis.PreConfiguredTokenizer;
|
||||
import org.elasticsearch.index.analysis.ShingleTokenFilterFactory;
|
||||
import org.elasticsearch.index.analysis.SimpleAnalyzerProvider;
|
||||
import org.elasticsearch.index.analysis.StandardAnalyzerProvider;
|
||||
import org.elasticsearch.index.analysis.StandardTokenizerFactory;
|
||||
import org.elasticsearch.index.analysis.StopAnalyzerProvider;
|
||||
import org.elasticsearch.index.analysis.StopTokenFilterFactory;
|
||||
import org.elasticsearch.index.analysis.TokenFilterFactory;
|
||||
import org.elasticsearch.index.analysis.TokenizerFactory;
|
||||
import org.elasticsearch.index.analysis.WhitespaceAnalyzerProvider;
|
||||
import org.elasticsearch.plugins.AnalysisPlugin;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.common.NamedRegistry;
|
||||
import org.opensearch.common.logging.DeprecationLogger;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.env.Environment;
|
||||
import org.opensearch.index.IndexSettings;
|
||||
import org.opensearch.index.analysis.AbstractTokenFilterFactory;
|
||||
import org.opensearch.index.analysis.AnalysisRegistry;
|
||||
import org.opensearch.index.analysis.AnalyzerProvider;
|
||||
import org.opensearch.index.analysis.CharFilterFactory;
|
||||
import org.opensearch.index.analysis.HunspellTokenFilterFactory;
|
||||
import org.opensearch.index.analysis.KeywordAnalyzerProvider;
|
||||
import org.opensearch.index.analysis.LowercaseNormalizerProvider;
|
||||
import org.opensearch.index.analysis.PreBuiltAnalyzerProviderFactory;
|
||||
import org.opensearch.index.analysis.PreConfiguredCharFilter;
|
||||
import org.opensearch.index.analysis.PreConfiguredTokenFilter;
|
||||
import org.opensearch.index.analysis.PreConfiguredTokenizer;
|
||||
import org.opensearch.index.analysis.ShingleTokenFilterFactory;
|
||||
import org.opensearch.index.analysis.SimpleAnalyzerProvider;
|
||||
import org.opensearch.index.analysis.StandardAnalyzerProvider;
|
||||
import org.opensearch.index.analysis.StandardTokenizerFactory;
|
||||
import org.opensearch.index.analysis.StopAnalyzerProvider;
|
||||
import org.opensearch.index.analysis.StopTokenFilterFactory;
|
||||
import org.opensearch.index.analysis.TokenFilterFactory;
|
||||
import org.opensearch.index.analysis.TokenizerFactory;
|
||||
import org.opensearch.index.analysis.WhitespaceAnalyzerProvider;
|
||||
import org.opensearch.plugins.AnalysisPlugin;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
@ -56,7 +56,7 @@ import java.util.Locale;
|
|||
import java.util.Map;
|
||||
|
||||
import static java.util.Collections.unmodifiableMap;
|
||||
import static org.elasticsearch.plugins.AnalysisPlugin.requiresAnalysisSettings;
|
||||
import static org.opensearch.plugins.AnalysisPlugin.requiresAnalysisSettings;
|
||||
|
||||
/**
|
||||
* Sets up {@link AnalysisRegistry}.
|
||||
|
@ -163,7 +163,7 @@ public final class AnalysisModule {
|
|||
static Map<String, PreConfiguredCharFilter> setupPreConfiguredCharFilters(List<AnalysisPlugin> plugins) {
|
||||
NamedRegistry<PreConfiguredCharFilter> preConfiguredCharFilters = new NamedRegistry<>("pre-configured char_filter");
|
||||
|
||||
// No char filter are available in lucene-core so none are built in to Elasticsearch core
|
||||
// No char filter are available in lucene-core so none are built in to OpenSearch core
|
||||
|
||||
for (AnalysisPlugin plugin: plugins) {
|
||||
for (PreConfiguredCharFilter filter : plugin.getPreConfiguredCharFilters()) {
|
||||
|
@ -180,7 +180,7 @@ public final class AnalysisModule {
|
|||
preConfiguredTokenFilters.register("lowercase", PreConfiguredTokenFilter.singleton("lowercase", true, LowerCaseFilter::new));
|
||||
// Add "standard" for old indices (bwc)
|
||||
preConfiguredTokenFilters.register( "standard",
|
||||
PreConfiguredTokenFilter.elasticsearchVersion("standard", true, (reader, version) -> {
|
||||
PreConfiguredTokenFilter.opensearchVersion("standard", true, (reader, version) -> {
|
||||
// This was originally removed in 7_0_0 but due to a cacheing bug it was still possible
|
||||
// in certain circumstances to create a new index referencing the standard token filter
|
||||
// until version 7_5_2
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.indices.analysis;
|
||||
package org.opensearch.indices.analysis;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -24,13 +24,13 @@ import org.apache.logging.log4j.message.ParameterizedMessage;
|
|||
import org.apache.lucene.analysis.hunspell.Dictionary;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.store.SimpleFSDirectory;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.core.internal.io.IOUtils;
|
||||
import org.elasticsearch.common.io.FileSystemUtils;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.core.internal.io.IOUtils;
|
||||
import org.opensearch.common.io.FileSystemUtils;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.env.Environment;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -73,7 +73,7 @@ import java.util.function.Function;
|
|||
* strict_affix_parsing: false
|
||||
* </code></pre>
|
||||
*
|
||||
* @see org.elasticsearch.index.analysis.HunspellTokenFilterFactory
|
||||
* @see org.opensearch.index.analysis.HunspellTokenFilterFactory
|
||||
*/
|
||||
public class HunspellService {
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.indices.analysis;
|
||||
package org.opensearch.indices.analysis;
|
||||
|
||||
import org.apache.lucene.analysis.Analyzer;
|
||||
import org.apache.lucene.analysis.CharArraySet;
|
||||
|
@ -27,14 +27,14 @@ import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
|
|||
import org.apache.lucene.analysis.en.EnglishAnalyzer;
|
||||
import org.apache.lucene.analysis.standard.ClassicAnalyzer;
|
||||
import org.apache.lucene.analysis.standard.StandardAnalyzer;
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.indices.analysis.PreBuiltCacheFactory.CachingStrategy;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.indices.analysis.PreBuiltCacheFactory.CachingStrategy;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public enum PreBuiltAnalyzers {
|
||||
|
||||
STANDARD(CachingStrategy.ELASTICSEARCH) {
|
||||
STANDARD(CachingStrategy.OPENSEARCH) {
|
||||
@Override
|
||||
protected Analyzer create(Version version) {
|
||||
final Analyzer a = new StandardAnalyzer(CharArraySet.EMPTY_SET);
|
||||
|
@ -43,7 +43,7 @@ public enum PreBuiltAnalyzers {
|
|||
}
|
||||
},
|
||||
|
||||
DEFAULT(CachingStrategy.ELASTICSEARCH){
|
||||
DEFAULT(CachingStrategy.OPENSEARCH){
|
||||
@Override
|
||||
protected Analyzer create(Version version) {
|
||||
// by calling get analyzer we are ensuring reuse of the same STANDARD analyzer for DEFAULT!
|
|
@ -16,10 +16,10 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.indices.analysis;
|
||||
package org.opensearch.indices.analysis;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.Version;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -33,10 +33,10 @@ public class PreBuiltCacheFactory {
|
|||
*
|
||||
* ONE Exactly one version is stored. Useful for analyzers which do not store version information
|
||||
* LUCENE Exactly one version for each lucene version is stored. Useful to prevent different analyzers with the same version
|
||||
* ELASTICSEARCH Exactly one version per elasticsearch version is stored. Useful if you change an analyzer between elasticsearch
|
||||
* OPENSEARCH Exactly one version per opensearch version is stored. Useful if you change an analyzer between opensearch
|
||||
* releases, when the lucene version does not change
|
||||
*/
|
||||
public enum CachingStrategy { ONE, LUCENE, ELASTICSEARCH }
|
||||
public enum CachingStrategy { ONE, LUCENE, OPENSEARCH }
|
||||
|
||||
public interface PreBuiltCache<T> {
|
||||
|
||||
|
@ -55,8 +55,8 @@ public class PreBuiltCacheFactory {
|
|||
return new PreBuiltCacheStrategyOne<>();
|
||||
case LUCENE:
|
||||
return new PreBuiltCacheStrategyLucene<>();
|
||||
case ELASTICSEARCH:
|
||||
return new PreBuiltCacheStrategyElasticsearch<>();
|
||||
case OPENSEARCH:
|
||||
return new PreBuiltCacheStrategyOpenSearch<>();
|
||||
default:
|
||||
throw new OpenSearchException("No action configured for caching strategy[" + cachingStrategy + "]");
|
||||
}
|
||||
|
@ -86,9 +86,9 @@ public class PreBuiltCacheFactory {
|
|||
}
|
||||
|
||||
/**
|
||||
* This cache contains one version for each elasticsearch version object
|
||||
* This cache contains one version for each opensearch version object
|
||||
*/
|
||||
private static class PreBuiltCacheStrategyElasticsearch<T> implements PreBuiltCache<T> {
|
||||
private static class PreBuiltCacheStrategyOpenSearch<T> implements PreBuiltCache<T> {
|
||||
|
||||
Map<Version, T> mapModel = new HashMap<>(2);
|
||||
|
||||
|
@ -121,7 +121,7 @@ public class PreBuiltCacheFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void put(org.elasticsearch.Version version, T model) {
|
||||
public void put(org.opensearch.Version version, T model) {
|
||||
mapModel.put(version.luceneVersion, model);
|
||||
}
|
||||
|
|
@ -16,13 +16,13 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.indices.analysis;
|
||||
package org.opensearch.indices.analysis;
|
||||
|
||||
import org.apache.lucene.analysis.Tokenizer;
|
||||
import org.apache.lucene.analysis.standard.StandardTokenizer;
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.index.analysis.TokenFilterFactory;
|
||||
import org.elasticsearch.indices.analysis.PreBuiltCacheFactory.CachingStrategy;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.index.analysis.TokenFilterFactory;
|
||||
import org.opensearch.indices.analysis.PreBuiltCacheFactory.CachingStrategy;
|
||||
|
||||
public enum PreBuiltTokenizers {
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.breaker;
|
||||
package org.opensearch.indices.breaker;
|
||||
|
||||
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.ToXContentFragment;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
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.ToXContentFragment;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,12 +17,12 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.breaker;
|
||||
package org.opensearch.indices.breaker;
|
||||
|
||||
import org.elasticsearch.common.breaker.CircuitBreaker;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.breaker.CircuitBreaker;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
|
||||
/**
|
||||
* Settings for a {@link CircuitBreaker}
|
|
@ -17,12 +17,12 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.breaker;
|
||||
package org.opensearch.indices.breaker;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.common.breaker.CircuitBreaker;
|
||||
import org.elasticsearch.common.component.AbstractLifecycleComponent;
|
||||
import org.opensearch.common.breaker.CircuitBreaker;
|
||||
import org.opensearch.common.component.AbstractLifecycleComponent;
|
||||
|
||||
/**
|
||||
* Interface for Circuit Breaker services, which provide breakers to classes
|
|
@ -17,14 +17,14 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.breaker;
|
||||
package org.opensearch.indices.breaker;
|
||||
|
||||
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.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
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.unit.ByteSizeValue;
|
||||
import org.opensearch.common.xcontent.ToXContentObject;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
|
@ -17,26 +17,26 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.breaker;
|
||||
package org.opensearch.indices.breaker;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.elasticsearch.common.Booleans;
|
||||
import org.elasticsearch.common.breaker.ChildMemoryCircuitBreaker;
|
||||
import org.elasticsearch.common.breaker.CircuitBreaker;
|
||||
import org.elasticsearch.common.breaker.CircuitBreakingException;
|
||||
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
|
||||
import org.elasticsearch.common.settings.ClusterSettings;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
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.util.concurrent.ReleasableLock;
|
||||
import org.elasticsearch.monitor.jvm.GcNames;
|
||||
import org.elasticsearch.monitor.jvm.JvmInfo;
|
||||
import org.opensearch.common.Booleans;
|
||||
import org.opensearch.common.breaker.ChildMemoryCircuitBreaker;
|
||||
import org.opensearch.common.breaker.CircuitBreaker;
|
||||
import org.opensearch.common.breaker.CircuitBreakingException;
|
||||
import org.opensearch.common.breaker.NoopCircuitBreaker;
|
||||
import org.opensearch.common.settings.ClusterSettings;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
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.util.concurrent.ReleasableLock;
|
||||
import org.opensearch.monitor.jvm.GcNames;
|
||||
import org.opensearch.monitor.jvm.JvmInfo;
|
||||
|
||||
import java.lang.management.GarbageCollectorMXBean;
|
||||
import java.lang.management.ManagementFactory;
|
||||
|
@ -52,8 +52,8 @@ import java.util.function.Function;
|
|||
import java.util.function.LongSupplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.elasticsearch.indices.breaker.BreakerSettings.CIRCUIT_BREAKER_LIMIT_SETTING;
|
||||
import static org.elasticsearch.indices.breaker.BreakerSettings.CIRCUIT_BREAKER_OVERHEAD_SETTING;
|
||||
import static org.opensearch.indices.breaker.BreakerSettings.CIRCUIT_BREAKER_LIMIT_SETTING;
|
||||
import static org.opensearch.indices.breaker.BreakerSettings.CIRCUIT_BREAKER_OVERHEAD_SETTING;
|
||||
|
||||
/**
|
||||
* CircuitBreakerService that attempts to redistribute space between breakers
|
||||
|
@ -62,7 +62,7 @@ import static org.elasticsearch.indices.breaker.BreakerSettings.CIRCUIT_BREAKER_
|
|||
public class HierarchyCircuitBreakerService extends CircuitBreakerService {
|
||||
private static final Logger logger = LogManager.getLogger(HierarchyCircuitBreakerService.class);
|
||||
|
||||
private static final String CHILD_LOGGER_PREFIX = "org.elasticsearch.indices.breaker.";
|
||||
private static final String CHILD_LOGGER_PREFIX = "org.opensearch.indices.breaker.";
|
||||
|
||||
private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.breaker;
|
||||
package org.opensearch.indices.breaker;
|
||||
|
||||
import org.elasticsearch.common.breaker.CircuitBreaker;
|
||||
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
|
||||
import org.opensearch.common.breaker.CircuitBreaker;
|
||||
import org.opensearch.common.breaker.NoopCircuitBreaker;
|
||||
|
||||
/**
|
||||
* Class that returns a breaker that never breaks
|
|
@ -17,59 +17,59 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.cluster;
|
||||
package org.opensearch.indices.cluster;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.elasticsearch.ResourceAlreadyExistsException;
|
||||
import org.opensearch.ResourceAlreadyExistsException;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.cluster.ClusterChangedEvent;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.ClusterStateApplier;
|
||||
import org.opensearch.cluster.action.index.NodeMappingRefreshAction;
|
||||
import org.opensearch.cluster.action.shard.ShardStateAction;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.RecoverySource.Type;
|
||||
import org.elasticsearch.cluster.routing.RoutingNode;
|
||||
import org.elasticsearch.cluster.routing.RoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.component.AbstractLifecycleComponent;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.elasticsearch.env.ShardLockObtainFailedException;
|
||||
import org.elasticsearch.gateway.GatewayService;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.IndexComponent;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.IndexSettings;
|
||||
import org.elasticsearch.index.seqno.GlobalCheckpointSyncAction;
|
||||
import org.elasticsearch.index.seqno.ReplicationTracker;
|
||||
import org.elasticsearch.index.seqno.RetentionLeaseSyncer;
|
||||
import org.elasticsearch.index.shard.IndexEventListener;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.IndexShardRelocatedException;
|
||||
import org.elasticsearch.index.shard.IndexShardState;
|
||||
import org.elasticsearch.index.shard.PrimaryReplicaSyncer;
|
||||
import org.elasticsearch.index.shard.PrimaryReplicaSyncer.ResyncTask;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.shard.ShardNotFoundException;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.elasticsearch.indices.flush.SyncedFlushService;
|
||||
import org.elasticsearch.indices.recovery.PeerRecoverySourceService;
|
||||
import org.elasticsearch.indices.recovery.PeerRecoveryTargetService;
|
||||
import org.elasticsearch.indices.recovery.RecoveryFailedException;
|
||||
import org.elasticsearch.indices.recovery.RecoveryState;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.node.DiscoveryNodes;
|
||||
import org.opensearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.opensearch.cluster.routing.RecoverySource.Type;
|
||||
import org.opensearch.cluster.routing.RoutingNode;
|
||||
import org.opensearch.cluster.routing.RoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.component.AbstractLifecycleComponent;
|
||||
import org.opensearch.common.inject.Inject;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.opensearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.opensearch.env.ShardLockObtainFailedException;
|
||||
import org.opensearch.gateway.GatewayService;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.IndexComponent;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.IndexSettings;
|
||||
import org.opensearch.index.seqno.GlobalCheckpointSyncAction;
|
||||
import org.opensearch.index.seqno.ReplicationTracker;
|
||||
import org.opensearch.index.seqno.RetentionLeaseSyncer;
|
||||
import org.opensearch.index.shard.IndexEventListener;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.IndexShardRelocatedException;
|
||||
import org.opensearch.index.shard.IndexShardState;
|
||||
import org.opensearch.index.shard.PrimaryReplicaSyncer;
|
||||
import org.opensearch.index.shard.PrimaryReplicaSyncer.ResyncTask;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.shard.ShardNotFoundException;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.indices.flush.SyncedFlushService;
|
||||
import org.opensearch.indices.recovery.PeerRecoverySourceService;
|
||||
import org.opensearch.indices.recovery.PeerRecoveryTargetService;
|
||||
import org.opensearch.indices.recovery.RecoveryFailedException;
|
||||
import org.opensearch.indices.recovery.RecoveryState;
|
||||
import org.opensearch.repositories.RepositoriesService;
|
||||
import org.elasticsearch.search.SearchService;
|
||||
import org.opensearch.search.SearchService;
|
||||
import org.opensearch.snapshots.SnapshotShardsService;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
|
||||
|
@ -88,11 +88,11 @@ import java.util.concurrent.TimeUnit;
|
|||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static org.elasticsearch.indices.cluster.IndicesClusterStateService.AllocatedIndices.IndexRemovalReason.CLOSED;
|
||||
import static org.elasticsearch.indices.cluster.IndicesClusterStateService.AllocatedIndices.IndexRemovalReason.DELETED;
|
||||
import static org.elasticsearch.indices.cluster.IndicesClusterStateService.AllocatedIndices.IndexRemovalReason.FAILURE;
|
||||
import static org.elasticsearch.indices.cluster.IndicesClusterStateService.AllocatedIndices.IndexRemovalReason.NO_LONGER_ASSIGNED;
|
||||
import static org.elasticsearch.indices.cluster.IndicesClusterStateService.AllocatedIndices.IndexRemovalReason.REOPENED;
|
||||
import static org.opensearch.indices.cluster.IndicesClusterStateService.AllocatedIndices.IndexRemovalReason.CLOSED;
|
||||
import static org.opensearch.indices.cluster.IndicesClusterStateService.AllocatedIndices.IndexRemovalReason.DELETED;
|
||||
import static org.opensearch.indices.cluster.IndicesClusterStateService.AllocatedIndices.IndexRemovalReason.FAILURE;
|
||||
import static org.opensearch.indices.cluster.IndicesClusterStateService.AllocatedIndices.IndexRemovalReason.NO_LONGER_ASSIGNED;
|
||||
import static org.opensearch.indices.cluster.IndicesClusterStateService.AllocatedIndices.IndexRemovalReason.REOPENED;
|
||||
|
||||
public class IndicesClusterStateService extends AbstractLifecycleComponent implements ClusterStateApplier {
|
||||
private static final Logger logger = LogManager.getLogger(IndicesClusterStateService.class);
|
||||
|
@ -351,7 +351,7 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent imple
|
|||
/**
|
||||
* Removes indices that have no shards allocated to this node or indices whose state has changed. This does not delete the shard data
|
||||
* as we wait for enough shard copies to exist in the cluster before deleting shard data (triggered by
|
||||
* {@link org.elasticsearch.indices.store.IndicesStore}).
|
||||
* {@link org.opensearch.indices.store.IndicesStore}).
|
||||
*
|
||||
* @param event the cluster changed event
|
||||
*/
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.fielddata.cache;
|
||||
package org.opensearch.indices.fielddata.cache;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
|
@ -28,23 +28,23 @@ import org.apache.lucene.index.IndexReader;
|
|||
import org.apache.lucene.index.LeafReaderContext;
|
||||
import org.apache.lucene.index.IndexReader.CacheKey;
|
||||
import org.apache.lucene.util.Accountable;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.cache.Cache;
|
||||
import org.elasticsearch.common.cache.CacheBuilder;
|
||||
import org.elasticsearch.common.cache.RemovalListener;
|
||||
import org.elasticsearch.common.cache.RemovalNotification;
|
||||
import org.elasticsearch.common.lease.Releasable;
|
||||
import org.elasticsearch.common.lucene.index.OpenSearchDirectoryReader;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.fielddata.LeafFieldData;
|
||||
import org.elasticsearch.index.fielddata.IndexFieldData;
|
||||
import org.elasticsearch.index.fielddata.IndexFieldDataCache;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.shard.ShardUtils;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.cache.Cache;
|
||||
import org.opensearch.common.cache.CacheBuilder;
|
||||
import org.opensearch.common.cache.RemovalListener;
|
||||
import org.opensearch.common.cache.RemovalNotification;
|
||||
import org.opensearch.common.lease.Releasable;
|
||||
import org.opensearch.common.lucene.index.OpenSearchDirectoryReader;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.fielddata.LeafFieldData;
|
||||
import org.opensearch.index.fielddata.IndexFieldData;
|
||||
import org.opensearch.index.fielddata.IndexFieldDataCache;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.shard.ShardUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
|
@ -16,13 +16,13 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.indices.flush;
|
||||
package org.opensearch.indices.flush;
|
||||
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.common.io.stream.Writeable;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
|
@ -16,56 +16,56 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.indices.flush;
|
||||
package org.opensearch.indices.flush;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.StepListener;
|
||||
import org.opensearch.action.admin.indices.flush.FlushRequest;
|
||||
import org.opensearch.action.admin.indices.flush.SyncedFlushResponse;
|
||||
import org.opensearch.action.support.IndicesOptions;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.UUIDs;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.logging.DeprecationLogger;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.elasticsearch.common.util.concurrent.CountDown;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.IndexNotFoundException;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.engine.CommitStats;
|
||||
import org.elasticsearch.index.engine.Engine;
|
||||
import org.elasticsearch.index.shard.IndexEventListener;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.IndexShardState;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.shard.ShardNotFoundException;
|
||||
import org.elasticsearch.indices.IndexClosedException;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.UUIDs;
|
||||
import org.opensearch.common.inject.Inject;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.common.logging.DeprecationLogger;
|
||||
import org.opensearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.opensearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.opensearch.common.util.concurrent.CountDown;
|
||||
import org.opensearch.index.Index;
|
||||
import org.opensearch.index.IndexNotFoundException;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.engine.CommitStats;
|
||||
import org.opensearch.index.engine.Engine;
|
||||
import org.opensearch.index.shard.IndexEventListener;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.IndexShardState;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.shard.ShardNotFoundException;
|
||||
import org.opensearch.indices.IndexClosedException;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.tasks.Task;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportChannel;
|
||||
import org.elasticsearch.transport.TransportException;
|
||||
import org.elasticsearch.transport.TransportRequest;
|
||||
import org.elasticsearch.transport.TransportRequestHandler;
|
||||
import org.elasticsearch.transport.TransportResponse;
|
||||
import org.elasticsearch.transport.TransportResponseHandler;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.transport.TransportChannel;
|
||||
import org.opensearch.transport.TransportException;
|
||||
import org.opensearch.transport.TransportRequest;
|
||||
import org.opensearch.transport.TransportRequestHandler;
|
||||
import org.opensearch.transport.TransportResponse;
|
||||
import org.opensearch.transport.TransportResponseHandler;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
|
@ -17,13 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.mapper;
|
||||
package org.opensearch.indices.mapper;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.index.mapper.AllFieldMapper;
|
||||
import org.elasticsearch.index.mapper.Mapper;
|
||||
import org.elasticsearch.index.mapper.MetadataFieldMapper;
|
||||
import org.elasticsearch.plugins.MapperPlugin;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.index.mapper.AllFieldMapper;
|
||||
import org.opensearch.index.mapper.Mapper;
|
||||
import org.opensearch.index.mapper.MetadataFieldMapper;
|
||||
import org.opensearch.plugins.MapperPlugin;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
|
@ -17,10 +17,10 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,17 +17,17 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.elasticsearch.Assertions;
|
||||
import org.opensearch.Assertions;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.elasticsearch.common.collect.Tuple;
|
||||
import org.elasticsearch.common.util.concurrent.AsyncIOProcessor;
|
||||
import org.elasticsearch.common.util.concurrent.ThreadContext;
|
||||
import org.elasticsearch.core.internal.io.IOUtils;
|
||||
import org.elasticsearch.index.seqno.LocalCheckpointTracker;
|
||||
import org.opensearch.common.collect.Tuple;
|
||||
import org.opensearch.common.util.concurrent.AsyncIOProcessor;
|
||||
import org.opensearch.common.util.concurrent.ThreadContext;
|
||||
import org.opensearch.core.internal.io.IOUtils;
|
||||
import org.opensearch.index.seqno.LocalCheckpointTracker;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
|
@ -35,8 +35,8 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static org.elasticsearch.index.seqno.SequenceNumbers.NO_OPS_PERFORMED;
|
||||
import static org.elasticsearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO;
|
||||
import static org.opensearch.index.seqno.SequenceNumbers.NO_OPS_PERFORMED;
|
||||
import static org.opensearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO;
|
||||
|
||||
/**
|
||||
* File chunks are sent/requested sequentially by at most one thread at any time. However, the sender/requestor won't wait for the response
|
|
@ -16,7 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
|
@ -24,14 +24,14 @@ import org.apache.lucene.store.IOContext;
|
|||
import org.apache.lucene.store.IndexOutput;
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.lucene.util.BytesRefIterator;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.lease.Releasable;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRefCounted;
|
||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.index.store.StoreFileMetadata;
|
||||
import org.elasticsearch.transport.Transports;
|
||||
import org.opensearch.common.Strings;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.lease.Releasable;
|
||||
import org.opensearch.common.util.concurrent.AbstractRefCounted;
|
||||
import org.opensearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.opensearch.index.store.Store;
|
||||
import org.opensearch.index.store.StoreFileMetadata;
|
||||
import org.opensearch.transport.Transports;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
|
@ -17,11 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.ResourceNotFoundException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.opensearch.ResourceNotFoundException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,36 +17,36 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.ResourceNotFoundException;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.ResourceNotFoundException;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.support.ChannelActionListener;
|
||||
import org.opensearch.action.support.PlainActionFuture;
|
||||
import org.opensearch.cluster.ClusterChangedEvent;
|
||||
import org.opensearch.cluster.ClusterStateListener;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.collect.Tuple;
|
||||
import org.elasticsearch.common.component.AbstractLifecycleComponent;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.concurrent.FutureUtils;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.shard.IndexEventListener;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.collect.Tuple;
|
||||
import org.opensearch.common.component.AbstractLifecycleComponent;
|
||||
import org.opensearch.common.inject.Inject;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.util.concurrent.FutureUtils;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.shard.IndexEventListener;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.tasks.Task;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportChannel;
|
||||
import org.elasticsearch.transport.TransportRequestHandler;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.transport.TransportChannel;
|
||||
import org.opensearch.transport.TransportRequestHandler;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
|
@ -17,63 +17,63 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.apache.lucene.store.AlreadyClosedException;
|
||||
import org.apache.lucene.store.RateLimiter;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.OpenSearchTimeoutException;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.OpenSearchTimeoutException;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.ActionRunnable;
|
||||
import org.opensearch.action.support.ChannelActionListener;
|
||||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.ClusterStateObserver;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.CheckedFunction;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.CancellableThreads;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.index.IndexNotFoundException;
|
||||
import org.elasticsearch.index.engine.RecoveryEngineException;
|
||||
import org.elasticsearch.index.mapper.MapperException;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.index.shard.IllegalIndexShardStateException;
|
||||
import org.elasticsearch.index.shard.IndexEventListener;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.shard.ShardNotFoundException;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.index.translog.Translog;
|
||||
import org.elasticsearch.index.translog.TranslogCorruptedException;
|
||||
import org.elasticsearch.indices.recovery.RecoveriesCollection.RecoveryRef;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.CheckedFunction;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.CancellableThreads;
|
||||
import org.opensearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.opensearch.index.IndexNotFoundException;
|
||||
import org.opensearch.index.engine.RecoveryEngineException;
|
||||
import org.opensearch.index.mapper.MapperException;
|
||||
import org.opensearch.index.seqno.SequenceNumbers;
|
||||
import org.opensearch.index.shard.IllegalIndexShardStateException;
|
||||
import org.opensearch.index.shard.IndexEventListener;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.shard.ShardNotFoundException;
|
||||
import org.opensearch.index.store.Store;
|
||||
import org.opensearch.index.translog.Translog;
|
||||
import org.opensearch.index.translog.TranslogCorruptedException;
|
||||
import org.opensearch.indices.recovery.RecoveriesCollection.RecoveryRef;
|
||||
import org.opensearch.tasks.Task;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.ConnectTransportException;
|
||||
import org.elasticsearch.transport.TransportChannel;
|
||||
import org.elasticsearch.transport.TransportException;
|
||||
import org.elasticsearch.transport.TransportRequest;
|
||||
import org.elasticsearch.transport.TransportRequestHandler;
|
||||
import org.elasticsearch.transport.TransportResponse;
|
||||
import org.elasticsearch.transport.TransportResponseHandler;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.transport.ConnectTransportException;
|
||||
import org.opensearch.transport.TransportChannel;
|
||||
import org.opensearch.transport.TransportException;
|
||||
import org.opensearch.transport.TransportRequest;
|
||||
import org.opensearch.transport.TransportRequestHandler;
|
||||
import org.opensearch.transport.TransportResponse;
|
||||
import org.opensearch.transport.TransportResponseHandler;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static org.elasticsearch.common.unit.TimeValue.timeValueMillis;
|
||||
import static org.elasticsearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO;
|
||||
import static org.opensearch.common.unit.TimeValue.timeValueMillis;
|
||||
import static org.opensearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO;
|
||||
|
||||
/**
|
||||
* The recovery target handles recoveries of peer shards of the shard+node to recover to.
|
|
@ -17,14 +17,14 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.OpenSearchWrapperException;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.OpenSearchWrapperException;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
|
@ -17,18 +17,18 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.elasticsearch.OpenSearchTimeoutException;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.IndexShardClosedException;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.opensearch.OpenSearchTimeoutException;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.opensearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.IndexShardClosedException;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
|
||||
import java.util.ArrayList;
|
|
@ -17,14 +17,14 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.index.seqno.SequenceNumbers;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.store.Store;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,15 +17,15 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.apache.lucene.util.Version;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.lucene.Lucene;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.store.StoreFileMetadata;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.common.lucene.Lucene;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.store.StoreFileMetadata;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
|
@ -17,13 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.index.seqno.SequenceNumbers;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.seqno.ReplicationTracker;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.transport.TransportRequest;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.index.seqno.ReplicationTracker;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.transport.TransportRequest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,19 +17,19 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
import org.elasticsearch.common.util.concurrent.ListenableFuture;
|
||||
import org.elasticsearch.index.seqno.LocalCheckpointTracker;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.util.concurrent.OpenSearchExecutors;
|
||||
import org.opensearch.common.util.concurrent.ListenableFuture;
|
||||
import org.opensearch.index.seqno.LocalCheckpointTracker;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.elasticsearch.index.seqno.SequenceNumbers.NO_OPS_PERFORMED;
|
||||
import static org.opensearch.index.seqno.SequenceNumbers.NO_OPS_PERFORMED;
|
||||
|
||||
public class RecoveryRequestTracker {
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class RecoveryRequestTracker {
|
|||
if (checkpointTracker.hasProcessed(requestSeqNo)) {
|
||||
final ListenableFuture<Void> existingFuture = ongoingRequests.get(requestSeqNo);
|
||||
if (existingFuture != null) {
|
||||
existingFuture.addListener(listener, EsExecutors.newDirectExecutorService());
|
||||
existingFuture.addListener(listener, OpenSearchExecutors.newDirectExecutorService());
|
||||
} else {
|
||||
listener.onResponse(null);
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public class RecoveryRequestTracker {
|
|||
// We do not remove the future to cache the error for retried requests
|
||||
listener.onFailure(e);
|
||||
}
|
||||
}, EsExecutors.newDirectExecutorService());
|
||||
}, OpenSearchExecutors.newDirectExecutorService());
|
||||
return future;
|
||||
}
|
||||
}
|
|
@ -17,11 +17,11 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.transport.TransportResponse;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.transport.TransportResponse;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
|
@ -17,19 +17,19 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.lucene.store.RateLimiter;
|
||||
import org.apache.lucene.store.RateLimiter.SimpleRateLimiter;
|
||||
import org.elasticsearch.common.settings.ClusterSettings;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
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.opensearch.common.settings.ClusterSettings;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.ByteSizeUnit;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
|
||||
public class RecoverySettings {
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
|
@ -30,48 +30,48 @@ import org.apache.lucene.store.IndexInput;
|
|||
import org.apache.lucene.store.RateLimiter;
|
||||
import org.apache.lucene.util.ArrayUtil;
|
||||
import org.apache.lucene.util.SetOnce;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.ActionRunnable;
|
||||
import org.opensearch.action.StepListener;
|
||||
import org.elasticsearch.action.support.PlainActionFuture;
|
||||
import org.elasticsearch.action.support.ThreadedActionListener;
|
||||
import org.elasticsearch.action.support.replication.ReplicationResponse;
|
||||
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.common.CheckedRunnable;
|
||||
import org.elasticsearch.common.StopWatch;
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.lease.Releasable;
|
||||
import org.elasticsearch.common.lease.Releasables;
|
||||
import org.elasticsearch.common.logging.Loggers;
|
||||
import org.elasticsearch.common.lucene.store.InputStreamIndexInput;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.CancellableThreads;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
import org.elasticsearch.common.util.concurrent.FutureUtils;
|
||||
import org.elasticsearch.common.util.concurrent.ListenableFuture;
|
||||
import org.elasticsearch.core.internal.io.IOUtils;
|
||||
import org.elasticsearch.index.engine.Engine;
|
||||
import org.elasticsearch.index.engine.RecoveryEngineException;
|
||||
import org.elasticsearch.index.seqno.ReplicationTracker;
|
||||
import org.elasticsearch.index.seqno.RetentionLease;
|
||||
import org.elasticsearch.index.seqno.RetentionLeaseNotFoundException;
|
||||
import org.elasticsearch.index.seqno.RetentionLeases;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.IndexShardClosedException;
|
||||
import org.elasticsearch.index.shard.IndexShardRelocatedException;
|
||||
import org.elasticsearch.index.shard.IndexShardState;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.index.store.StoreFileMetadata;
|
||||
import org.elasticsearch.index.translog.Translog;
|
||||
import org.opensearch.action.support.PlainActionFuture;
|
||||
import org.opensearch.action.support.ThreadedActionListener;
|
||||
import org.opensearch.action.support.replication.ReplicationResponse;
|
||||
import org.opensearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.common.CheckedRunnable;
|
||||
import org.opensearch.common.StopWatch;
|
||||
import org.opensearch.common.bytes.BytesArray;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.lease.Releasable;
|
||||
import org.opensearch.common.lease.Releasables;
|
||||
import org.opensearch.common.logging.Loggers;
|
||||
import org.opensearch.common.lucene.store.InputStreamIndexInput;
|
||||
import org.opensearch.common.unit.ByteSizeValue;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.CancellableThreads;
|
||||
import org.opensearch.common.util.concurrent.OpenSearchExecutors;
|
||||
import org.opensearch.common.util.concurrent.FutureUtils;
|
||||
import org.opensearch.common.util.concurrent.ListenableFuture;
|
||||
import org.opensearch.core.internal.io.IOUtils;
|
||||
import org.opensearch.index.engine.Engine;
|
||||
import org.opensearch.index.engine.RecoveryEngineException;
|
||||
import org.opensearch.index.seqno.ReplicationTracker;
|
||||
import org.opensearch.index.seqno.RetentionLease;
|
||||
import org.opensearch.index.seqno.RetentionLeaseNotFoundException;
|
||||
import org.opensearch.index.seqno.RetentionLeases;
|
||||
import org.opensearch.index.seqno.SequenceNumbers;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.IndexShardClosedException;
|
||||
import org.opensearch.index.shard.IndexShardRelocatedException;
|
||||
import org.opensearch.index.shard.IndexShardState;
|
||||
import org.opensearch.index.store.Store;
|
||||
import org.opensearch.index.store.StoreFileMetadata;
|
||||
import org.opensearch.index.translog.Translog;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.RemoteTransportException;
|
||||
import org.elasticsearch.transport.Transports;
|
||||
import org.opensearch.transport.RemoteTransportException;
|
||||
import org.opensearch.transport.Transports;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
|
@ -140,7 +140,7 @@ public class RecoverySourceHandler {
|
|||
}
|
||||
|
||||
public void addListener(ActionListener<RecoveryResponse> listener) {
|
||||
future.addListener(listener, EsExecutors.newDirectExecutorService());
|
||||
future.addListener(listener, OpenSearchExecutors.newDirectExecutorService());
|
||||
}
|
||||
|
||||
/**
|
|
@ -17,26 +17,26 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.routing.RecoverySource;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.Strings;
|
||||
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.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.xcontent.ToXContentFragment;
|
||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.store.StoreStats;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.RecoverySource;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.Strings;
|
||||
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.unit.ByteSizeValue;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.xcontent.ToXContentFragment;
|
||||
import org.opensearch.common.xcontent.ToXContentObject;
|
||||
import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import org.opensearch.common.xcontent.XContentFactory;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.store.StoreStats;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
|
@ -17,37 +17,37 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.apache.lucene.index.IndexFormatTooNewException;
|
||||
import org.apache.lucene.index.IndexFormatTooOldException;
|
||||
import org.elasticsearch.Assertions;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.Assertions;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.admin.indices.flush.FlushRequest;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.UUIDs;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.logging.Loggers;
|
||||
import org.elasticsearch.common.lucene.Lucene;
|
||||
import org.elasticsearch.common.util.CancellableThreads;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRefCounted;
|
||||
import org.elasticsearch.index.engine.Engine;
|
||||
import org.elasticsearch.index.mapper.MapperException;
|
||||
import org.elasticsearch.index.seqno.ReplicationTracker;
|
||||
import org.elasticsearch.index.seqno.RetentionLeases;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.IndexShardNotRecoveringException;
|
||||
import org.elasticsearch.index.shard.IndexShardState;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.index.store.StoreFileMetadata;
|
||||
import org.elasticsearch.index.translog.Translog;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.UUIDs;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.logging.Loggers;
|
||||
import org.opensearch.common.lucene.Lucene;
|
||||
import org.opensearch.common.util.CancellableThreads;
|
||||
import org.opensearch.common.util.concurrent.AbstractRefCounted;
|
||||
import org.opensearch.index.engine.Engine;
|
||||
import org.opensearch.index.mapper.MapperException;
|
||||
import org.opensearch.index.seqno.ReplicationTracker;
|
||||
import org.opensearch.index.seqno.RetentionLeases;
|
||||
import org.opensearch.index.seqno.SequenceNumbers;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.IndexShardNotRecoveringException;
|
||||
import org.opensearch.index.shard.IndexShardState;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.store.Store;
|
||||
import org.opensearch.index.store.StoreFileMetadata;
|
||||
import org.opensearch.index.translog.Translog;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
|
@ -16,15 +16,15 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.index.seqno.ReplicationTracker;
|
||||
import org.elasticsearch.index.seqno.RetentionLeases;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.index.store.StoreFileMetadata;
|
||||
import org.elasticsearch.index.translog.Translog;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.index.seqno.ReplicationTracker;
|
||||
import org.opensearch.index.seqno.RetentionLeases;
|
||||
import org.opensearch.index.store.Store;
|
||||
import org.opensearch.index.store.StoreFileMetadata;
|
||||
import org.opensearch.index.translog.Translog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -68,7 +68,7 @@ public interface RecoveryTargetHandler {
|
|||
* @param mappingVersionOnPrimary the mapping version which is at least as up to date as the mapping version that the
|
||||
* primary used to index translog {@code operations} in this request.
|
||||
* If the mapping version on the replica is not older this version, we should not retry on
|
||||
* {@link org.elasticsearch.index.mapper.MapperException}; otherwise we should wait for a
|
||||
* {@link org.opensearch.index.mapper.MapperException}; otherwise we should wait for a
|
||||
* new mapping then retry.
|
||||
* @param listener a listener which will be notified with the local checkpoint on the target
|
||||
* after these operations are successfully indexed on the target.
|
|
@ -17,16 +17,16 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.seqno.RetentionLeases;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.translog.Translog;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.index.IndexRequest;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.index.seqno.RetentionLeases;
|
||||
import org.opensearch.index.seqno.SequenceNumbers;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.translog.Translog;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
@ -94,7 +94,7 @@ public class RecoveryTranslogOperationsRequest extends RecoveryTransportRequest
|
|||
/**
|
||||
* Returns the mapping version which is at least as up to date as the mapping version that the primary used to index
|
||||
* the translog operations in this request. If the mapping version on the replica is not older this version, we should not
|
||||
* retry on {@link org.elasticsearch.index.mapper.MapperException}; otherwise we should wait for a new mapping then retry.
|
||||
* retry on {@link org.opensearch.index.mapper.MapperException}; otherwise we should wait for a new mapping then retry.
|
||||
*/
|
||||
long mappingVersionOnPrimary() {
|
||||
return mappingVersionOnPrimary;
|
|
@ -17,13 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.transport.TransportResponse;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.index.seqno.SequenceNumbers;
|
||||
import org.opensearch.transport.TransportResponse;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.transport.TransportRequest;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.index.seqno.SequenceNumbers;
|
||||
import org.opensearch.transport.TransportRequest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -51,7 +51,7 @@ public abstract class RecoveryTransportRequest extends TransportRequest {
|
|||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
super.writeTo(out);
|
||||
if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_7_9_0)) {
|
||||
if (out.getVersion().onOrAfter(org.opensearch.Version.V_7_9_0)) {
|
||||
out.writeLong(requestSeqNo);
|
||||
}
|
||||
}
|
|
@ -17,12 +17,12 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.transport.TransportRequest;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.transport.TransportRequest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,39 +17,39 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.lucene.store.RateLimiter;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.ExceptionsHelper;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.opensearch.action.ActionListenerResponseHandler;
|
||||
import org.opensearch.action.support.RetryableAction;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.breaker.CircuitBreakingException;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.CancellableThreads;
|
||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.elasticsearch.index.seqno.ReplicationTracker;
|
||||
import org.elasticsearch.index.seqno.RetentionLeases;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.index.store.StoreFileMetadata;
|
||||
import org.elasticsearch.index.translog.Translog;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.breaker.CircuitBreakingException;
|
||||
import org.opensearch.common.bytes.BytesReference;
|
||||
import org.opensearch.common.io.stream.Writeable;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.CancellableThreads;
|
||||
import org.opensearch.common.util.concurrent.ConcurrentCollections;
|
||||
import org.opensearch.common.util.concurrent.OpenSearchRejectedExecutionException;
|
||||
import org.opensearch.index.seqno.ReplicationTracker;
|
||||
import org.opensearch.index.seqno.RetentionLeases;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.store.Store;
|
||||
import org.opensearch.index.store.StoreFileMetadata;
|
||||
import org.opensearch.index.translog.Translog;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.ConnectTransportException;
|
||||
import org.elasticsearch.transport.EmptyTransportResponseHandler;
|
||||
import org.elasticsearch.transport.RemoteTransportException;
|
||||
import org.elasticsearch.transport.SendRequestTransportException;
|
||||
import org.elasticsearch.transport.TransportRequestOptions;
|
||||
import org.elasticsearch.transport.TransportResponse;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.transport.ConnectTransportException;
|
||||
import org.opensearch.transport.EmptyTransportResponseHandler;
|
||||
import org.opensearch.transport.RemoteTransportException;
|
||||
import org.opensearch.transport.SendRequestTransportException;
|
||||
import org.opensearch.transport.TransportRequestOptions;
|
||||
import org.opensearch.transport.TransportResponse;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
@ -282,7 +282,7 @@ public class RemoteRecoveryTargetHandler implements RecoveryTargetHandler {
|
|||
} else if (e instanceof RemoteTransportException) {
|
||||
final Throwable cause = ExceptionsHelper.unwrapCause(e);
|
||||
return cause instanceof CircuitBreakingException ||
|
||||
cause instanceof EsRejectedExecutionException;
|
||||
cause instanceof OpenSearchRejectedExecutionException;
|
||||
}
|
||||
return false;
|
||||
}
|
|
@ -17,16 +17,16 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
package org.opensearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.transport.TransportRequest;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.index.seqno.SequenceNumbers;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.store.Store;
|
||||
import org.opensearch.transport.TransportRequest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.store;
|
||||
package org.opensearch.indices.store;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -27,38 +27,38 @@ import org.opensearch.cluster.ClusterName;
|
|||
import org.opensearch.cluster.ClusterState;
|
||||
import org.opensearch.cluster.ClusterStateListener;
|
||||
import org.opensearch.cluster.ClusterStateObserver;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.routing.IndexRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.elasticsearch.cluster.routing.RoutingNode;
|
||||
import org.elasticsearch.cluster.routing.RoutingTable;
|
||||
import org.elasticsearch.cluster.routing.ShardRouting;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.collect.Tuple;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.settings.Setting;
|
||||
import org.elasticsearch.common.settings.Setting.Property;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.IndexSettings;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.IndexShardState;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.routing.IndexRoutingTable;
|
||||
import org.opensearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.opensearch.cluster.routing.RoutingNode;
|
||||
import org.opensearch.cluster.routing.RoutingTable;
|
||||
import org.opensearch.cluster.routing.ShardRouting;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.collect.Tuple;
|
||||
import org.opensearch.common.inject.Inject;
|
||||
import org.opensearch.common.io.stream.StreamInput;
|
||||
import org.opensearch.common.io.stream.StreamOutput;
|
||||
import org.opensearch.common.settings.Setting;
|
||||
import org.opensearch.common.settings.Setting.Property;
|
||||
import org.opensearch.common.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.common.util.concurrent.OpenSearchRejectedExecutionException;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.IndexSettings;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.IndexShardState;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.tasks.Task;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportChannel;
|
||||
import org.elasticsearch.transport.TransportException;
|
||||
import org.elasticsearch.transport.TransportRequest;
|
||||
import org.elasticsearch.transport.TransportRequestHandler;
|
||||
import org.elasticsearch.transport.TransportResponse;
|
||||
import org.elasticsearch.transport.TransportResponseHandler;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.transport.TransportChannel;
|
||||
import org.opensearch.transport.TransportException;
|
||||
import org.opensearch.transport.TransportRequest;
|
||||
import org.opensearch.transport.TransportRequestHandler;
|
||||
import org.opensearch.transport.TransportResponse;
|
||||
import org.opensearch.transport.TransportResponseHandler;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
|
@ -346,7 +346,7 @@ public class IndicesStore implements ClusterStateListener, Closeable {
|
|||
public void sendResult(boolean shardActive) {
|
||||
try {
|
||||
channel.sendResponse(new ShardActiveResponse(shardActive, clusterService.localNode()));
|
||||
} catch (IOException | EsRejectedExecutionException e) {
|
||||
} catch (IOException | OpenSearchRejectedExecutionException e) {
|
||||
logger.error(() -> new ParameterizedMessage("failed send response for shard active while trying to " +
|
||||
"delete shard {} - shard will probably not be removed", request.shardId), e);
|
||||
}
|
|
@ -17,45 +17,45 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.indices.store;
|
||||
package org.opensearch.indices.store;
|
||||
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.elasticsearch.OpenSearchException;
|
||||
import org.opensearch.OpenSearchException;
|
||||
import org.opensearch.action.ActionListener;
|
||||
import org.elasticsearch.Version;
|
||||
import org.opensearch.Version;
|
||||
import org.opensearch.action.ActionType;
|
||||
import org.opensearch.action.FailedNodeException;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.nodes.BaseNodeRequest;
|
||||
import org.elasticsearch.action.support.nodes.BaseNodeResponse;
|
||||
import org.elasticsearch.action.support.nodes.BaseNodesRequest;
|
||||
import org.elasticsearch.action.support.nodes.BaseNodesResponse;
|
||||
import org.elasticsearch.action.support.nodes.TransportNodesAction;
|
||||
import org.opensearch.action.support.ActionFilters;
|
||||
import org.opensearch.action.support.nodes.BaseNodeRequest;
|
||||
import org.opensearch.action.support.nodes.BaseNodeResponse;
|
||||
import org.opensearch.action.support.nodes.BaseNodesRequest;
|
||||
import org.opensearch.action.support.nodes.BaseNodesResponse;
|
||||
import org.opensearch.action.support.nodes.TransportNodesAction;
|
||||
import org.opensearch.cluster.ClusterName;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetadata;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
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.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.env.NodeEnvironment;
|
||||
import org.elasticsearch.gateway.AsyncShardFetch;
|
||||
import org.elasticsearch.index.IndexService;
|
||||
import org.elasticsearch.index.IndexSettings;
|
||||
import org.elasticsearch.index.seqno.ReplicationTracker;
|
||||
import org.elasticsearch.index.seqno.RetentionLease;
|
||||
import org.elasticsearch.index.shard.IndexShard;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.index.shard.ShardPath;
|
||||
import org.elasticsearch.index.store.Store;
|
||||
import org.elasticsearch.index.store.StoreFileMetadata;
|
||||
import org.elasticsearch.indices.IndicesService;
|
||||
import org.opensearch.cluster.metadata.IndexMetadata;
|
||||
import org.opensearch.cluster.node.DiscoveryNode;
|
||||
import org.opensearch.cluster.service.ClusterService;
|
||||
import org.opensearch.common.Nullable;
|
||||
import org.opensearch.common.inject.Inject;
|
||||
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.settings.Settings;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.env.NodeEnvironment;
|
||||
import org.opensearch.gateway.AsyncShardFetch;
|
||||
import org.opensearch.index.IndexService;
|
||||
import org.opensearch.index.IndexSettings;
|
||||
import org.opensearch.index.seqno.ReplicationTracker;
|
||||
import org.opensearch.index.seqno.RetentionLease;
|
||||
import org.opensearch.index.shard.IndexShard;
|
||||
import org.opensearch.index.shard.ShardId;
|
||||
import org.opensearch.index.shard.ShardPath;
|
||||
import org.opensearch.index.store.Store;
|
||||
import org.opensearch.index.store.StoreFileMetadata;
|
||||
import org.opensearch.indices.IndicesService;
|
||||
import org.opensearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
|
@ -40,7 +40,7 @@ import org.elasticsearch.cluster.service.ClusterService;
|
|||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.elasticsearch.common.util.concurrent.OpenSearchRejectedExecutionException;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
|
@ -172,7 +172,7 @@ public class TaskResultsService {
|
|||
|
||||
@Override
|
||||
public void onFailure(Exception e) {
|
||||
if (false == (e instanceof EsRejectedExecutionException)
|
||||
if (false == (e instanceof OpenSearchRejectedExecutionException)
|
||||
|| false == backoff.hasNext()) {
|
||||
listener.onFailure(e);
|
||||
} else {
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.elasticsearch.common.unit.TimeValue;
|
|||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.common.util.concurrent.EsAbortPolicy;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.elasticsearch.common.util.concurrent.OpenSearchRejectedExecutionException;
|
||||
|
||||
import java.util.concurrent.Delayed;
|
||||
import java.util.concurrent.Future;
|
||||
|
@ -94,7 +94,7 @@ public interface Scheduler {
|
|||
* @return a ScheduledFuture who's get will return when the task has been added to its target thread pool and throws an exception if
|
||||
* the task is canceled before it was added to its target thread pool. Once the task has been added to its target thread pool
|
||||
* the ScheduledFuture cannot interact with it.
|
||||
* @throws EsRejectedExecutionException if the task cannot be scheduled for execution
|
||||
* @throws OpenSearchRejectedExecutionException if the task cannot be scheduled for execution
|
||||
*/
|
||||
ScheduledCancellable schedule(Runnable command, TimeValue delay, String executor);
|
||||
|
||||
|
@ -231,7 +231,7 @@ public interface Scheduler {
|
|||
if (run) {
|
||||
try {
|
||||
scheduler.schedule(this, interval, executor);
|
||||
} catch (final EsRejectedExecutionException e) {
|
||||
} catch (final OpenSearchRejectedExecutionException e) {
|
||||
onRejection(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.elasticsearch.common.settings.Settings;
|
|||
import org.elasticsearch.common.unit.SizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||
import org.elasticsearch.common.util.concurrent.OpenSearchRejectedExecutionException;
|
||||
import org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor;
|
||||
import org.elasticsearch.common.util.concurrent.ThreadContext;
|
||||
import org.elasticsearch.common.util.concurrent.XRejectedExecutionHandler;
|
||||
|
@ -354,7 +354,7 @@ public class ThreadPool implements ReportingService<ThreadPoolInfo>, Scheduler {
|
|||
* @return a ScheduledFuture who's get will return when the task is has been added to its target thread pool and throw an exception if
|
||||
* the task is canceled before it was added to its target thread pool. Once the task has been added to its target thread pool
|
||||
* the ScheduledFuture will cannot interact with it.
|
||||
* @throws org.elasticsearch.common.util.concurrent.EsRejectedExecutionException if the task cannot be scheduled for execution
|
||||
* @throws org.elasticsearch.common.util.concurrent.OpenSearchRejectedExecutionException if the task cannot be scheduled for execution
|
||||
*/
|
||||
@Override
|
||||
public ScheduledCancellable schedule(Runnable command, TimeValue delay, String executor) {
|
||||
|
@ -368,7 +368,7 @@ public class ThreadPool implements ReportingService<ThreadPoolInfo>, Scheduler {
|
|||
public void scheduleUnlessShuttingDown(TimeValue delay, String executor, Runnable command) {
|
||||
try {
|
||||
schedule(command, delay, executor);
|
||||
} catch (EsRejectedExecutionException e) {
|
||||
} catch (OpenSearchRejectedExecutionException e) {
|
||||
if (e.isExecutorShutdown()) {
|
||||
logger.debug(new ParameterizedMessage("could not schedule execution of [{}] after [{}] on [{}] as executor is shut down",
|
||||
command, delay, executor), e);
|
||||
|
@ -510,7 +510,7 @@ public class ThreadPool implements ReportingService<ThreadPoolInfo>, Scheduler {
|
|||
public void run() {
|
||||
try {
|
||||
executor.execute(runnable);
|
||||
} catch (EsRejectedExecutionException e) {
|
||||
} catch (OpenSearchRejectedExecutionException e) {
|
||||
if (e.isExecutorShutdown()) {
|
||||
logger.debug(new ParameterizedMessage("could not schedule execution of [{}] on [{}] as executor is shut down",
|
||||
runnable, executor), e);
|
||||
|
|
Loading…
Reference in New Issue