diff --git a/.gitignore b/.gitignore index ff9e964289f37..cf0c61a6ac6fb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,8 @@ build-idea/ out/ # include shared intellij config -!.idea/scopes/x_pack.xml !.idea/inspectionProfiles/Project_Default.xml -!.idea/runConfigurations/Debug_Elasticsearch.xml +!.idea/runConfigurations/Debug_OpenSearch.xml # These files are generated in the main tree by IntelliJ benchmarks/src/main/generated/* diff --git a/.idea/scopes/x_pack.xml b/.idea/scopes/x_pack.xml deleted file mode 100644 index 1ccf16614d596..0000000000000 --- a/.idea/scopes/x_pack.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/build.gradle b/build.gradle index 1cbb1984fd4f5..451ae431864c4 100644 --- a/build.gradle +++ b/build.gradle @@ -146,6 +146,7 @@ tasks.register("verifyVersions") { // Read the list from maven central. // Fetch the metadata and parse the xml into Version instances because it's more straight forward here // rather than bwcVersion ( VersionCollection ). + //TODO OpenSearch - Update the maven repo URL for OpenSearch when available. new URL('https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/maven-metadata.xml').openStream().withStream { s -> BuildParams.bwcVersions.compareToAuthoritative( new XmlParser().parse(s) diff --git a/buildSrc/src/main/java/org/opensearch/gradle/internal/InternalDistributionDownloadPlugin.java b/buildSrc/src/main/java/org/opensearch/gradle/internal/InternalDistributionDownloadPlugin.java index 3970e24a7280e..62ef28a34f2dc 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/internal/InternalDistributionDownloadPlugin.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/internal/InternalDistributionDownloadPlugin.java @@ -66,7 +66,7 @@ public void apply(Project project) { /** * Registers internal distribution resolutions. *

- * Elasticsearch distributions are resolved as project dependencies either representing + * OpenSearch distributions are resolved as project dependencies either representing * the current version pointing to a project either under `:distribution:archives` or :distribution:packages`. *

* BWC versions are resolved as project to projects under `:distribution:bwc`. diff --git a/client/client-benchmark-noop-api-plugin/README.md b/client/client-benchmark-noop-api-plugin/README.md index b7066e20d5342..ef7b6303372fb 100644 --- a/client/client-benchmark-noop-api-plugin/README.md +++ b/client/client-benchmark-noop-api-plugin/README.md @@ -4,7 +4,7 @@ This plugin provides empty REST and transport endpoints for bulk indexing and se ### Build Instructions -Build the plugin with `gradle :client:client-benchmark-noop-api-plugin:assemble` from the Elasticsearch root project directory. +Build the plugin with `gradle :client:client-benchmark-noop-api-plugin:assemble` from the OpenSearch root project directory. ### Installation Instructions diff --git a/client/rest-high-level/src/test/java/org/opensearch/client/GetAliasesResponseTests.java b/client/rest-high-level/src/test/java/org/opensearch/client/GetAliasesResponseTests.java index 4ed015e15d95c..9023a77581039 100644 --- a/client/rest-high-level/src/test/java/org/opensearch/client/GetAliasesResponseTests.java +++ b/client/rest-high-level/src/test/java/org/opensearch/client/GetAliasesResponseTests.java @@ -102,7 +102,7 @@ protected void assertEqualInstances(GetAliasesResponse expectedInstance, GetAlia assertNull(newInstance.getException()); } - public void testFromXContentWithElasticsearchException() throws IOException { + public void testFromXContentWithOpenSearchException() throws IOException { String xContent = "{" + " \"error\": {" + diff --git a/client/rest-high-level/src/test/java/org/opensearch/client/documentation/SearchDocumentationIT.java b/client/rest-high-level/src/test/java/org/opensearch/client/documentation/SearchDocumentationIT.java index 2088ae32582cb..ae3e031040002 100644 --- a/client/rest-high-level/src/test/java/org/opensearch/client/documentation/SearchDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/opensearch/client/documentation/SearchDocumentationIT.java @@ -453,7 +453,7 @@ public void testSearchRequestHighlighting() throws IOException { searchSourceBuilder.highlighter(highlightBuilder); // end::search-request-highlighting searchSourceBuilder.query(QueryBuilders.boolQuery() - .should(matchQuery("title", "Elasticsearch")) + .should(matchQuery("title", "OpenSearch")) .should(matchQuery("user", "kimchy"))); searchRequest.source(searchSourceBuilder); SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT); @@ -473,7 +473,7 @@ public void testSearchRequestHighlighting() throws IOException { HighlightField highlight = highlightFields.get("title"); Text[] fragments = highlight.fragments(); assertEquals(1, fragments.length); - assertThat(fragments[0].string(), containsString("Elasticsearch")); + assertThat(fragments[0].string(), containsString("OpenSearch")); highlight = highlightFields.get("user"); fragments = highlight.fragments(); assertEquals(1, fragments.length); diff --git a/client/rest-high-level/src/test/resources/org/opensearch/client/security/delegate_pki/README.asciidoc b/client/rest-high-level/src/test/resources/org/opensearch/client/security/delegate_pki/README.asciidoc index 3230bdde7e2ce..147949bf6d812 100644 --- a/client/rest-high-level/src/test/resources/org/opensearch/client/security/delegate_pki/README.asciidoc +++ b/client/rest-high-level/src/test/resources/org/opensearch/client/security/delegate_pki/README.asciidoc @@ -11,7 +11,7 @@ have been generated using the following openssl commands. [source,shell] ----------------------------------------------------------------------------------------------------------- openssl genrsa -out testRootCA.key 2048 -openssl req -x509 -new -key testRootCA.key -days 1460 -subj "/CN=Elasticsearch Test Root CA/OU=elasticsearch/O=org" -out testRootCA.crt -config ./openssl_config.cnf +openssl req -x509 -new -key testRootCA.key -days 1460 -subj "/CN=OpenSearch Test Root CA/OU=opensearch/O=org" -out testRootCA.crt -config ./openssl_config.cnf ----------------------------------------------------------------------------------------------------------- == Instructions on generating the Intermediate CA @@ -20,7 +20,7 @@ The `testIntermediateCA.crt` CA certificate is "issued" by the `testRootCA.crt`. [source,shell] ----------------------------------------------------------------------------------------------------------- openssl genrsa -out testIntermediateCA.key 2048 -openssl req -new -key testIntermediateCA.key -subj "/CN=Elasticsearch Test Intermediate CA/OU=Elasticsearch/O=org" -out testIntermediateCA.csr -config ./openssl_config.cnf +openssl req -new -key testIntermediateCA.key -subj "/CN=OpenSearch Test Intermediate CA/OU=OpenSearch/O=org" -out testIntermediateCA.csr -config ./openssl_config.cnf openssl x509 -req -in testIntermediateCA.csr -CA testRootCA.crt -CAkey testRootCA.key -CAcreateserial -out testIntermediateCA.crt -days 1460 -sha256 -extensions v3_ca -extfile ./openssl_config.cnf ----------------------------------------------------------------------------------------------------------- @@ -30,6 +30,6 @@ The `testClient.crt` end entity certificate is "issued" by the `testIntermediate [source,shell] ----------------------------------------------------------------------------------------------------------- openssl genrsa -out testClient.key 2048 -openssl req -new -key testClient.key -subj "/CN=Elasticsearch Test Client/OU=Elasticsearch/O=org" -out testClient.csr -config ./openssl_config.cnf +openssl req -new -key testClient.key -subj "/CN=OpenSearch Test Client/OU=OpenSearch/O=org" -out testClient.csr -config ./openssl_config.cnf openssl x509 -req -in testClient.csr -CA testIntermediateCA.crt -CAkey testIntermediateCA.key -CAcreateserial -out testClient.crt -days 1460 -sha256 -extensions usr_cert -extfile ./openssl_config.cnf ----------------------------------------------------------------------------------------------------------- diff --git a/client/rest-high-level/src/test/resources/org/opensearch/client/security/delegate_pki/openssl_config.cnf b/client/rest-high-level/src/test/resources/org/opensearch/client/security/delegate_pki/openssl_config.cnf index 64ff556f35219..c9b28230c7c5b 100644 --- a/client/rest-high-level/src/test/resources/org/opensearch/client/security/delegate_pki/openssl_config.cnf +++ b/client/rest-high-level/src/test/resources/org/opensearch/client/security/delegate_pki/openssl_config.cnf @@ -85,10 +85,10 @@ string_mask = nombstr 0.organizationName_default = org organizationalUnitName = Organizational Unit Name (eg, section) -organizationalUnitName_default = elasticsearch +organizationalUnitName_default = opensearch commonName = Common Name (hostname, IP, or your name) -commonName_default = Elasticsearch Test Certificate +commonName_default = OpenSearch Test Certificate commonName_max = 64 #################################################################### diff --git a/client/rest/src/main/java/org/opensearch/client/Node.java b/client/rest/src/main/java/org/opensearch/client/Node.java index e71b23c362b90..4a6770a1968d7 100644 --- a/client/rest/src/main/java/org/opensearch/client/Node.java +++ b/client/rest/src/main/java/org/opensearch/client/Node.java @@ -28,7 +28,7 @@ import java.util.TreeSet; /** - * Metadata about an {@link HttpHost} running Elasticsearch. + * Metadata about an {@link HttpHost} running OpenSearch. */ public class Node { /** @@ -46,12 +46,12 @@ public class Node { */ private final String name; /** - * Version of Elasticsearch that the node is running or {@code null} + * Version of OpenSearch that the node is running or {@code null} * if we don't know the version. */ private final String version; /** - * Roles that the Elasticsearch process on the host has or {@code null} + * Roles that the OpenSearch process on the host has or {@code null} * if we don't know what roles the node has. */ private final Roles roles; @@ -109,7 +109,7 @@ public String getName() { } /** - * Version of Elasticsearch that the node is running or {@code null} + * Version of OpenSearch that the node is running or {@code null} * if we don't know the version. */ public String getVersion() { @@ -117,7 +117,7 @@ public String getVersion() { } /** - * Roles that the Elasticsearch process on the host has or {@code null} + * Roles that the OpenSearch process on the host has or {@code null} * if we don't know what roles the node has. */ public Roles getRoles() { @@ -173,7 +173,7 @@ public int hashCode() { } /** - * Role information about an Elasticsearch process. + * Role information about an OpenSearch process. */ public static final class Roles { diff --git a/client/rest/src/main/java/org/opensearch/client/PersistentCredentialsAuthenticationStrategy.java b/client/rest/src/main/java/org/opensearch/client/PersistentCredentialsAuthenticationStrategy.java index 5dde5a20accee..48d77b4dd9333 100644 --- a/client/rest/src/main/java/org/opensearch/client/PersistentCredentialsAuthenticationStrategy.java +++ b/client/rest/src/main/java/org/opensearch/client/PersistentCredentialsAuthenticationStrategy.java @@ -33,10 +33,10 @@ * any special handling if authentication fails. * The default handler in Apache HTTP client mimics standard browser behaviour of clearing authentication * credentials if it receives a 401 response from the server. While this can be useful for browser, it is - * rarely the desired behaviour with the Elasticsearch REST API. + * rarely the desired behaviour with the OpenSearch REST API. * If the code using the REST client has configured credentials for the REST API, then we can and should * assume that this is intentional, and those credentials represent the best possible authentication - * mechanism to the Elasticsearch node. + * mechanism to the OpenSearch node. * If we receive a 401 status, a probably cause is that the authentication mechanism in place was unable * to perform the requisite password checks (the node has not yet recovered its state, or an external * authentication provider was unavailable). diff --git a/client/rest/src/main/java/org/opensearch/client/Request.java b/client/rest/src/main/java/org/opensearch/client/Request.java index c5b0a53bd8b2e..a5f1a05ad74d5 100644 --- a/client/rest/src/main/java/org/opensearch/client/Request.java +++ b/client/rest/src/main/java/org/opensearch/client/Request.java @@ -30,7 +30,7 @@ import static java.util.Collections.unmodifiableMap; /** - * HTTP Request to Elasticsearch. + * HTTP Request to OpenSearch. */ public final class Request { private final String method; @@ -122,8 +122,8 @@ public HttpEntity getEntity() { } /** - * Set the portion of an HTTP request to Elasticsearch that can be - * manipulated without changing Elasticsearch's behavior. + * Set the portion of an HTTP request to OpenSearch that can be + * manipulated without changing OpenSearch's behavior. */ public void setOptions(RequestOptions options) { Objects.requireNonNull(options, "options cannot be null"); @@ -131,8 +131,8 @@ public void setOptions(RequestOptions options) { } /** - * Set the portion of an HTTP request to Elasticsearch that can be - * manipulated without changing Elasticsearch's behavior. + * Set the portion of an HTTP request to OpenSearch that can be + * manipulated without changing OpenSearch's behavior. */ public void setOptions(RequestOptions.Builder options) { Objects.requireNonNull(options, "options cannot be null"); @@ -140,8 +140,8 @@ public void setOptions(RequestOptions.Builder options) { } /** - * Get the portion of an HTTP request to Elasticsearch that can be - * manipulated without changing Elasticsearch's behavior. + * Get the portion of an HTTP request to OpenSearch that can be + * manipulated without changing OpenSearch's behavior. */ public RequestOptions getOptions() { return options; diff --git a/client/rest/src/main/java/org/opensearch/client/RequestOptions.java b/client/rest/src/main/java/org/opensearch/client/RequestOptions.java index f1fb0d2c6997e..1c301d18803f1 100644 --- a/client/rest/src/main/java/org/opensearch/client/RequestOptions.java +++ b/client/rest/src/main/java/org/opensearch/client/RequestOptions.java @@ -31,8 +31,8 @@ import java.util.Objects; /** - * The portion of an HTTP request to Elasticsearch that can be - * manipulated without changing Elasticsearch's behavior. + * The portion of an HTTP request to OpenSearch that can be + * manipulated without changing OpenSearch's behavior. */ public final class RequestOptions { /** diff --git a/client/rest/src/main/java/org/opensearch/client/Response.java b/client/rest/src/main/java/org/opensearch/client/Response.java index 149e1fdf92731..d746c7985e648 100644 --- a/client/rest/src/main/java/org/opensearch/client/Response.java +++ b/client/rest/src/main/java/org/opensearch/client/Response.java @@ -135,13 +135,13 @@ public HttpEntity getEntity() { /** * Tests if a string matches the RFC 7234 specification for warning headers. * This assumes that the warn code is always 299 and the warn agent is always - * Elasticsearch. + * OpenSearch. * * @param s the value of a warning header formatted according to RFC 7234 * @return {@code true} if the input string matches the specification */ private static boolean matchWarningHeaderPatternByPrefix(final String s) { - return s.startsWith("299 Elasticsearch-"); + return s.startsWith("299 OpenSearch-"); } /** diff --git a/client/rest/src/main/java/org/opensearch/client/RestClient.java b/client/rest/src/main/java/org/opensearch/client/RestClient.java index 49e7ce2d52cd0..52717ae84f023 100644 --- a/client/rest/src/main/java/org/opensearch/client/RestClient.java +++ b/client/rest/src/main/java/org/opensearch/client/RestClient.java @@ -86,7 +86,7 @@ import static java.util.Collections.singletonList; /** - * Client that connects to an Elasticsearch cluster through HTTP. + * Client that connects to an OpenSearch cluster through HTTP. *

* Must be created using {@link RestClientBuilder}, which allows to set all the different options or just rely on defaults. * The hosts that are part of the cluster need to be provided at creation time, but can also be replaced later @@ -241,7 +241,7 @@ public boolean isRunning() { } /** - * Sends a request to the Elasticsearch cluster that the client points to. + * Sends a request to the OpenSearch cluster that the client points to. * Blocks until the request is completed and returns its response or fails * by throwing an exception. Selects a host out of the provided ones in a * round-robin fashion. Failing hosts are marked dead and retried after a @@ -260,10 +260,10 @@ public boolean isRunning() { * {@link Exception#getCause()}. * * @param request the request to perform - * @return the response returned by Elasticsearch + * @return the response returned by OpenSearch * @throws IOException in case of a problem or the connection was aborted * @throws ClientProtocolException in case of an http protocol error - * @throws ResponseException in case Elasticsearch responded with a status code that indicated an error + * @throws ResponseException in case OpenSearch responded with a status code that indicated an error */ public Response performRequest(Request request) throws IOException { InternalRequest internalRequest = new InternalRequest(request); @@ -335,7 +335,7 @@ private ResponseOrResponseException convertResponse(InternalRequest request, Nod } /** - * Sends a request to the Elasticsearch cluster that the client points to. + * Sends a request to the OpenSearch cluster that the client points to. * The request is executed asynchronously and the provided * {@link ResponseListener} gets notified upon request completion or * failure. Selects a host out of the provided ones in a round-robin diff --git a/client/rest/src/main/java/org/opensearch/client/RestClientBuilder.java b/client/rest/src/main/java/org/opensearch/client/RestClientBuilder.java index c9c789fe969a2..80daa7314af72 100644 --- a/client/rest/src/main/java/org/opensearch/client/RestClientBuilder.java +++ b/client/rest/src/main/java/org/opensearch/client/RestClientBuilder.java @@ -129,7 +129,7 @@ public RestClientBuilder setRequestConfigCallback(RequestConfigCallback requestC * For example, if this is set to "/my/path", then any client request will become "/my/path/" + endpoint. *

* In essence, every request's {@code endpoint} is prefixed by this {@code pathPrefix}. The path prefix is useful for when - * Elasticsearch is behind a proxy that provides a base path or a proxy that requires all paths to start with '/'; + * OpenSearch is behind a proxy that provides a base path or a proxy that requires all paths to start with '/'; * it is not intended for other purposes and it should not be supplied in other scenarios. * * @throws NullPointerException if {@code pathPrefix} is {@code null}. diff --git a/client/rest/src/test/java/org/opensearch/client/RestClientSingleHostTests.java b/client/rest/src/test/java/org/opensearch/client/RestClientSingleHostTests.java index d1b1952ca7c85..fc5aa9981b55b 100644 --- a/client/rest/src/test/java/org/opensearch/client/RestClientSingleHostTests.java +++ b/client/rest/src/test/java/org/opensearch/client/RestClientSingleHostTests.java @@ -524,7 +524,7 @@ private void assertDeprecationWarnings(List warningHeaderTexts, List sourceOpenSearch = """ RUN curl --retry 8 -S -L \\ --output /opt/opensearch.tar.gz \\ - https://artifacts-no-kpi.elastic.co/downloads/elasticsearch/$elasticsearch + """ } diff --git a/distribution/docker/src/docker/Dockerfile b/distribution/docker/src/docker/Dockerfile index f5b9df20b3110..971716e942d95 100644 --- a/distribution/docker/src/docker/Dockerfile +++ b/distribution/docker/src/docker/Dockerfile @@ -43,7 +43,7 @@ RUN set -eux ; \\ RUN mkdir /usr/share/opensearch WORKDIR /usr/share/opensearch -${source_elasticsearch} +${source_opensearch} RUN tar zxf /opt/opensearch.tar.gz --strip-components=1 RUN sed -i -e 's/OPENSEARCH_DISTRIBUTION_TYPE=tar/OPENSEARCH_DISTRIBUTION_TYPE=docker/' /usr/share/opensearch/bin/opensearch-env diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index 1fbd5d61feaa5..374b38700f50a 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -278,15 +278,13 @@ apply plugin: 'nebula.ospackage-base' // this is package indepdendent configuration ospackage { - maintainer 'Elasticsearch Team ' + maintainer 'OpenSearch Team' summary 'Distributed RESTful search engine built for the cloud' packageDescription ''' Reference documentation can be found at - https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html - and the 'Elasticsearch: The Definitive Guide' book can be found at - https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html + https://github.com/opensearch-project/OpenSearch '''.stripIndent().trim() - url 'https://www.elastic.co/' + url 'https://github.com/opensearch-project/OpenSearch' // signing setup if (project.hasProperty('signing.password') && BuildParams.isSnapshotBuild() == false) { diff --git a/distribution/packages/src/deb/init.d/opensearch b/distribution/packages/src/deb/init.d/opensearch index bc56018ae806f..606021bf19fbc 100755 --- a/distribution/packages/src/deb/init.d/opensearch +++ b/distribution/packages/src/deb/init.d/opensearch @@ -60,12 +60,6 @@ if [ -f "$DEFAULT" ]; then . "$DEFAULT" fi -# ES_USER and ES_GROUP settings were removed -if [ ! -z "$ES_USER" ] || [ ! -z "$ES_GROUP" ]; then - echo "ES_USER and ES_GROUP settings are no longer supported. To run as a custom user/group use the archive distribution of Elasticsearch." - exit 1 -fi - # Define other required variables PID_FILE="$PID_DIR/$NAME.pid" DAEMON=$OPENSEARCH_HOME/bin/opensearch diff --git a/distribution/packages/src/rpm/init.d/opensearch b/distribution/packages/src/rpm/init.d/opensearch index 6ce54f1a3f109..78db51795340e 100644 --- a/distribution/packages/src/rpm/init.d/opensearch +++ b/distribution/packages/src/rpm/init.d/opensearch @@ -45,12 +45,6 @@ if [ -f "$OPENSEARCH_ENV_FILE" ]; then . "$OPENSEARCH_ENV_FILE" fi -# ES_USER and ES_GROUP settings were removed -if [ ! -z "$ES_USER" ] || [ ! -z "$ES_GROUP" ]; then - echo "ES_USER and ES_GROUP settings are no longer supported. To run as a custom user/group use the archive distribution of Elasticsearch." - exit 1 -fi - exec="$OPENSEARCH_HOME/bin/opensearch" prog="opensearch" pidfile="$PID_DIR/${prog}.pid" diff --git a/distribution/tools/java-version-checker/src/main/java/org/opensearch/tools/java_version_checker/JavaVersionChecker.java b/distribution/tools/java-version-checker/src/main/java/org/opensearch/tools/java_version_checker/JavaVersionChecker.java index 143faf1fbae55..0596664cfe259 100644 --- a/distribution/tools/java-version-checker/src/main/java/org/opensearch/tools/java_version_checker/JavaVersionChecker.java +++ b/distribution/tools/java-version-checker/src/main/java/org/opensearch/tools/java_version_checker/JavaVersionChecker.java @@ -51,7 +51,7 @@ public static void main(final String[] args) { if (JavaVersion.compare(JavaVersion.CURRENT, JavaVersion.JAVA_11) < 0) { final String message = String.format( Locale.ROOT, - "future versions of Elasticsearch will require Java 11; your Java version from [%s] does not meet this requirement", + "future versions of OpenSearch will require Java 11; your Java version from [%s] does not meet this requirement", System.getProperty("java.home") ); errPrintln(message); diff --git a/distribution/tools/launchers/src/main/java/org/opensearch/tools/launchers/JvmErgonomics.java b/distribution/tools/launchers/src/main/java/org/opensearch/tools/launchers/JvmErgonomics.java index d98d348e6c6cd..07147a91c18ad 100644 --- a/distribution/tools/launchers/src/main/java/org/opensearch/tools/launchers/JvmErgonomics.java +++ b/distribution/tools/launchers/src/main/java/org/opensearch/tools/launchers/JvmErgonomics.java @@ -40,7 +40,7 @@ import java.util.stream.Stream; /** - * Tunes Elasticsearch JVM settings based on inspection of provided JVM options. + * Tunes OpenSearch JVM settings based on inspection of provided JVM options. */ final class JvmErgonomics { @@ -49,7 +49,7 @@ private JvmErgonomics() { } /** - * Chooses additional JVM options for Elasticsearch. + * Chooses additional JVM options for OpenSearch. * * @param userDefinedJvmOptions A list of JVM options that have been defined by the user. * @return A list of additional JVM options to set. @@ -61,7 +61,7 @@ static List choose(final List userDefinedJvmOptions) throws Inte final long maxDirectMemorySize = extractMaxDirectMemorySize(finalJvmOptions); if (System.getProperty("os.name").startsWith("Windows") && JavaVersion.majorVersion(JavaVersion.CURRENT) == 8) { - Launchers.errPrintln("Warning: with JDK 8 on Windows, Elasticsearch may be unable to derive correct"); + Launchers.errPrintln("Warning: with JDK 8 on Windows, OpenSearch may be unable to derive correct"); Launchers.errPrintln(" ergonomic settings due to a JDK issue (JDK-8074459). Please use a newer"); Launchers.errPrintln(" version of Java."); } diff --git a/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/ListPluginsCommand.java b/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/ListPluginsCommand.java index 949e91375717b..0005f779f7027 100644 --- a/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/ListPluginsCommand.java +++ b/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/ListPluginsCommand.java @@ -69,7 +69,7 @@ private void printPlugin(Environment env, Terminal terminal, Path plugin, String terminal.errorPrintln( "WARNING: plugin [" + info.getName() - + "] was built for Elasticsearch version " + + "] was built for OpenSearch version " + info.getVersion() + " but version " + Version.CURRENT diff --git a/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/RemovePluginCommand.java b/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/RemovePluginCommand.java index 43863f837fdc2..1002298e29c5a 100644 --- a/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/RemovePluginCommand.java +++ b/distribution/tools/plugin-cli/src/main/java/org/opensearch/plugins/RemovePluginCommand.java @@ -43,7 +43,7 @@ import static org.opensearch.cli.Terminal.Verbosity.VERBOSE; /** - * A command for the plugin CLI to remove a plugin from Elasticsearch. + * A command for the plugin CLI to remove a plugin from OpenSearch. */ class RemovePluginCommand extends EnvironmentAwareCommand { @@ -55,7 +55,7 @@ class RemovePluginCommand extends EnvironmentAwareCommand { private final OptionSpec arguments; RemovePluginCommand() { - super("removes a plugin from Elasticsearch"); + super("removes a plugin from OpenSearch"); this.purgeOption = parser.acceptsAll(Arrays.asList("p", "purge"), "Purge plugin configuration files"); this.arguments = parser.nonOptions("plugin name"); } diff --git a/libs/core/src/main/java/org/opensearch/bootstrap/JarHell.java b/libs/core/src/main/java/org/opensearch/bootstrap/JarHell.java index ac3b0f111995a..386e88fb94588 100644 --- a/libs/core/src/main/java/org/opensearch/bootstrap/JarHell.java +++ b/libs/core/src/main/java/org/opensearch/bootstrap/JarHell.java @@ -54,7 +54,7 @@ *

  • Checks that class files are not duplicated across jars.
  • *
  • Checks any {@code X-Compile-Target-JDK} value in the jar * manifest is compatible with current JRE
  • - *
  • Checks any {@code X-Compile-Elasticsearch-Version} value in + *
  • Checks any {@code X-Compile-OpenSearch-Version} value in * the jar manifest is compatible with the current ES
  • * */ diff --git a/libs/x-content/src/main/java/org/opensearch/common/xcontent/AbstractObjectParser.java b/libs/x-content/src/main/java/org/opensearch/common/xcontent/AbstractObjectParser.java index cab4309d468a9..afc1785529a66 100644 --- a/libs/x-content/src/main/java/org/opensearch/common/xcontent/AbstractObjectParser.java +++ b/libs/x-content/src/main/java/org/opensearch/common/xcontent/AbstractObjectParser.java @@ -135,7 +135,7 @@ public abstract void declareNamedObjects(BiConsumer> consumer * * * - * This is because json doesn't enforce ordering. Elasticsearch reads it in + * This is because json doesn't enforce ordering. OpenSearch reads it in * the order sent but tools that generate json are free to put object * members in an unordered Map, jumbling them. Thus, if you care about order * you can send the object in the second way. diff --git a/libs/x-content/src/main/java/org/opensearch/common/xcontent/ErrorOnUnknown.java b/libs/x-content/src/main/java/org/opensearch/common/xcontent/ErrorOnUnknown.java index ffa7606e9def4..92ec4f7e9324e 100644 --- a/libs/x-content/src/main/java/org/opensearch/common/xcontent/ErrorOnUnknown.java +++ b/libs/x-content/src/main/java/org/opensearch/common/xcontent/ErrorOnUnknown.java @@ -23,7 +23,7 @@ /** * Extension point to customize the error message for unknown fields. We expect - * Elasticsearch to plug a fancy implementation that uses Lucene's spelling + * OpenSearch to plug a fancy implementation that uses Lucene's spelling * correction infrastructure to suggest corrections. */ public interface ErrorOnUnknown { diff --git a/libs/x-content/src/main/java/org/opensearch/common/xcontent/XContentType.java b/libs/x-content/src/main/java/org/opensearch/common/xcontent/XContentType.java index 20d1001dbf556..8031c337946f7 100644 --- a/libs/x-content/src/main/java/org/opensearch/common/xcontent/XContentType.java +++ b/libs/x-content/src/main/java/org/opensearch/common/xcontent/XContentType.java @@ -141,7 +141,7 @@ public static XContentType fromMediaTypeOrFormat(String mediaType) { /** * Clients compatible with ES 7.x might start sending media types with versioned media type - * in a form of application/vnd.elasticsearch+json;compatible-with=7. + * in a form of application/vnd.opensearch+json;compatible-with=7. * This has to be removed in order to be used in 7.x server. * The same client connecting using that media type will be able to communicate with ES 8 thanks to compatible API. * @param mediaType - a media type used on Content-Type header, might contain versioned media type. diff --git a/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java b/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java index 49b9020120ed8..928a02e0be825 100644 --- a/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java +++ b/modules/lang-painless/src/test/java/org/opensearch/painless/ContextExampleTests.java @@ -29,7 +29,7 @@ /** * These tests run the Painless scripts used in the context docs against * slightly modified data designed around unit tests rather than a fully- - * running Elasticsearch server. + * running OpenSearch server. */ public class ContextExampleTests extends ScriptTestCase { diff --git a/plugins/discovery-ec2/src/test/java/org/opensearch/discovery/ec2/AwsEc2ServiceImplTests.java b/plugins/discovery-ec2/src/test/java/org/opensearch/discovery/ec2/AwsEc2ServiceImplTests.java index 5dcd3ba4ca789..e87649cdc76d3 100644 --- a/plugins/discovery-ec2/src/test/java/org/opensearch/discovery/ec2/AwsEc2ServiceImplTests.java +++ b/plugins/discovery-ec2/src/test/java/org/opensearch/discovery/ec2/AwsEc2ServiceImplTests.java @@ -41,7 +41,7 @@ public void testAWSCredentialsWithSystemProviders() { assertThat(credentialsProvider, instanceOf(DefaultAWSCredentialsProviderChain.class)); } - public void testAWSCredentialsWithElasticsearchAwsSettings() { + public void testAWSCredentialsWithOpenSearchAwsSettings() { final MockSecureSettings secureSettings = new MockSecureSettings(); secureSettings.setString("discovery.ec2.access_key", "aws_key"); secureSettings.setString("discovery.ec2.secret_key", "aws_secret"); @@ -51,7 +51,7 @@ public void testAWSCredentialsWithElasticsearchAwsSettings() { assertThat(credentials.getAWSSecretKey(), is("aws_secret")); } - public void testAWSSessionCredentialsWithElasticsearchAwsSettings() { + public void testAWSSessionCredentialsWithOpenSearchAwsSettings() { final MockSecureSettings secureSettings = new MockSecureSettings(); secureSettings.setString("discovery.ec2.access_key", "aws_key"); secureSettings.setString("discovery.ec2.secret_key", "aws_secret"); diff --git a/plugins/discovery-gce/src/test/java/org/opensearch/discovery/gce/RetryHttpInitializerWrapperTests.java b/plugins/discovery-gce/src/test/java/org/opensearch/discovery/gce/RetryHttpInitializerWrapperTests.java index fd17d3127433b..5a30c4c010f84 100644 --- a/plugins/discovery-gce/src/test/java/org/opensearch/discovery/gce/RetryHttpInitializerWrapperTests.java +++ b/plugins/discovery-gce/src/test/java/org/opensearch/discovery/gce/RetryHttpInitializerWrapperTests.java @@ -110,7 +110,7 @@ public void testSimpleRetry() throws Exception { .build(); // TODO (URL) replace w/ opensearch url - HttpRequest request = client.getRequestFactory().buildRequest("Get", new GenericUrl("http://elasticsearch.com"), null); + HttpRequest request = client.getRequestFactory().buildRequest("Get", new GenericUrl("https://github.com/opensearch-project/OpenSearch"), null); HttpResponse response = request.execute(); assertThat(mockSleeper.getCount(), equalTo(3)); @@ -143,7 +143,7 @@ public void sleep(long millis) throws InterruptedException { .build(); // TODO (URL) replace w/ opensearch URL - HttpRequest request1 = client.getRequestFactory().buildRequest("Get", new GenericUrl("http://elasticsearch.com"), null); + HttpRequest request1 = client.getRequestFactory().buildRequest("Get", new GenericUrl("https://github.com/opensearch-project/OpenSearch"), null); try { request1.execute(); fail("Request should fail if wait too long"); @@ -170,7 +170,7 @@ public void testIOExceptionRetry() throws Exception { .build(); // TODO (URL) replace w/ opensearch URL - HttpRequest request = client.getRequestFactory().buildRequest("Get", new GenericUrl("http://elasticsearch.com"), null); + HttpRequest request = client.getRequestFactory().buildRequest("Get", new GenericUrl("https://github.com/opensearch-project/OpenSearch"), null); HttpResponse response = request.execute(); assertThat(mockSleeper.getCount(), equalTo(1)); diff --git a/plugins/discovery-gce/src/test/resources/org/opensearch/discovery/gce/compute/v1/projects/metadataserver/zones/europe-west1-b/instances b/plugins/discovery-gce/src/test/resources/org/opensearch/discovery/gce/compute/v1/projects/metadataserver/zones/europe-west1-b/instances index 049e0e1e1b181..09fce3fb538d1 100644 --- a/plugins/discovery-gce/src/test/resources/org/opensearch/discovery/gce/compute/v1/projects/metadataserver/zones/europe-west1-b/instances +++ b/plugins/discovery-gce/src/test/resources/org/opensearch/discovery/gce/compute/v1/projects/metadataserver/zones/europe-west1-b/instances @@ -26,7 +26,7 @@ "tags": { "fingerprint": "xA6QJb-rGtg=", "items": [ - "elasticsearch", + "opensearch", "dev" ] }, diff --git a/plugins/discovery-gce/src/test/resources/org/opensearch/discovery/gce/compute/v1/projects/metadataserver/zones/us-central1-a/instances b/plugins/discovery-gce/src/test/resources/org/opensearch/discovery/gce/compute/v1/projects/metadataserver/zones/us-central1-a/instances index 7e1e5d5d93a34..a0e53c0707abe 100644 --- a/plugins/discovery-gce/src/test/resources/org/opensearch/discovery/gce/compute/v1/projects/metadataserver/zones/us-central1-a/instances +++ b/plugins/discovery-gce/src/test/resources/org/opensearch/discovery/gce/compute/v1/projects/metadataserver/zones/us-central1-a/instances @@ -26,7 +26,7 @@ "tags": { "fingerprint": "xA6QJb-rGtg=", "items": [ - "elasticsearch", + "opensearch", "dev" ] }, diff --git a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureRepository.java b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureRepository.java index 1e0f2e7f7a5fe..03b80d4a5b8d4 100644 --- a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureRepository.java +++ b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureRepository.java @@ -47,7 +47,7 @@ *

    * Azure file system repository supports the following settings: *

    - *
    {@code container}
    Azure container name. Defaults to elasticsearch-snapshots
    + *
    {@code container}
    Azure container name. Defaults to opensearch-snapshots
    *
    {@code base_path}
    Specifies the path within bucket to repository data. Defaults to root directory.
    *
    {@code chunk_size}
    Large file can be divided into chunks. This parameter specifies the chunk size. Defaults to 64mb.
    *
    {@code compress}
    If set to true metadata files will be stored compressed. Defaults to false.
    diff --git a/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java b/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java index 76837d2e5faf6..7ea7769ffb129 100644 --- a/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java +++ b/qa/full-cluster-restart/src/test/java/org/opensearch/upgrades/FullClusterRestartIT.java @@ -1121,7 +1121,7 @@ private void checkSnapshot(final String snapshotName, final int count, final Ver && getOldClusterVersion().onOrAfter(Version.V_6_1_0) && getOldClusterVersion().before(Version.V_6_5_0)) { for (String warning : e.getResponse().getWarnings()) { assertThat(warning, containsString( - "setting was deprecated in Elasticsearch and will be removed in a future release! " + "setting was deprecated and will be removed in a future release! " + "See the breaking changes documentation for the next major version.")); assertThat(warning, startsWith("[search.remote.")); } diff --git a/qa/os/README.md b/qa/os/README.md index 2a65a376f5133..85e55fedeac0d 100644 --- a/qa/os/README.md +++ b/qa/os/README.md @@ -2,9 +2,9 @@ This project contains tests that verify the distributions we build work correctly on the operating systems we support. They're intended to cover the -steps a user would take when installing and configuring an Elasticsearch +steps a user would take when installing and configuring an OpenSearch distribution. They're not intended to have significant coverage of the behavior -of Elasticsearch's features. +of OpenSearch's features. There are two types of tests in this project. The old tests live in `src/test/` and are written in [Bats](https://github.com/sstephenson/bats), diff --git a/qa/os/src/test/java/org/opensearch/packaging/test/KeystoreManagementTests.java b/qa/os/src/test/java/org/opensearch/packaging/test/KeystoreManagementTests.java index a23c159da3c22..58697a42aa453 100644 --- a/qa/os/src/test/java/org/opensearch/packaging/test/KeystoreManagementTests.java +++ b/qa/os/src/test/java/org/opensearch/packaging/test/KeystoreManagementTests.java @@ -71,7 +71,7 @@ public class KeystoreManagementTests extends PackagingTestCase { public static final String ERROR_INCORRECT_PASSWORD = "Provided keystore password was incorrect"; public static final String ERROR_CORRUPTED_KEYSTORE = "Keystore has been corrupted or tampered with"; public static final String ERROR_KEYSTORE_NOT_PASSWORD_PROTECTED = "ERROR: Keystore is not password-protected"; - public static final String ERROR_KEYSTORE_NOT_FOUND = "ERROR: Elasticsearch keystore not found"; + public static final String ERROR_KEYSTORE_NOT_FOUND = "ERROR: OpenSearch keystore not found"; /** Test initial archive state */ public void test10InstallArchiveDistribution() throws Exception { @@ -177,7 +177,7 @@ public void test41WrongKeystorePasswordOnStandardInput() throws Exception { } /** - * This test simulates a user starting Elasticsearch on the command line without daemonizing + * This test simulates a user starting OpenSearch on the command line without daemonizing */ public void test42KeystorePasswordOnTtyRunningInForeground() throws Exception { /* Windows issue awaits fix: https://github.com/elastic/elasticsearch/issues/49340 */ @@ -358,7 +358,7 @@ public void test61DockerEnvironmentVariablePasswordFromFile() throws Exception { /** * Check that if we provide the wrong password for a mounted and password-protected - * keystore, Elasticsearch doesn't start. + * keystore, OpenSearch doesn't start. */ public void test62DockerEnvironmentVariableBadPassword() throws Exception { assumeTrue(distribution().isDocker()); @@ -494,7 +494,7 @@ private void verifyKeystorePermissions() { assertPermissionsAndOwnership(keystore, p660); break; default: - throw new IllegalStateException("Unknown Elasticsearch packaging type."); + throw new IllegalStateException("Unknown OpenSearch packaging type."); } } } diff --git a/qa/os/src/test/java/org/opensearch/packaging/test/PackageTests.java b/qa/os/src/test/java/org/opensearch/packaging/test/PackageTests.java index 628703298acf1..03e39f4661d77 100644 --- a/qa/os/src/test/java/org/opensearch/packaging/test/PackageTests.java +++ b/qa/os/src/test/java/org/opensearch/packaging/test/PackageTests.java @@ -168,12 +168,12 @@ public void test40StartServer() throws Exception { "journalctl _SYSTEMD_UNIT=opensearch.service " + "--since \"" + start - + "\" --output cat | grep -v \"future versions of Elasticsearch will require Java 11\" | wc -l" + + "\" --output cat | grep -v \"future versions of OpenSearch will require Java 11\" | wc -l" ).stdout.trim(); assertThat(journalEntries, equalTo("0")); assertPathsExist(installation.pidDir.resolve("opensearch.pid")); - assertPathsExist(installation.logs.resolve("elasticsearch_server.json")); + assertPathsExist(installation.logs.resolve("opensearch_server.json")); runOpenSearchTests(); verifyPackageInstallation(installation, distribution(), sh); // check startup script didn't change permissions @@ -187,7 +187,7 @@ public void test50Remove() throws Exception { remove(distribution()); // removing must stop the service - assertThat(sh.run("ps aux").stdout, not(containsString("org.opensearch.bootstrap.Elasticsearch"))); + assertThat(sh.run("ps aux").stdout, not(containsString("org.opensearch.bootstrap.OpenSearch"))); if (isSystemd()) { diff --git a/qa/os/src/test/java/org/opensearch/packaging/test/PackageUpgradeTests.java b/qa/os/src/test/java/org/opensearch/packaging/test/PackageUpgradeTests.java index c26f39988c0e3..879ef1ad2e9a7 100644 --- a/qa/os/src/test/java/org/opensearch/packaging/test/PackageUpgradeTests.java +++ b/qa/os/src/test/java/org/opensearch/packaging/test/PackageUpgradeTests.java @@ -68,7 +68,7 @@ public void test12SetupBwcVersion() throws Exception { // add some docs makeRequest( Request.Post("http://localhost:9200/library/_doc/1?refresh=true&pretty") - .bodyString("{ \"title\": \"Elasticsearch - The Definitive Guide\"}", ContentType.APPLICATION_JSON) + .bodyString("{ \"title\": \"OpenSearch\"}", ContentType.APPLICATION_JSON) ); makeRequest( Request.Post("http://localhost:9200/library/_doc/2?refresh=true&pretty") @@ -101,7 +101,7 @@ public void test21CheckUpgradedVersion() throws Exception { private void assertDocsExist() throws Exception { String response1 = makeRequest(Request.Get("http://localhost:9200/library/_doc/1?pretty")); - assertThat(response1, containsString("Elasticsearch")); + assertThat(response1, containsString("OpenSearch")); String response2 = makeRequest(Request.Get("http://localhost:9200/library/_doc/2?pretty")); assertThat(response2, containsString("World")); String response3 = makeRequest(Request.Get("http://localhost:9200/library2/_doc/1?pretty")); diff --git a/qa/os/src/test/java/org/opensearch/packaging/util/Cleanup.java b/qa/os/src/test/java/org/opensearch/packaging/util/Cleanup.java index c3982d7fec09e..ae13b17ca0f22 100644 --- a/qa/os/src/test/java/org/opensearch/packaging/util/Cleanup.java +++ b/qa/os/src/test/java/org/opensearch/packaging/util/Cleanup.java @@ -35,7 +35,7 @@ public class Cleanup { - private static final List ELASTICSEARCH_FILES_LINUX = Arrays.asList( + private static final List OPENSEARCH_FILES_LINUX = Arrays.asList( "/usr/share/opensearch", "/etc/opensearch/opensearch.keystore", "/etc/opensearch", @@ -84,7 +84,7 @@ public static void cleanEverything() throws Exception { // delete files that may still exist lsGlob(getRootTempDir(), "opensearch*").forEach(FileUtils::rm); - final List filesToDelete = Platforms.WINDOWS ? OPENSEARCH_FILES_WINDOWS : ELASTICSEARCH_FILES_LINUX; + final List filesToDelete = Platforms.WINDOWS ? OPENSEARCH_FILES_WINDOWS : OPENSEARCH_FILES_LINUX; // windows needs leniency due to asinine releasing of file locking async from a process exiting Consumer rm = Platforms.WINDOWS ? FileUtils::rmWithRetries : FileUtils::rm; filesToDelete.stream().map(Paths::get).filter(Files::exists).forEach(rm); diff --git a/qa/os/src/test/java/org/opensearch/packaging/util/Docker.java b/qa/os/src/test/java/org/opensearch/packaging/util/Docker.java index 9ef7a5b0a66b9..6fa3d692cafc4 100644 --- a/qa/os/src/test/java/org/opensearch/packaging/util/Docker.java +++ b/qa/os/src/test/java/org/opensearch/packaging/util/Docker.java @@ -54,7 +54,7 @@ import static org.junit.Assert.fail; /** - * Utilities for running packaging tests against the Elasticsearch Docker images. + * Utilities for running packaging tests against the OpenSearch Docker images. */ public class Docker { private static final Log logger = LogFactory.getLog(Docker.class); @@ -90,7 +90,7 @@ public static void ensureImageIsLoaded(Distribution distribution) { } /** - * Runs an Elasticsearch Docker container. + * Runs an OpenSearch Docker container. * @param distribution details about the docker image being tested. */ public static Installation runContainer(Distribution distribution) { @@ -98,7 +98,7 @@ public static Installation runContainer(Distribution distribution) { } /** - * Runs an Elasticsearch Docker container, with options for overriding the config directory + * Runs an OpenSearch Docker container, with options for overriding the config directory * through a bind mount, and passing additional environment variables. * * @param distribution details about the docker image being tested. @@ -110,7 +110,7 @@ public static Installation runContainer(Distribution distribution, Map void withLogging(CheckedRunnable r) thro r.run(); } catch (Exception e) { final Shell.Result logs = getContainerLogs(); - logger.warn("Elasticsearch container failed to start.\n\nStdout:\n" + logs.stdout + "\n\nStderr:\n" + logs.stderr); + logger.warn("OpenSearch container failed to start.\n\nStdout:\n" + logs.stdout + "\n\nStderr:\n" + logs.stderr); throw e; } } diff --git a/qa/os/src/test/java/org/opensearch/packaging/util/Packages.java b/qa/os/src/test/java/org/opensearch/packaging/util/Packages.java index 18112a4746dbd..4b510b1762d5a 100644 --- a/qa/os/src/test/java/org/opensearch/packaging/util/Packages.java +++ b/qa/os/src/test/java/org/opensearch/packaging/util/Packages.java @@ -223,7 +223,7 @@ private static void verifyOssInstallation(Installation opensearch, Distribution } /** - * Starts Elasticsearch, without checking that startup is successful. + * Starts OpenSearch, without checking that startup is successful. */ public static Shell.Result runOpenSearchStartCommand(Shell sh) throws IOException { if (isSystemd()) { @@ -265,7 +265,7 @@ public static void restartOpenSearch(Shell sh, Installation installation) throws /** * A small wrapper for retrieving only recent journald logs for the - * Elasticsearch service. It works by creating a cursor for the logs + * OpenSearch service. It works by creating a cursor for the logs * when instantiated, and advancing that cursor when the {@code clear()} * method is called. */ @@ -274,7 +274,7 @@ public static class JournaldWrapper { private String cursor; /** - * Create a new wrapper for Elasticsearch JournalD logs. + * Create a new wrapper for OpenSearch JournalD logs. * @param sh A shell with appropriate permissions. */ public JournaldWrapper(Shell sh) { @@ -284,7 +284,7 @@ public JournaldWrapper(Shell sh) { /** * "Clears" the journaled messages by retrieving the latest cursor - * for Elasticsearch logs and storing it in class state. + * for OpenSearch logs and storing it in class state. */ public void clear() { final String script = "sudo journalctl --unit=opensearch.service --lines=0 --show-cursor -o cat | sed -e 's/-- cursor: //'"; @@ -293,7 +293,7 @@ public void clear() { /** * Retrieves all log messages coming after the stored cursor. - * @return Recent journald logs for the Elasticsearch service. + * @return Recent journald logs for the OpenSearch service. */ public Result getLogs() { return sh.run("journalctl -u opensearch.service --after-cursor='" + this.cursor + "'"); diff --git a/qa/wildfly/docker-compose-oss.yml b/qa/wildfly/docker-compose-oss.yml index 93b0d9c4faf0c..4d7f3f57932b4 100644 --- a/qa/wildfly/docker-compose-oss.yml +++ b/qa/wildfly/docker-compose-oss.yml @@ -4,7 +4,7 @@ services: wildfly: image: jboss/wildfly:18.0.1.Final environment: - JAVA_OPTS: -Delasticsearch.uri=opensearch:9200 -Djboss.http.port=8080 -Djava.net.preferIPv4Stack=true + JAVA_OPTS: -Dopensearch.uri=opensearch:9200 -Djboss.http.port=8080 -Djava.net.preferIPv4Stack=true volumes: - ./build/distributions/example-app.war:/opt/jboss/wildfly/standalone/deployments/example-app.war ports: diff --git a/rest-api-spec/README.markdown b/rest-api-spec/README.markdown index d8015ad66abae..30d7ff6da4472 100644 --- a/rest-api-spec/README.markdown +++ b/rest-api-spec/README.markdown @@ -1,6 +1,6 @@ -# Elasticsearch REST API JSON specification +# OpenSearch REST API JSON specification -This repository contains a collection of JSON files which describe the [Elasticsearch](http://elastic.co) HTTP API. +This repository contains a collection of JSON files which describe the [OpenSearch](https://github.com/opensearch-project/OpenSearch) HTTP API. Their purpose is to formalize and standardize the API, to facilitate development of libraries and integrations. @@ -74,7 +74,7 @@ If an API is stable but it response should be treated as an arbitrary map of key ## Backwards compatibility -The specification follows the same backward compatibility guarantees as Elasticsearch. +The specification follows the same backward compatibility guarantees as OpenSearch. - Within a Major, additions only. - If an item has been documented wrong it should be deprecated instead as removing these might break downstream clients. diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/README.asciidoc b/rest-api-spec/src/main/resources/rest-api-spec/test/README.asciidoc index 6f1e1b63fb70e..fbee503e61557 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/README.asciidoc +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/README.asciidoc @@ -5,8 +5,8 @@ Test Suite: .Required settings ======================================= Certain tests require specific settings to be applied to the -Elasticsearch instance in order to pass. You should run -Elasticsearch as follows: +OpenSearch instance in order to pass. You should run +OpenSearch as follows: [source,sh] --------------------- @@ -84,7 +84,7 @@ in the `indices.get_settings` API. Skipping tests: --------------- -If a test section should only be run on certain versions of Elasticsearch, +If a test section should only be run on certain versions of OpenSearch, then the first entry in the section (after the title) should be called `skip`, and should contain the range of versions to be skipped, and the reason why the tests are skipped. For instance: @@ -196,7 +196,7 @@ somevalue with whatever is the response in the same position." === `warnings` -The runner can assert the warnings headers returned by Elasticsearch through the `warning:` assertations +The runner can assert the warnings headers returned by OpenSearch through the `warning:` assertations under `do:` operations. === `yaml` diff --git a/server/src/internalClusterTest/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommandIT.java b/server/src/internalClusterTest/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommandIT.java index 8527d6e0d6949..55a75b711bb95 100644 --- a/server/src/internalClusterTest/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommandIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommandIT.java @@ -162,7 +162,7 @@ public void testCorruptIndex() throws Exception { } catch (Exception e) { assertThat(e.getMessage(), allOf(containsString("failed to lock node's directory"), - containsString("is Elasticsearch still running?"))); + containsString("is OpenSearch still running?"))); } final Path indexDir = getPathToShardData(indexName, ShardPath.INDEX_FOLDER_NAME); diff --git a/server/src/internalClusterTest/java/org/opensearch/indices/settings/PrivateSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/settings/PrivateSettingsIT.java index 1ecd643204179..568edb3c8dbc8 100644 --- a/server/src/internalClusterTest/java/org/opensearch/indices/settings/PrivateSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/settings/PrivateSettingsIT.java @@ -62,7 +62,7 @@ public void testUpdatePrivateIndexSettingViaSettingsAPI() { .prepareUpdateSettings("test") .setSettings(Settings.builder().put("index.private", "private-update")) .get()); - final String message = "can not update private setting [index.private]; this setting is managed by Elasticsearch"; + final String message = "can not update private setting [index.private]; this setting is managed by OpenSearch"; assertThat(e, hasToString(containsString(message))); final GetSettingsResponse responseAfterAttemptedUpdate = client().admin().indices().prepareGetSettings("test").get(); assertNull(responseAfterAttemptedUpdate.getSetting("test", "index.private")); diff --git a/server/src/main/java/org/opensearch/Build.java b/server/src/main/java/org/opensearch/Build.java index fe1eab818d97e..644c07e1b4f52 100644 --- a/server/src/main/java/org/opensearch/Build.java +++ b/server/src/main/java/org/opensearch/Build.java @@ -32,11 +32,11 @@ import java.util.jar.Manifest; /** - * Information about a build of Elasticsearch. + * Information about a build of OpenSearch. */ public class Build { /** - * The current build of Elasticsearch. Filled with information scanned at + * The current build of OpenSearch. Filled with information scanned at * startup from the jar. */ public static final Build CURRENT; @@ -106,8 +106,8 @@ public static Type fromDisplayName(final String displayName, final boolean stric Manifest manifest = jar.getManifest(); hash = manifest.getMainAttributes().getValue("Change"); date = manifest.getMainAttributes().getValue("Build-Date"); - isSnapshot = "true".equals(manifest.getMainAttributes().getValue("X-Compile-Elasticsearch-Snapshot")); - version = manifest.getMainAttributes().getValue("X-Compile-Elasticsearch-Version"); + isSnapshot = "true".equals(manifest.getMainAttributes().getValue("X-Compile-OpenSearch-Snapshot")); + version = manifest.getMainAttributes().getValue("X-Compile-OpenSearch-Version"); } catch (IOException e) { throw new RuntimeException(e); } @@ -131,15 +131,15 @@ public static Type fromDisplayName(final String displayName, final boolean stric } if (hash == null) { throw new IllegalStateException("Error finding the build hash. " + - "Stopping Elasticsearch now so it doesn't run in subtly broken ways. This is likely a build bug."); + "Stopping OpenSearch now so it doesn't run in subtly broken ways. This is likely a build bug."); } if (date == null) { throw new IllegalStateException("Error finding the build date. " + - "Stopping Elasticsearch now so it doesn't run in subtly broken ways. This is likely a build bug."); + "Stopping OpenSearch now so it doesn't run in subtly broken ways. This is likely a build bug."); } if (version == null) { throw new IllegalStateException("Error finding the build version. " + - "Stopping Elasticsearch now so it doesn't run in subtly broken ways. This is likely a build bug."); + "Stopping OpenSearch now so it doesn't run in subtly broken ways. This is likely a build bug."); } CURRENT = new Build(type, hash, date, isSnapshot, version); diff --git a/server/src/main/java/org/opensearch/OpenSearchException.java b/server/src/main/java/org/opensearch/OpenSearchException.java index ec1e39269c255..b5067467800d6 100644 --- a/server/src/main/java/org/opensearch/OpenSearchException.java +++ b/server/src/main/java/org/opensearch/OpenSearchException.java @@ -94,7 +94,7 @@ public class OpenSearchException extends RuntimeException implements ToXContentF private static final String ROOT_CAUSE = "root_cause"; private static final Map> ID_TO_SUPPLIER; - private static final Map, OpenSearchExceptionHandle> CLASS_TO_ELASTICSEARCH_EXCEPTION_HANDLE; + private static final Map, OpenSearchExceptionHandle> CLASS_TO_OPENSEARCH_EXCEPTION_HANDLE; private final Map> metadata = new HashMap<>(); private final Map> headers = new HashMap<>(); @@ -299,7 +299,7 @@ public static OpenSearchException readException(StreamInput input, int id) throw * Returns true iff the given class is a registered for an exception to be read. */ public static boolean isRegistered(Class exception, Version version) { - OpenSearchExceptionHandle openSearchExceptionHandle = CLASS_TO_ELASTICSEARCH_EXCEPTION_HANDLE.get(exception); + OpenSearchExceptionHandle openSearchExceptionHandle = CLASS_TO_OPENSEARCH_EXCEPTION_HANDLE.get(exception); if (openSearchExceptionHandle != null) { return version.onOrAfter(openSearchExceptionHandle.versionAdded); } @@ -307,14 +307,14 @@ public static boolean isRegistered(Class exception, Version } static Set> getRegisteredKeys() { // for testing - return CLASS_TO_ELASTICSEARCH_EXCEPTION_HANDLE.keySet(); + return CLASS_TO_OPENSEARCH_EXCEPTION_HANDLE.keySet(); } /** * Returns the serialization id the given exception. */ public static int getId(Class exception) { - return CLASS_TO_ELASTICSEARCH_EXCEPTION_HANDLE.get(exception).id; + return CLASS_TO_OPENSEARCH_EXCEPTION_HANDLE.get(exception).id; } @Override @@ -742,7 +742,7 @@ private enum OpenSearchExceptionHandle { org.opensearch.common.util.CancellableThreads.ExecutionCancelledException::new, 2, UNKNOWN_VERSION_ADDED), MASTER_NOT_DISCOVERED_EXCEPTION(org.opensearch.discovery.MasterNotDiscoveredException.class, org.opensearch.discovery.MasterNotDiscoveredException::new, 3, UNKNOWN_VERSION_ADDED), - ELASTICSEARCH_SECURITY_EXCEPTION(org.opensearch.OpenSearchSecurityException.class, + OPENSEARCH_SECURITY_EXCEPTION(org.opensearch.OpenSearchSecurityException.class, org.opensearch.OpenSearchSecurityException::new, 4, UNKNOWN_VERSION_ADDED), INDEX_SHARD_RESTORE_EXCEPTION(org.opensearch.index.snapshots.IndexShardRestoreException.class, org.opensearch.index.snapshots.IndexShardRestoreException::new, 5, UNKNOWN_VERSION_ADDED), @@ -776,7 +776,7 @@ private enum OpenSearchExceptionHandle { org.opensearch.ResourceNotFoundException::new, 19, UNKNOWN_VERSION_ADDED), ACTION_TRANSPORT_EXCEPTION(org.opensearch.transport.ActionTransportException.class, org.opensearch.transport.ActionTransportException::new, 20, UNKNOWN_VERSION_ADDED), - ELASTICSEARCH_GENERATION_EXCEPTION(org.opensearch.OpenSearchGenerationException.class, + OPENSEARCH_GENERATION_EXCEPTION(org.opensearch.OpenSearchGenerationException.class, org.opensearch.OpenSearchGenerationException::new, 21, UNKNOWN_VERSION_ADDED), // 22 was CreateFailedEngineException INDEX_SHARD_STARTED_EXCEPTION(org.opensearch.index.shard.IndexShardStartedException.class, @@ -801,7 +801,7 @@ private enum OpenSearchExceptionHandle { org.opensearch.indices.IndexPrimaryShardNotAllocatedException::new, 33, UNKNOWN_VERSION_ADDED), TRANSPORT_EXCEPTION(org.opensearch.transport.TransportException.class, org.opensearch.transport.TransportException::new, 34, UNKNOWN_VERSION_ADDED), - ELASTICSEARCH_PARSE_EXCEPTION(org.opensearch.OpenSearchParseException.class, + OPENSEARCH_PARSE_EXCEPTION(org.opensearch.OpenSearchParseException.class, org.opensearch.OpenSearchParseException::new, 35, UNKNOWN_VERSION_ADDED), SEARCH_EXCEPTION(org.opensearch.search.SearchException.class, org.opensearch.search.SearchException::new, 36, UNKNOWN_VERSION_ADDED), @@ -859,7 +859,7 @@ private enum OpenSearchExceptionHandle { INDEX_SHARD_NOT_RECOVERING_EXCEPTION(org.opensearch.index.shard.IndexShardNotRecoveringException.class, org.opensearch.index.shard.IndexShardNotRecoveringException::new, 66, UNKNOWN_VERSION_ADDED), HTTP_EXCEPTION(org.opensearch.http.HttpException.class, org.opensearch.http.HttpException::new, 67, UNKNOWN_VERSION_ADDED), - ELASTICSEARCH_EXCEPTION(OpenSearchException.class, + OPENSEARCH_EXCEPTION(OpenSearchException.class, OpenSearchException::new, 68, UNKNOWN_VERSION_ADDED), SNAPSHOT_MISSING_EXCEPTION(org.opensearch.snapshots.SnapshotMissingException.class, org.opensearch.snapshots.SnapshotMissingException::new, 69, UNKNOWN_VERSION_ADDED), @@ -948,7 +948,7 @@ private enum OpenSearchExceptionHandle { org.opensearch.cluster.metadata.ProcessClusterEventTimeoutException::new, 116, UNKNOWN_VERSION_ADDED), RETRY_ON_PRIMARY_EXCEPTION(ReplicationOperation.RetryOnPrimaryException.class, ReplicationOperation.RetryOnPrimaryException::new, 117, UNKNOWN_VERSION_ADDED), - ELASTICSEARCH_TIMEOUT_EXCEPTION(org.opensearch.OpenSearchTimeoutException.class, + OPENSEARCH_TIMEOUT_EXCEPTION(org.opensearch.OpenSearchTimeoutException.class, org.opensearch.OpenSearchTimeoutException::new, 118, UNKNOWN_VERSION_ADDED), QUERY_PHASE_EXECUTION_EXCEPTION(org.opensearch.search.query.QueryPhaseExecutionException.class, org.opensearch.search.query.QueryPhaseExecutionException::new, 119, UNKNOWN_VERSION_ADDED), @@ -1094,7 +1094,7 @@ static Tuple>[] classes() { static { ID_TO_SUPPLIER = unmodifiableMap(Arrays .stream(OpenSearchExceptionHandle.values()).collect(Collectors.toMap(e -> e.id, e -> e.constructor))); - CLASS_TO_ELASTICSEARCH_EXCEPTION_HANDLE = unmodifiableMap(Arrays + CLASS_TO_OPENSEARCH_EXCEPTION_HANDLE = unmodifiableMap(Arrays .stream(OpenSearchExceptionHandle.values()).collect(Collectors.toMap(e -> e.exceptionClass, e -> e))); } diff --git a/server/src/main/java/org/opensearch/SpecialPermission.java b/server/src/main/java/org/opensearch/SpecialPermission.java index a24d8dffc8d1a..8f36196d0f03c 100644 --- a/server/src/main/java/org/opensearch/SpecialPermission.java +++ b/server/src/main/java/org/opensearch/SpecialPermission.java @@ -22,7 +22,7 @@ import java.security.BasicPermission; /** - * Elasticsearch-specific permission to check before entering + * OpenSearch-specific permission to check before entering * {@code AccessController.doPrivileged()} blocks. *

    * We try to avoid these blocks in our code and keep security simple, diff --git a/server/src/main/java/org/opensearch/Version.java b/server/src/main/java/org/opensearch/Version.java index 4b18100ced4c1..2f615b837e22a 100644 --- a/server/src/main/java/org/opensearch/Version.java +++ b/server/src/main/java/org/opensearch/Version.java @@ -244,7 +244,7 @@ private static Version fromIdSlow(int id) { } /** - * Return the {@link Version} of Elasticsearch that has been used to create an index given its settings. + * Return the {@link Version} of OpenSearch that has been used to create an index given its settings. * * @throws IllegalStateException if the given index settings doesn't contain a value for the key * {@value IndexMetadata#SETTING_VERSION_CREATED} diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/DanglingIndexInfo.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/DanglingIndexInfo.java index f4f519518af36..3e7b27207cafd 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/DanglingIndexInfo.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/DanglingIndexInfo.java @@ -26,7 +26,7 @@ import java.io.IOException; /** - * Contains information about a dangling index, i.e. an index that Elasticsearch has found + * Contains information about a dangling index, i.e. an index that OpenSearch has found * on-disk but is not present in the cluster state. */ public class DanglingIndexInfo implements Writeable { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequest.java index fcd1e6710d8fa..e90b1a6efe2df 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/flush/FlushRequest.java @@ -30,7 +30,7 @@ /** * A flush request to flush one or more indices. The flush process of an index basically frees memory from the index - * by flushing data to the index storage and clearing the internal transaction log. By default, Elasticsearch uses + * by flushing data to the index storage and clearing the internal transaction log. By default, OpenSearch uses * memory heuristics in order to automatically trigger flush operations as required in order to clear memory. *

    * Best created with {@link org.opensearch.client.Requests#flushRequest(String...)}. diff --git a/server/src/main/java/org/opensearch/action/package-info.java b/server/src/main/java/org/opensearch/action/package-info.java index 28f2963283da8..decda2e25ce63 100644 --- a/server/src/main/java/org/opensearch/action/package-info.java +++ b/server/src/main/java/org/opensearch/action/package-info.java @@ -18,6 +18,6 @@ */ /** - * Actions that Elasticsearch can take either on the data stored on disk or on other nodes. + * Actions that OpenSearch can take either on the data stored on disk or on other nodes. */ package org.opensearch.action; diff --git a/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java b/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java index 5abafd211059f..f6c6576069677 100644 --- a/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java +++ b/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java @@ -39,7 +39,7 @@ public abstract class EnvironmentAwareCommand extends Command { private final OptionSpec settingOption; /** - * Construct the command with the specified command description. This command will have logging configured without reading Elasticsearch + * Construct the command with the specified command description. This command will have logging configured without reading OpenSearch * configuration files. * * @param description the command description diff --git a/server/src/main/java/org/opensearch/cli/LoggingAwareCommand.java b/server/src/main/java/org/opensearch/cli/LoggingAwareCommand.java index b1a6166a12dd0..9678af5f9f94b 100644 --- a/server/src/main/java/org/opensearch/cli/LoggingAwareCommand.java +++ b/server/src/main/java/org/opensearch/cli/LoggingAwareCommand.java @@ -21,12 +21,12 @@ /** * A command that is aware of logging. This class should be preferred over the base {@link Command} class for any CLI tools that depend on - * core Elasticsearch as they could directly or indirectly touch classes that touch logging and as such logging needs to be configured. + * core OpenSearch as they could directly or indirectly touch classes that touch logging and as such logging needs to be configured. */ public abstract class LoggingAwareCommand extends Command { /** - * Construct the command with the specified command description. This command will have logging configured without reading Elasticsearch + * Construct the command with the specified command description. This command will have logging configured without reading OpenSearch * configuration files. * * @param description the command description diff --git a/server/src/main/java/org/opensearch/cli/LoggingAwareMultiCommand.java b/server/src/main/java/org/opensearch/cli/LoggingAwareMultiCommand.java index a94f8b12c0fc2..29341252e67f1 100644 --- a/server/src/main/java/org/opensearch/cli/LoggingAwareMultiCommand.java +++ b/server/src/main/java/org/opensearch/cli/LoggingAwareMultiCommand.java @@ -21,13 +21,13 @@ /** * A multi-command that is aware of logging. This class should be preferred over the base {@link MultiCommand} class for any CLI tools that - * depend on core Elasticsearch as they could directly or indirectly touch classes that touch logging and as such logging needs to be + * depend on core OpenSearch as they could directly or indirectly touch classes that touch logging and as such logging needs to be * configured. */ public abstract class LoggingAwareMultiCommand extends MultiCommand { /** - * Construct the command with the specified command description. This command will have logging configured without reading Elasticsearch + * Construct the command with the specified command description. This command will have logging configured without reading OpenSearch * configuration files. * * @param description the command description diff --git a/server/src/main/java/org/opensearch/client/transport/TransportClient.java b/server/src/main/java/org/opensearch/client/transport/TransportClient.java index 7f0df2c745d80..ca72dfaf9ed02 100644 --- a/server/src/main/java/org/opensearch/client/transport/TransportClient.java +++ b/server/src/main/java/org/opensearch/client/transport/TransportClient.java @@ -89,7 +89,7 @@ * started in client mode (only connects, no bind). * * @deprecated {@link TransportClient} is deprecated in favour of the High Level REST client and will - * be removed in Elasticsearch 8.0. + * be removed in OpenSearch 1.0.0. */ @Deprecated public abstract class TransportClient extends AbstractClient { diff --git a/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java b/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java index c65bf1ca47932..37df591b6c263 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/OpenSearchNodeCommand.java @@ -63,9 +63,9 @@ public abstract class OpenSearchNodeCommand extends EnvironmentAwareCommand { static final String STOP_WARNING_MSG = DELIMITER + "\n" + - " WARNING: Elasticsearch MUST be stopped before running this tool." + + " WARNING: OpenSearch MUST be stopped before running this tool." + "\n"; - protected static final String FAILED_TO_OBTAIN_NODE_LOCK_MSG = "failed to lock node's directory, is Elasticsearch still running?"; + protected static final String FAILED_TO_OBTAIN_NODE_LOCK_MSG = "failed to lock node's directory, is OpenSearch still running?"; protected static final String ABORTED_BY_USER_MSG = "aborted by user"; final OptionSpec nodeOrdinalOption; static final String NO_NODE_FOLDER_FOUND_MSG = "no node folder is found in data folder(s), node has not been started yet?"; diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java index 2ec59acd39914..8f9fa0bc8ce85 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java @@ -765,7 +765,7 @@ static Settings aggregateIndexSettings(ClusterState currentState, CreateIndexClu shardLimitValidator.validateShardLimit(indexSettings, currentState); if (indexSettings.getAsBoolean(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true) == false) { DEPRECATION_LOGGER.deprecate("soft_deletes_disabled", - "Creating indices with soft-deletes disabled is deprecated and will be removed in future Elasticsearch versions. " + + "Creating indices with soft-deletes disabled is deprecated and will be removed in future OpenSearch versions. " + "Please do not specify value for setting [index.soft_deletes.enabled] of index [" + request.index() + "]."); } validateTranslogRetentionSettings(indexSettings); diff --git a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexUpgradeService.java b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexUpgradeService.java index 72e87862f3d87..098e08f2ed9da 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexUpgradeService.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/MetadataIndexUpgradeService.java @@ -101,7 +101,7 @@ public IndexMetadata upgradeIndexMetadata(IndexMetadata indexMetadata, Version m } /** - * Checks if the index was already opened by this version of Elasticsearch and doesn't require any additional checks. + * Checks if the index was already opened by this version of OpenSearch and doesn't require any additional checks. */ boolean isUpgraded(IndexMetadata indexMetadata) { return indexMetadata.getUpgradedVersion().onOrAfter(Version.CURRENT); diff --git a/server/src/main/java/org/opensearch/cluster/routing/IndexShardRoutingTable.java b/server/src/main/java/org/opensearch/cluster/routing/IndexShardRoutingTable.java index 76cbcb14ea5d1..33740277866b0 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/IndexShardRoutingTable.java +++ b/server/src/main/java/org/opensearch/cluster/routing/IndexShardRoutingTable.java @@ -48,7 +48,7 @@ /** * {@link IndexShardRoutingTable} encapsulates all instances of a single shard. - * Each Elasticsearch index consists of multiple shards, each shard encapsulates + * Each OpenSearch index consists of multiple shards, each shard encapsulates * a disjoint set of the index data and each shard has one or more instances * referred to as replicas of a shard. Given that, this class encapsulates all * replicas (instances) for a single index shard. @@ -308,7 +308,7 @@ private static Map rankNodes(final Map INDEX_TOTAL_SHARDS_PER_NODE_SETTING = diff --git a/server/src/main/java/org/opensearch/common/Randomness.java b/server/src/main/java/org/opensearch/common/Randomness.java index 4fbe1db3df2fe..49d0c32905ce9 100644 --- a/server/src/main/java/org/opensearch/common/Randomness.java +++ b/server/src/main/java/org/opensearch/common/Randomness.java @@ -32,14 +32,14 @@ /** * Provides factory methods for producing reproducible sources of * randomness. Reproducible sources of randomness contribute to - * reproducible tests. When running the Elasticsearch test suite, the + * reproducible tests. When running the OpenSearch test suite, the * test runner will establish a global random seed accessible via the * system property "tests.seed". By seeding a random number generator * with this global seed, we ensure that instances of Random produced * with this class produce reproducible sources of randomness under - * when running under the Elasticsearch test suite. Alternatively, + * when running under the OpenSearch test suite. Alternatively, * a reproducible source of randomness can be produced by providing a - * setting a reproducible seed. When running the Elasticsearch server + * setting a reproducible seed. When running the OpenSearch server * process, non-reproducible sources of randomness are provided (unless * a setting is provided for a module that exposes a seed setting (e.g., * NodeEnvironment#NODE_ID_SEED_SETTING)). @@ -83,7 +83,7 @@ public static Random get(Settings settings, Setting setting) { /** * Provides a source of randomness that is reproducible when - * running under the Elasticsearch test suite, and otherwise + * running under the OpenSearch test suite, and otherwise * produces a non-reproducible source of randomness. Reproducible * sources of randomness are created when the system property * "tests.seed" is set and the security policy allows reading this diff --git a/server/src/main/java/org/opensearch/common/compress/CompressorFactory.java b/server/src/main/java/org/opensearch/common/compress/CompressorFactory.java index 3e496e96442ba..5f2df04e0dc35 100644 --- a/server/src/main/java/org/opensearch/common/compress/CompressorFactory.java +++ b/server/src/main/java/org/opensearch/common/compress/CompressorFactory.java @@ -56,7 +56,7 @@ public static Compressor compressor(BytesReference bytes) { return null; } - /** true if the bytes were compressed with LZF: only used before elasticsearch 2.0 */ + /** true if the bytes were compressed with LZF*/ private static boolean isAncient(BytesReference bytes) { return bytes.length() >= 3 && bytes.get(0) == 'Z' && diff --git a/server/src/main/java/org/opensearch/common/geo/GeoShapeUtils.java b/server/src/main/java/org/opensearch/common/geo/GeoShapeUtils.java index aefd0b31565b3..a110f5e220a63 100644 --- a/server/src/main/java/org/opensearch/common/geo/GeoShapeUtils.java +++ b/server/src/main/java/org/opensearch/common/geo/GeoShapeUtils.java @@ -26,7 +26,7 @@ /** - * Utility class that transforms Elasticsearch geometry objects to the Lucene representation + * Utility class that transforms OpenSearch geometry objects to the Lucene representation */ public class GeoShapeUtils { diff --git a/server/src/main/java/org/opensearch/common/io/FileSystemUtils.java b/server/src/main/java/org/opensearch/common/io/FileSystemUtils.java index bee8326fe3cda..de404cad736f5 100644 --- a/server/src/main/java/org/opensearch/common/io/FileSystemUtils.java +++ b/server/src/main/java/org/opensearch/common/io/FileSystemUtils.java @@ -34,7 +34,7 @@ import java.util.stream.StreamSupport; /** - * Elasticsearch utils to work with {@link java.nio.file.Path} + * OpenSearch utils to work with {@link java.nio.file.Path} */ public final class FileSystemUtils { diff --git a/server/src/main/java/org/opensearch/common/io/stream/Writeable.java b/server/src/main/java/org/opensearch/common/io/stream/Writeable.java index 1ba3b3f90c6ef..fb82cf1a51e3e 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/Writeable.java +++ b/server/src/main/java/org/opensearch/common/io/stream/Writeable.java @@ -23,7 +23,7 @@ /** * Implementers can be written to a {@linkplain StreamOutput} and read from a {@linkplain StreamInput}. This allows them to be "thrown - * across the wire" using Elasticsearch's internal protocol. If the implementer also implements equals and hashCode then a copy made by + * across the wire" using OpenSearch's internal protocol. If the implementer also implements equals and hashCode then a copy made by * serializing and deserializing must be equal and have the same hashCode. It isn't required that such a copy be entirely unchanged. */ public interface Writeable { diff --git a/server/src/main/java/org/opensearch/common/io/stream/package-info.java b/server/src/main/java/org/opensearch/common/io/stream/package-info.java index 797bbdd9a99db..0c84c9869f7f0 100644 --- a/server/src/main/java/org/opensearch/common/io/stream/package-info.java +++ b/server/src/main/java/org/opensearch/common/io/stream/package-info.java @@ -18,6 +18,6 @@ */ /** - * Classes for streaming objects from one Elasticsearch node to another over its binary internode protocol. + * Classes for streaming objects from one OpenSearch node to another over its binary internode protocol. */ package org.opensearch.common.io.stream; diff --git a/server/src/main/java/org/opensearch/common/joda/Joda.java b/server/src/main/java/org/opensearch/common/joda/Joda.java index 61bd466c1ef77..6105580fa590e 100644 --- a/server/src/main/java/org/opensearch/common/joda/Joda.java +++ b/server/src/main/java/org/opensearch/common/joda/Joda.java @@ -400,11 +400,11 @@ public int parseInto(DateTimeParserBucket bucket, String text, int position) { // check for deprecations, but after it has parsed correctly so invalid values aren't counted as deprecated if (millis < 0) { getDeprecationLogger().deprecate("epoch-negative", "Use of negative values" + - " in epoch time formats is deprecated and will not be supported in the next major version of Elasticsearch."); + " in epoch time formats is deprecated and will not be supported in the next major version of OpenSearch."); } if (scientificNotation.matcher(text).find()) { getDeprecationLogger().deprecate("epoch-scientific-notation", "Use of scientific notation" + - " in epoch time formats is deprecated and will not be supported in the next major version of Elasticsearch."); + " in epoch time formats is deprecated and will not be supported in the next major version of OpenSearch."); } DateTime dt = new DateTime(millis, DateTimeZone.UTC); bucket.saveField(DateTimeFieldType.year(), dt.getYear()); diff --git a/server/src/main/java/org/opensearch/common/logging/HeaderWarning.java b/server/src/main/java/org/opensearch/common/logging/HeaderWarning.java index a21f37349120f..b02ee619417e1 100644 --- a/server/src/main/java/org/opensearch/common/logging/HeaderWarning.java +++ b/server/src/main/java/org/opensearch/common/logging/HeaderWarning.java @@ -43,11 +43,11 @@ public class HeaderWarning { /** * Regular expression to test if a string matches the RFC7234 specification for warning headers. This pattern assumes that the warn code - * is always 299. Further, this pattern assumes that the warn agent represents a version of Elasticsearch including the build hash. + * is always 299. Further, this pattern assumes that the warn agent represents a version of OpenSearch including the build hash. */ public static final Pattern WARNING_HEADER_PATTERN = Pattern.compile( "299 " + // warn code - "Elasticsearch-" + // warn agent + "OpenSearch-" + // warn agent "\\d+\\.\\d+\\.\\d+(?:-(?:alpha|beta|rc)\\d+)?(?:-SNAPSHOT)?-" + // warn agent "(?:[a-f0-9]{7}(?:[a-f0-9]{33})?|unknown) " + // warn agent "\"((?:\t| |!|[\\x23-\\x5B]|[\\x5D-\\x7E]|[\\x80-\\xFF]|\\\\|\\\\\")*)\"( " + // quoted warning value, captured @@ -72,7 +72,7 @@ public class HeaderWarning { private static final String WARNING_PREFIX = String.format( Locale.ROOT, - "299 Elasticsearch-%s%s-%s", + "299 OpenSearch-%s%s-%s", Version.CURRENT.toString(), Build.CURRENT.isSnapshot() ? "-SNAPSHOT" : "", Build.CURRENT.hash()); @@ -151,7 +151,7 @@ public static void removeThreadContext(ThreadContext threadContext) { /** * Extracts the warning value from the value of a warning header that is formatted according to RFC 7234. That is, given a string - * {@code 299 Elasticsearch-6.0.0 "warning value"}, the return value of this method would be {@code warning value}. + * {@code 299 OpenSearch-6.0.0 "warning value"}, the return value of this method would be {@code warning value}. * * @param s the value of a warning header formatted according to RFC 7234. * @return the extracted warning value diff --git a/server/src/main/java/org/opensearch/common/logging/LoggerMessageFormat.java b/server/src/main/java/org/opensearch/common/logging/LoggerMessageFormat.java index b891f975494e0..cd44b1e72786b 100644 --- a/server/src/main/java/org/opensearch/common/logging/LoggerMessageFormat.java +++ b/server/src/main/java/org/opensearch/common/logging/LoggerMessageFormat.java @@ -23,7 +23,7 @@ import java.util.Set; /** - * Format string for Elasticsearch log messages. + * Format string for OpenSearch log messages. */ public class LoggerMessageFormat { diff --git a/server/src/main/java/org/opensearch/common/logging/OpenSearchJsonLayout.java b/server/src/main/java/org/opensearch/common/logging/OpenSearchJsonLayout.java index 893d7d1bf4b60..892887e5f79c1 100644 --- a/server/src/main/java/org/opensearch/common/logging/OpenSearchJsonLayout.java +++ b/server/src/main/java/org/opensearch/common/logging/OpenSearchJsonLayout.java @@ -51,7 +51,7 @@ *

  • level - INFO, WARN etc
  • *
  • component - logger name, most of the times class name
  • *
  • cluster.name - taken from sys:opensearch.logs.cluster_name system property because it is always set
  • - *
  • node.name - taken from NodeNamePatternConverter, as it can be set in runtime as hostname when not set in elasticsearch.yml
  • + *
  • node.name - taken from NodeNamePatternConverter, as it can be set in runtime as hostname when not set in opensearch.yml
  • *
  • node_and_cluster_id - in json as node.id and cluster.uuid - taken from NodeAndClusterIdConverter and present * once clusterStateUpdate is first received
  • *
  • message - a json escaped message. Multiline messages will be converted to single line with new line explicitly diff --git a/server/src/main/java/org/opensearch/common/settings/AbstractScopedSettings.java b/server/src/main/java/org/opensearch/common/settings/AbstractScopedSettings.java index c265bd76d8757..ba69da2885c72 100644 --- a/server/src/main/java/org/opensearch/common/settings/AbstractScopedSettings.java +++ b/server/src/main/java/org/opensearch/common/settings/AbstractScopedSettings.java @@ -570,7 +570,7 @@ void validate( "can not update internal setting [" + setting.getKey() + "]; this setting is managed via a dedicated API"); } else if (setting.isPrivateIndex()) { throw new IllegalArgumentException( - "can not update private setting [" + setting.getKey() + "]; this setting is managed by Elasticsearch"); + "can not update private setting [" + setting.getKey() + "]; this setting is managed by OpenSearch"); } } } diff --git a/server/src/main/java/org/opensearch/common/settings/BaseKeyStoreCommand.java b/server/src/main/java/org/opensearch/common/settings/BaseKeyStoreCommand.java index 51209dbfcb112..e289d01840b27 100644 --- a/server/src/main/java/org/opensearch/common/settings/BaseKeyStoreCommand.java +++ b/server/src/main/java/org/opensearch/common/settings/BaseKeyStoreCommand.java @@ -48,7 +48,7 @@ protected final void execute(Terminal terminal, OptionSet options, Environment e keyStore = KeyStoreWrapper.load(configFile); if (keyStore == null) { if (keyStoreMustExist) { - throw new UserException(ExitCodes.DATA_ERROR, "Elasticsearch keystore not found at [" + + throw new UserException(ExitCodes.DATA_ERROR, "OpenSearch keystore not found at [" + KeyStoreWrapper.keystorePath(env.configFile()) + "]. Use 'create' command to create one."); } else if (options.has(forceOption) == false) { if (terminal.promptYesNo("The opensearch keystore does not exist. Do you want to create it?", false) == false) { diff --git a/server/src/main/java/org/opensearch/common/settings/ChangeKeyStorePasswordCommand.java b/server/src/main/java/org/opensearch/common/settings/ChangeKeyStorePasswordCommand.java index c2ca4be0a609f..5f889b2d4ff20 100644 --- a/server/src/main/java/org/opensearch/common/settings/ChangeKeyStorePasswordCommand.java +++ b/server/src/main/java/org/opensearch/common/settings/ChangeKeyStorePasswordCommand.java @@ -39,7 +39,7 @@ protected void executeCommand(Terminal terminal, OptionSet options, Environment try (SecureString newPassword = readPassword(terminal, true)) { final KeyStoreWrapper keyStore = getKeyStore(); keyStore.save(env.configFile(), newPassword.getChars()); - terminal.println("Elasticsearch keystore password changed successfully."); + terminal.println("OpenSearch keystore password changed successfully."); } catch (SecurityException e) { throw new UserException(ExitCodes.DATA_ERROR, e.getMessage()); } diff --git a/server/src/main/java/org/opensearch/common/settings/HasPasswordKeyStoreCommand.java b/server/src/main/java/org/opensearch/common/settings/HasPasswordKeyStoreCommand.java index cd09ccbbf9fd8..ee06fd2c5580e 100644 --- a/server/src/main/java/org/opensearch/common/settings/HasPasswordKeyStoreCommand.java +++ b/server/src/main/java/org/opensearch/common/settings/HasPasswordKeyStoreCommand.java @@ -44,7 +44,7 @@ protected void execute(Terminal terminal, OptionSet options, Environment env) th // We handle error printing here so we can respect the "--silent" flag // We have to throw an exception to get a nonzero exit code if (keyStore == null) { - terminal.errorPrintln(Terminal.Verbosity.NORMAL, "ERROR: Elasticsearch keystore not found"); + terminal.errorPrintln(Terminal.Verbosity.NORMAL, "ERROR: OpenSearch keystore not found"); throw new UserException(NO_PASSWORD_EXIT_CODE, null); } if (keyStore.hasPassword() == false) { diff --git a/server/src/main/java/org/opensearch/common/settings/KeyStoreWrapper.java b/server/src/main/java/org/opensearch/common/settings/KeyStoreWrapper.java index bec109728fe9d..d036e354acfe7 100644 --- a/server/src/main/java/org/opensearch/common/settings/KeyStoreWrapper.java +++ b/server/src/main/java/org/opensearch/common/settings/KeyStoreWrapper.java @@ -73,7 +73,7 @@ import java.util.regex.Pattern; /** - * A disk based container for sensitive settings in Elasticsearch. + * A disk based container for sensitive settings in OpenSearch. * * Loading a keystore has 2 phases. First, call {@link #load(Path)}. Then call * {@link #decrypt(char[])} with the keystore password, or an empty char array if @@ -205,7 +205,7 @@ public static void addBootstrapSeed(KeyStoreWrapper wrapper) { } /** - * Loads information about the Elasticsearch keystore from the provided config directory. + * Loads information about the OpenSearch keystore from the provided config directory. * * {@link #decrypt(char[])} must be called before reading or writing any entries. * Returns {@code null} if no keystore exists. @@ -223,10 +223,10 @@ public static KeyStoreWrapper load(Path configDir) throws IOException { try { formatVersion = CodecUtil.checkHeader(input, KEYSTORE_FILENAME, MIN_FORMAT_VERSION, FORMAT_VERSION); } catch (IndexFormatTooOldException e) { - throw new IllegalStateException("The Elasticsearch keystore [" + keystoreFile + "] format is too old. " + + throw new IllegalStateException("The OpenSearch keystore [" + keystoreFile + "] format is too old. " + "You should delete and recreate it in order to upgrade.", e); } catch (IndexFormatTooNewException e) { - throw new IllegalStateException("The Elasticsearch keystore [" + keystoreFile + "] format is too new. " + + throw new IllegalStateException("The OpenSearch keystore [" + keystoreFile + "] format is too new. " + "Are you trying to downgrade? You should delete and recreate it in order to downgrade.", e); } byte hasPasswordByte = input.readByte(); diff --git a/server/src/main/java/org/opensearch/common/settings/SecureSetting.java b/server/src/main/java/org/opensearch/common/settings/SecureSetting.java index 20d1622dea320..8ed8b9f9be71c 100644 --- a/server/src/main/java/org/opensearch/common/settings/SecureSetting.java +++ b/server/src/main/java/org/opensearch/common/settings/SecureSetting.java @@ -30,7 +30,7 @@ /** * A secure setting. * - * This class allows access to settings from the Elasticsearch keystore. + * This class allows access to settings from the OpenSearch keystore. */ public abstract class SecureSetting extends Setting { @@ -87,7 +87,7 @@ public T get(Settings settings) { if (secureSettings == null || secureSettings.getSettingNames().contains(getKey()) == false) { if (super.exists(settings)) { throw new IllegalArgumentException("Setting [" + getKey() + "] is a secure setting" + - " and must be stored inside the Elasticsearch keystore, but was found inside opensearch.yml"); + " and must be stored inside the OpenSearch keystore, but was found inside opensearch.yml"); } return getFallback(settings); } diff --git a/server/src/main/java/org/opensearch/common/settings/Setting.java b/server/src/main/java/org/opensearch/common/settings/Setting.java index ce4ddf53c7ef0..d717071f42aa7 100644 --- a/server/src/main/java/org/opensearch/common/settings/Setting.java +++ b/server/src/main/java/org/opensearch/common/settings/Setting.java @@ -518,7 +518,7 @@ String innerGetRaw(final Settings settings) { SecureSettings secureSettings = settings.getSecureSettings(); if (secureSettings != null && secureSettings.getSettingNames().contains(getKey())) { throw new IllegalArgumentException("Setting [" + getKey() + "] is a non-secure setting" + - " and must be stored inside opensearch.yml, but was found inside the Elasticsearch keystore"); + " and must be stored inside opensearch.yml, but was found inside the OpenSearch keystore"); } return settings.get(getKey(), defaultValue.apply(settings)); } @@ -530,7 +530,7 @@ void checkDeprecation(Settings settings) { // It would be convenient to show its replacement key, but replacement is often not so simple final String key = getKey(); Settings.DeprecationLoggerHolder.deprecationLogger - .deprecate(key, "[{}] setting was deprecated in Elasticsearch and will be removed in a future release! " + .deprecate(key, "[{}] setting was deprecated in OpenSearch and will be removed in a future release! " + "See the breaking changes documentation for the next major version.", key); } } diff --git a/server/src/main/java/org/opensearch/common/settings/SettingsModule.java b/server/src/main/java/org/opensearch/common/settings/SettingsModule.java index b87a38b42593c..b4e4c7b2d0cde 100644 --- a/server/src/main/java/org/opensearch/common/settings/SettingsModule.java +++ b/server/src/main/java/org/opensearch/common/settings/SettingsModule.java @@ -107,7 +107,7 @@ public SettingsModule( builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); int count = 0; - for (String word : ("Since elasticsearch 5.x index level settings can NOT be set on the nodes configuration like " + + for (String word : ("Index level settings can NOT be set on the nodes configuration like " + "the opensearch.yaml, in system properties or command line arguments." + "In order to upgrade all indices the settings must be updated via the /${index}/_settings API. " + "Unless all settings are dynamic all indices must be closed in order to apply the upgrade" + diff --git a/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchExecutors.java b/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchExecutors.java index fd6ab56485e04..7190948775dea 100644 --- a/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchExecutors.java +++ b/server/src/main/java/org/opensearch/common/util/concurrent/OpenSearchExecutors.java @@ -61,7 +61,7 @@ public class OpenSearchExecutors { /** * Setting to manually control the number of allocated processors. This setting is used to adjust thread pool sizes per node. The * default value is {@link Runtime#availableProcessors()} but should be manually controlled if not all processors on the machine are - * available to Elasticsearch (e.g., because of CPU limits). + * available to OpenSearch (e.g., because of CPU limits). */ public static final Setting NODE_PROCESSORS_SETTING = new Setting<>( "node.processors", diff --git a/server/src/main/java/org/opensearch/gateway/GatewayMetaState.java b/server/src/main/java/org/opensearch/gateway/GatewayMetaState.java index ea57b9837173b..01acb8fcc67ad 100644 --- a/server/src/main/java/org/opensearch/gateway/GatewayMetaState.java +++ b/server/src/main/java/org/opensearch/gateway/GatewayMetaState.java @@ -231,9 +231,8 @@ Metadata upgradeMetadataForNode(Metadata metadata, } /** - * Elasticsearch 2.0 removed several deprecated features and as well as support for Lucene 3.x. This method calls - * {@link MetadataIndexUpgradeService} to makes sure that indices are compatible with the current version. The - * MetadataIndexUpgradeService might also update obsolete settings if needed. + * This method calls {@link MetadataIndexUpgradeService} to makes sure that indices are compatible with the current + * version. The MetadataIndexUpgradeService might also update obsolete settings if needed. * * @return input metadata if no upgrade is needed or an upgraded metadata */ diff --git a/server/src/main/java/org/opensearch/gateway/MetaStateService.java b/server/src/main/java/org/opensearch/gateway/MetaStateService.java index cb0db73d3d8da..1682d8308b5dd 100644 --- a/server/src/main/java/org/opensearch/gateway/MetaStateService.java +++ b/server/src/main/java/org/opensearch/gateway/MetaStateService.java @@ -121,7 +121,7 @@ private Tuple loadFullStateBWC() throws IOException { if (globalMetadata != null) { metadataBuilder = Metadata.builder(globalMetadata); indexGraveyard = globalMetadata.custom(IndexGraveyard.TYPE); - assert Version.CURRENT.major < 8 : "failed to find manifest file, which is mandatory staring with Elasticsearch version 8.0"; + assert Version.CURRENT.major < 8 : "failed to find manifest file, which is mandatory staring with OpenSearch version 1.0.0"; } else { metadataBuilder = Metadata.builder(); indexGraveyard = IndexGraveyard.builder().build(); @@ -131,7 +131,7 @@ private Tuple loadFullStateBWC() throws IOException { Tuple indexMetadataAndGeneration = INDEX_METADATA_FORMAT.loadLatestStateWithGeneration(logger, namedXContentRegistry, nodeEnv.resolveIndexFolder(indexFolderName)); - assert Version.CURRENT.major < 8 : "failed to find manifest file, which is mandatory staring with Elasticsearch version 8.0"; + assert Version.CURRENT.major < 8 : "failed to find manifest file, which is mandatory staring with OpenSearch version 1.0.0"; IndexMetadata indexMetadata = indexMetadataAndGeneration.v1(); long generation = indexMetadataAndGeneration.v2(); if (indexMetadata != null) { diff --git a/server/src/main/java/org/opensearch/index/Index.java b/server/src/main/java/org/opensearch/index/Index.java index aef996fedcd81..afd35c392db7c 100644 --- a/server/src/main/java/org/opensearch/index/Index.java +++ b/server/src/main/java/org/opensearch/index/Index.java @@ -33,7 +33,7 @@ import java.util.Objects; /** - * A value class representing the basic required properties of an Elasticsearch index. + * A value class representing the basic required properties of an OpenSearch index. */ public class Index implements Writeable, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/index/IndexModule.java b/server/src/main/java/org/opensearch/index/IndexModule.java index af3171b09a2c3..d1ce57e8a2040 100644 --- a/server/src/main/java/org/opensearch/index/IndexModule.java +++ b/server/src/main/java/org/opensearch/index/IndexModule.java @@ -288,7 +288,7 @@ public void addIndexOperationListener(IndexingOperationListener listener) { * Registers the given {@link Similarity} with the given name. * The function takes as parameters:
      *
    • settings for this similarity - *
    • version of Elasticsearch when the index was created + *
    • version of OpenSearch when the index was created *
    • ScriptService, for script-based similarities *
    * diff --git a/server/src/main/java/org/opensearch/index/IndexingSlowLog.java b/server/src/main/java/org/opensearch/index/IndexingSlowLog.java index 0e78358c9fb3e..e52a94c775071 100644 --- a/server/src/main/java/org/opensearch/index/IndexingSlowLog.java +++ b/server/src/main/java/org/opensearch/index/IndexingSlowLog.java @@ -80,7 +80,7 @@ public final class IndexingSlowLog implements IndexingOperationListener { /** * Reads how much of the source to log. The user can specify any value they * like and numbers are interpreted the maximum number of characters to log - * and everything else is interpreted as Elasticsearch interprets booleans + * and everything else is interpreted as OpenSearch interprets booleans * which is then converted to 0 for false and Integer.MAX_VALUE for true. */ public static final Setting INDEX_INDEXING_SLOWLOG_MAX_SOURCE_CHARS_TO_LOG_SETTING = diff --git a/server/src/main/java/org/opensearch/index/mapper/FieldNamesFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/FieldNamesFieldMapper.java index 839e6d9fc2717..3fe40ab4bb236 100644 --- a/server/src/main/java/org/opensearch/index/mapper/FieldNamesFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/FieldNamesFieldMapper.java @@ -39,8 +39,6 @@ /** * A mapper that indexes the field names of a document under _field_names. This mapper is typically useful in order * to have fast exists and missing queries/filters. - * - * Added in Elasticsearch 1.3. */ public class FieldNamesFieldMapper extends MetadataFieldMapper { diff --git a/server/src/main/java/org/opensearch/index/query/functionscore/RandomScoreFunctionBuilder.java b/server/src/main/java/org/opensearch/index/query/functionscore/RandomScoreFunctionBuilder.java index cd54e8fe74623..eaaf7bf533289 100644 --- a/server/src/main/java/org/opensearch/index/query/functionscore/RandomScoreFunctionBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/functionscore/RandomScoreFunctionBuilder.java @@ -166,7 +166,7 @@ protected ScoreFunction doToFunction(QueryShardContext context) { fieldType = context.getMapperService().fieldType(field); } else { deprecationLogger.deprecate("seed_requires_field", - "As of version 7.0 Elasticsearch will require that a [field] parameter is provided when a [seed] is set"); + "OpenSearch requires that a [field] parameter is provided when a [seed] is set"); fieldType = context.getMapperService().fieldType(IdFieldMapper.NAME); } if (fieldType == null) { diff --git a/server/src/main/java/org/opensearch/index/translog/Translog.java b/server/src/main/java/org/opensearch/index/translog/Translog.java index 7a0624e9d4a6d..dd115e582dacc 100644 --- a/server/src/main/java/org/opensearch/index/translog/Translog.java +++ b/server/src/main/java/org/opensearch/index/translog/Translog.java @@ -76,7 +76,7 @@ /** * A Translog is a per index shard component that records all non-committed index operations in a durable manner. * In OpenSearch there is one Translog instance per {@link org.opensearch.index.engine.InternalEngine}. - * Additionally, since Elasticsearch 2.0 the engine also records a {@link #TRANSLOG_UUID_KEY} with each commit to ensure a strong + * Additionally, the engine also records a {@link #TRANSLOG_UUID_KEY} with each commit to ensure a strong * association between the lucene index an the transaction log file. This UUID is used to prevent accidental recovery from a transaction * log that belongs to a * different engine. diff --git a/server/src/main/java/org/opensearch/search/aggregations/InternalAggregations.java b/server/src/main/java/org/opensearch/search/aggregations/InternalAggregations.java index 5b0c7261da99b..b45857f18bc2e 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/InternalAggregations.java +++ b/server/src/main/java/org/opensearch/search/aggregations/InternalAggregations.java @@ -78,7 +78,7 @@ private InternalAggregations(List aggregations) { * Constructs a node in the aggregation tree. * @param pipelineTreeSource must be null inside the tree or after final reduction. Should reference the * search request otherwise so we can properly serialize the response to - * versions of Elasticsearch that require the pipelines to be serialized. + * versions of OpenSearch that require the pipelines to be serialized. */ public InternalAggregations(List aggregations, Supplier pipelineTreeSource) { super(aggregations); diff --git a/server/src/test/java/org/opensearch/index/analysis/PreConfiguredTokenFilterTests.java b/server/src/test/java/org/opensearch/index/analysis/PreConfiguredTokenFilterTests.java index c291f40ca49e7..dafc4b716d748 100644 --- a/server/src/test/java/org/opensearch/index/analysis/PreConfiguredTokenFilterTests.java +++ b/server/src/test/java/org/opensearch/index/analysis/PreConfiguredTokenFilterTests.java @@ -69,7 +69,7 @@ public boolean incrementToken() { public void testCachingWithElasticsearchVersion() throws IOException { PreConfiguredTokenFilter pctf = - PreConfiguredTokenFilter.openSearchVersion("elasticsearch_version", randomBoolean(), + PreConfiguredTokenFilter.openSearchVersion("opensearch_version", randomBoolean(), (tokenStream, esVersion) -> new TokenFilter(tokenStream) { @Override public boolean incrementToken() { @@ -83,9 +83,9 @@ public boolean incrementToken() { Settings settings1 = Settings.builder().put(IndexMetadata.SETTING_VERSION_CREATED, version1) .build(); TokenFilterFactory tff_v1_1 = - pctf.get(indexSettings, TestEnvironment.newEnvironment(emptyNodeSettings), "elasticsearch_version", settings1); + pctf.get(indexSettings, TestEnvironment.newEnvironment(emptyNodeSettings), "opensearch_version", settings1); TokenFilterFactory tff_v1_2 = - pctf.get(indexSettings, TestEnvironment.newEnvironment(emptyNodeSettings), "elasticsearch_version", settings1); + pctf.get(indexSettings, TestEnvironment.newEnvironment(emptyNodeSettings), "opensearch_version", settings1); assertSame(tff_v1_1, tff_v1_2); Version version2 = randomValueOtherThan(version1, () -> randomFrom(VersionUtils.allVersions())); @@ -93,7 +93,7 @@ public boolean incrementToken() { .build(); TokenFilterFactory tff_v2 = - pctf.get(indexSettings, TestEnvironment.newEnvironment(emptyNodeSettings), "elasticsearch_version", settings2); + pctf.get(indexSettings, TestEnvironment.newEnvironment(emptyNodeSettings), "opensearch_version", settings2); assertNotSame(tff_v1_1, tff_v2); } diff --git a/server/src/test/java/org/opensearch/index/query/functionscore/ScoreFunctionBuilderTests.java b/server/src/test/java/org/opensearch/index/query/functionscore/ScoreFunctionBuilderTests.java index c5c8a2248cffb..585d8c8b0e999 100644 --- a/server/src/test/java/org/opensearch/index/query/functionscore/ScoreFunctionBuilderTests.java +++ b/server/src/test/java/org/opensearch/index/query/functionscore/ScoreFunctionBuilderTests.java @@ -65,6 +65,6 @@ public void testRandomScoreFunctionWithSeed() throws Exception { Mockito.when(mapperService.fieldType(Mockito.anyString())).thenReturn(ft); Mockito.when(context.getMapperService()).thenReturn(mapperService); builder.toFunction(context); - assertWarnings("As of version 7.0 Elasticsearch will require that a [field] parameter is provided when a [seed] is set"); + assertWarnings("OpenSearch requires that a [field] parameter is provided when a [seed] is set"); } } diff --git a/server/src/test/java/org/opensearch/indices/analysis/AnalysisModuleTests.java b/server/src/test/java/org/opensearch/indices/analysis/AnalysisModuleTests.java index 6cd1474038663..817eecc2c0a6c 100644 --- a/server/src/test/java/org/opensearch/indices/analysis/AnalysisModuleTests.java +++ b/server/src/test/java/org/opensearch/indices/analysis/AnalysisModuleTests.java @@ -253,13 +253,13 @@ public void testStandardFilterBWC() throws IOException { } /** - * Tests that plugins can register pre-configured char filters that vary in behavior based on Elasticsearch version, Lucene version, + * Tests that plugins can register pre-configured char filters that vary in behavior based on OpenSearch version, Lucene version, * and that do not vary based on version at all. */ public void testPluginPreConfiguredCharFilters() throws IOException { boolean noVersionSupportsMultiTerm = randomBoolean(); boolean luceneVersionSupportsMultiTerm = randomBoolean(); - boolean elasticsearchVersionSupportsMultiTerm = randomBoolean(); + boolean opensearchVersionSupportsMultiTerm = randomBoolean(); AnalysisRegistry registry = new AnalysisModule(TestEnvironment.newEnvironment(emptyNodeSettings), singletonList(new AnalysisPlugin() { @Override @@ -269,7 +269,7 @@ public List getPreConfiguredCharFilters() { tokenStream -> new AppendCharFilter(tokenStream, "no_version")), PreConfiguredCharFilter.luceneVersion("lucene_version", luceneVersionSupportsMultiTerm, (tokenStream, luceneVersion) -> new AppendCharFilter(tokenStream, luceneVersion.toString())), - PreConfiguredCharFilter.openSearchVersion("elasticsearch_version", elasticsearchVersionSupportsMultiTerm, + PreConfiguredCharFilter.openSearchVersion("opensearch_version", opensearchVersionSupportsMultiTerm, (tokenStream, esVersion) -> new AppendCharFilter(tokenStream, esVersion.toString())) ); } @@ -288,30 +288,30 @@ public Map> getTokenizers() { .put("index.analysis.analyzer.no_version.char_filter", "no_version") .put("index.analysis.analyzer.lucene_version.tokenizer", "keyword") .put("index.analysis.analyzer.lucene_version.char_filter", "lucene_version") - .put("index.analysis.analyzer.elasticsearch_version.tokenizer", "keyword") - .put("index.analysis.analyzer.elasticsearch_version.char_filter", "elasticsearch_version") + .put("index.analysis.analyzer.opensearch_version.tokenizer", "keyword") + .put("index.analysis.analyzer.opensearch_version.char_filter", "opensearch_version") .put(IndexMetadata.SETTING_VERSION_CREATED, version) .build()); assertTokenStreamContents(analyzers.get("no_version").tokenStream("", "test"), new String[] {"testno_version"}); assertTokenStreamContents(analyzers.get("lucene_version").tokenStream("", "test"), new String[] {"test" + version.luceneVersion}); - assertTokenStreamContents(analyzers.get("elasticsearch_version").tokenStream("", "test"), new String[] {"test" + version}); + assertTokenStreamContents(analyzers.get("opensearch_version").tokenStream("", "test"), new String[] {"test" + version}); assertEquals("test" + (noVersionSupportsMultiTerm ? "no_version" : ""), analyzers.get("no_version").normalize("", "test").utf8ToString()); assertEquals("test" + (luceneVersionSupportsMultiTerm ? version.luceneVersion.toString() : ""), analyzers.get("lucene_version").normalize("", "test").utf8ToString()); - assertEquals("test" + (elasticsearchVersionSupportsMultiTerm ? version.toString() : ""), - analyzers.get("elasticsearch_version").normalize("", "test").utf8ToString()); + assertEquals("test" + (opensearchVersionSupportsMultiTerm ? version.toString() : ""), + analyzers.get("opensearch_version").normalize("", "test").utf8ToString()); } /** - * Tests that plugins can register pre-configured token filters that vary in behavior based on Elasticsearch version, Lucene version, + * Tests that plugins can register pre-configured token filters that vary in behavior based on OpenSearch version, Lucene version, * and that do not vary based on version at all. */ public void testPluginPreConfiguredTokenFilters() throws IOException { boolean noVersionSupportsMultiTerm = randomBoolean(); boolean luceneVersionSupportsMultiTerm = randomBoolean(); - boolean elasticsearchVersionSupportsMultiTerm = randomBoolean(); + boolean opensearchVersionSupportsMultiTerm = randomBoolean(); AnalysisRegistry registry = new AnalysisModule(TestEnvironment.newEnvironment(emptyNodeSettings), singletonList(new AnalysisPlugin() { @Override @@ -321,7 +321,7 @@ public List getPreConfiguredTokenFilters() { tokenStream -> new AppendTokenFilter(tokenStream, "no_version")), PreConfiguredTokenFilter.luceneVersion("lucene_version", luceneVersionSupportsMultiTerm, (tokenStream, luceneVersion) -> new AppendTokenFilter(tokenStream, luceneVersion.toString())), - PreConfiguredTokenFilter.openSearchVersion("elasticsearch_version", elasticsearchVersionSupportsMultiTerm, + PreConfiguredTokenFilter.openSearchVersion("opensearch_version", opensearchVersionSupportsMultiTerm, (tokenStream, esVersion) -> new AppendTokenFilter(tokenStream, esVersion.toString())) ); } @@ -333,24 +333,24 @@ public List getPreConfiguredTokenFilters() { .put("index.analysis.analyzer.no_version.filter", "no_version") .put("index.analysis.analyzer.lucene_version.tokenizer", "standard") .put("index.analysis.analyzer.lucene_version.filter", "lucene_version") - .put("index.analysis.analyzer.elasticsearch_version.tokenizer", "standard") - .put("index.analysis.analyzer.elasticsearch_version.filter", "elasticsearch_version") + .put("index.analysis.analyzer.opensearch_version.tokenizer", "standard") + .put("index.analysis.analyzer.opensearch_version.filter", "opensearch_version") .put(IndexMetadata.SETTING_VERSION_CREATED, version) .build()); assertTokenStreamContents(analyzers.get("no_version").tokenStream("", "test"), new String[] {"testno_version"}); assertTokenStreamContents(analyzers.get("lucene_version").tokenStream("", "test"), new String[] {"test" + version.luceneVersion}); - assertTokenStreamContents(analyzers.get("elasticsearch_version").tokenStream("", "test"), new String[] {"test" + version}); + assertTokenStreamContents(analyzers.get("opensearch_version").tokenStream("", "test"), new String[] {"test" + version}); assertEquals("test" + (noVersionSupportsMultiTerm ? "no_version" : ""), analyzers.get("no_version").normalize("", "test").utf8ToString()); assertEquals("test" + (luceneVersionSupportsMultiTerm ? version.luceneVersion.toString() : ""), analyzers.get("lucene_version").normalize("", "test").utf8ToString()); - assertEquals("test" + (elasticsearchVersionSupportsMultiTerm ? version.toString() : ""), - analyzers.get("elasticsearch_version").normalize("", "test").utf8ToString()); + assertEquals("test" + (opensearchVersionSupportsMultiTerm ? version.toString() : ""), + analyzers.get("opensearch_version").normalize("", "test").utf8ToString()); } /** - * Tests that plugins can register pre-configured token filters that vary in behavior based on Elasticsearch version, Lucene version, + * Tests that plugins can register pre-configured token filters that vary in behavior based on OpenSearch version, Lucene version, * and that do not vary based on version at all. */ public void testPluginPreConfiguredTokenizers() throws IOException { @@ -392,7 +392,7 @@ public List getPreConfiguredTokenizers() { PreConfiguredTokenizer.singleton("no_version", () -> new FixedTokenizer("no_version")), PreConfiguredTokenizer.luceneVersion("lucene_version", luceneVersion -> new FixedTokenizer(luceneVersion.toString())), - PreConfiguredTokenizer.openSearchVersion("elasticsearch_version", + PreConfiguredTokenizer.openSearchVersion("opensearch_version", esVersion -> new FixedTokenizer(esVersion.toString())) ); } @@ -402,20 +402,20 @@ public List getPreConfiguredTokenizers() { IndexAnalyzers analyzers = getIndexAnalyzers(registry, Settings.builder() .put("index.analysis.analyzer.no_version.tokenizer", "no_version") .put("index.analysis.analyzer.lucene_version.tokenizer", "lucene_version") - .put("index.analysis.analyzer.elasticsearch_version.tokenizer", "elasticsearch_version") + .put("index.analysis.analyzer.opensearch_version.tokenizer", "opensearch_version") .put(IndexMetadata.SETTING_VERSION_CREATED, version) .build()); assertTokenStreamContents(analyzers.get("no_version").tokenStream("", "test"), new String[]{"no_version"}); assertTokenStreamContents(analyzers.get("lucene_version").tokenStream("", "test"), new String[]{version.luceneVersion.toString()}); - assertTokenStreamContents(analyzers.get("elasticsearch_version").tokenStream("", "test"), new String[]{version.toString()}); + assertTokenStreamContents(analyzers.get("opensearch_version").tokenStream("", "test"), new String[]{version.toString()}); // These are current broken by https://github.com/elastic/elasticsearch/issues/24752 // assertEquals("test" + (noVersionSupportsMultiTerm ? "no_version" : ""), // analyzers.get("no_version").normalize("", "test").utf8ToString()); // assertEquals("test" + (luceneVersionSupportsMultiTerm ? version.luceneVersion.toString() : ""), // analyzers.get("lucene_version").normalize("", "test").utf8ToString()); -// assertEquals("test" + (elasticsearchVersionSupportsMultiTerm ? version.toString() : ""), -// analyzers.get("elasticsearch_version").normalize("", "test").utf8ToString()); +// assertEquals("test" + (opensearchVersionSupportsMultiTerm ? version.toString() : ""), +// analyzers.get("opensearch_version").normalize("", "test").utf8ToString()); } public void testRegisterHunspellDictionary() throws Exception { diff --git a/server/src/test/java/org/opensearch/plugins/PluginInfoTests.java b/server/src/test/java/org/opensearch/plugins/PluginInfoTests.java index 67f748904d4b1..c4627364ab187 100644 --- a/server/src/test/java/org/opensearch/plugins/PluginInfoTests.java +++ b/server/src/test/java/org/opensearch/plugins/PluginInfoTests.java @@ -83,7 +83,7 @@ public void testReadFromPropertiesVersionMissing() throws Exception { assertThat(e.getMessage(), containsString("[version] is missing")); } - public void testReadFromPropertiesElasticsearchVersionMissing() throws Exception { + public void testReadFromPropertiesOpenSearchVersionMissing() throws Exception { Path pluginDir = createTempDir().resolve("fake-plugin"); PluginTestUtil.writePluginProperties(pluginDir, "description", "fake desc", @@ -119,7 +119,7 @@ public void testReadFromPropertiesBadJavaVersionFormat() throws Exception { " by \".\"'s and may have leading zeros but was 1.7.0_80")); } - public void testReadFromPropertiesBogusElasticsearchVersion() throws Exception { + public void testReadFromPropertiesBogusOpenSearchVersion() throws Exception { Path pluginDir = createTempDir().resolve("fake-plugin"); PluginTestUtil.writePluginProperties(pluginDir, "description", "fake desc", diff --git a/server/src/test/java/org/opensearch/plugins/PluginsServiceTests.java b/server/src/test/java/org/opensearch/plugins/PluginsServiceTests.java index 4290e9c0c63cf..69f26b1ea0511 100644 --- a/server/src/test/java/org/opensearch/plugins/PluginsServiceTests.java +++ b/server/src/test/java/org/opensearch/plugins/PluginsServiceTests.java @@ -615,11 +615,11 @@ public void testNonExtensibleDep() throws Exception { assertEquals("Plugin [myplugin] cannot extend non-extensible plugin [nonextensible]", e.getMessage()); } - public void testIncompatibleElasticsearchVersion() throws Exception { + public void testIncompatibleOpenSearchVersion() throws Exception { PluginInfo info = new PluginInfo("my_plugin", "desc", "1.0", Version.V_6_0_0, "1.8", "FakePlugin", Collections.emptyList(), false); IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> PluginsService.verifyCompatibility(info)); - assertThat(e.getMessage(), containsString("was built for Elasticsearch version 6.0.0")); + assertThat(e.getMessage(), containsString("was built for OpenSearch version 6.0.0")); } public void testIncompatibleJavaVersion() throws Exception { diff --git a/server/src/test/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryTests.java b/server/src/test/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryTests.java index ac649d9091fd8..7b2ac588f11c3 100644 --- a/server/src/test/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryTests.java +++ b/server/src/test/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryTests.java @@ -236,7 +236,7 @@ public void testFsRepositoryCompressDeprecated() { new FsRepository(metadata, useCompressEnvironment, null, BlobStoreTestUtil.mockClusterService(), null); - assertWarnings("[repositories.fs.compress] setting was deprecated in Elasticsearch and will be removed in a future release!" + + assertWarnings("[repositories.fs.compress] setting was deprecated in OpenSearch and will be removed in a future release!" + " See the breaking changes documentation for the next major version."); } diff --git a/server/src/test/java/org/opensearch/tasks/ListTasksResponseTests.java b/server/src/test/java/org/opensearch/tasks/ListTasksResponseTests.java index 7a8e22d75eef5..d8183ac2ec047 100644 --- a/server/src/test/java/org/opensearch/tasks/ListTasksResponseTests.java +++ b/server/src/test/java/org/opensearch/tasks/ListTasksResponseTests.java @@ -121,10 +121,10 @@ protected static void assertOnNodeFailures(List nodeFailure OpenSearchException newException = nodeFailures.get(i); OpenSearchException expectedException = expectedFailures.get(i); assertThat(newException.getMetadata("opensearch.node_id").get(0), equalTo(((FailedNodeException)expectedException).nodeId())); - assertThat(newException.getMessage(), equalTo("Elasticsearch exception [type=failed_node_exception, reason=error message]")); + assertThat(newException.getMessage(), equalTo("OpenSearch exception [type=failed_node_exception, reason=error message]")); assertThat(newException.getCause(), instanceOf(OpenSearchException.class)); OpenSearchException cause = (OpenSearchException) newException.getCause(); - assertThat(cause.getMessage(), equalTo("Elasticsearch exception [type=connect_exception, reason=null]")); + assertThat(cause.getMessage(), equalTo("OpenSearch exception [type=connect_exception, reason=null]")); } } @@ -139,7 +139,7 @@ protected static void assertOnTaskFailures(List taskFailur assertThat(newFailure.getStatus(), equalTo(expectedFailure.getStatus())); assertThat(newFailure.getCause(), instanceOf(OpenSearchException.class)); OpenSearchException cause = (OpenSearchException) newFailure.getCause(); - assertThat(cause.getMessage(), equalTo("Elasticsearch exception [type=illegal_state_exception, reason=null]")); + assertThat(cause.getMessage(), equalTo("OpenSearch exception [type=illegal_state_exception, reason=null]")); } } diff --git a/test/external-modules/delayed-aggs/src/internalClusterTest/java/org/opensearch/search/aggregations/DelayedShardAggregationIT.java b/test/external-modules/delayed-aggs/src/internalClusterTest/java/org/opensearch/search/aggregations/DelayedShardAggregationIT.java index 78df6373a005d..c512cec86681e 100644 --- a/test/external-modules/delayed-aggs/src/internalClusterTest/java/org/opensearch/search/aggregations/DelayedShardAggregationIT.java +++ b/test/external-modules/delayed-aggs/src/internalClusterTest/java/org/opensearch/search/aggregations/DelayedShardAggregationIT.java @@ -32,7 +32,7 @@ import java.util.Collection; import java.util.List; -import static org.opensearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; diff --git a/test/framework/src/main/java/org/opensearch/common/logging/TestThreadInfoPatternConverter.java b/test/framework/src/main/java/org/opensearch/common/logging/TestThreadInfoPatternConverter.java index 7064a9b3b9068..b65bc861b9d63 100644 --- a/test/framework/src/main/java/org/opensearch/common/logging/TestThreadInfoPatternConverter.java +++ b/test/framework/src/main/java/org/opensearch/common/logging/TestThreadInfoPatternConverter.java @@ -61,7 +61,7 @@ public void format(LogEvent event, StringBuilder toAppendTo) { } } - private static final Pattern ELASTICSEARCH_THREAD_NAME_PATTERN = + private static final Pattern OPENSEARCH_THREAD_NAME_PATTERN = Pattern.compile("opensearch\\[(.+)\\]\\[.+\\].+"); private static final Pattern TEST_THREAD_NAME_PATTERN = Pattern.compile("TEST-.+\\.(.+)-seed#\\[.+\\]"); @@ -71,7 +71,7 @@ public void format(LogEvent event, StringBuilder toAppendTo) { Pattern.compile("test_SUITE-CHILD_VM.+cluster\\[T#(.+)\\]"); static String threadInfo(String threadName) { - Matcher m = ELASTICSEARCH_THREAD_NAME_PATTERN.matcher(threadName); + Matcher m = OPENSEARCH_THREAD_NAME_PATTERN.matcher(threadName); if (m.matches()) { // Thread looks like a node thread so use the node name return m.group(1); diff --git a/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java index 64af06ff6388d..be643e86eb660 100644 --- a/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java +++ b/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java @@ -189,7 +189,7 @@ *

    * The Cluster is bound to a test lifecycle where tests must call {@link #beforeTest(java.util.Random, double)} and * {@link #afterTest()} to initialize and reset the cluster in order to be more reproducible. The term "more" relates - * to the async nature of Elasticsearch in combination with randomized testing. Once Threads and asynchronous calls + * to the async nature of OpenSearch in combination with randomized testing. Once Threads and asynchronous calls * are involved reproducibility is very limited. This class should only be used through {@link OpenSearchIntegTestCase}. *

    */ diff --git a/test/framework/src/main/java/org/opensearch/test/rest/yaml/OpenSearchClientYamlSuiteTestCase.java b/test/framework/src/main/java/org/opensearch/test/rest/yaml/OpenSearchClientYamlSuiteTestCase.java index cac66a73f2210..136b866ff0bfb 100644 --- a/test/framework/src/main/java/org/opensearch/test/rest/yaml/OpenSearchClientYamlSuiteTestCase.java +++ b/test/framework/src/main/java/org/opensearch/test/rest/yaml/OpenSearchClientYamlSuiteTestCase.java @@ -61,7 +61,7 @@ import java.util.Set; /** - * Runs a suite of yaml tests shared with all the official Elasticsearch + * Runs a suite of yaml tests shared with all the official OpenSearch * clients against against an opensearch cluster. * * The suite timeout is extended to account for projects with a large number of tests. diff --git a/test/framework/src/main/java/org/opensearch/test/rest/yaml/package-info.java b/test/framework/src/main/java/org/opensearch/test/rest/yaml/package-info.java index cddd8737fc1f7..1782b58485878 100644 --- a/test/framework/src/main/java/org/opensearch/test/rest/yaml/package-info.java +++ b/test/framework/src/main/java/org/opensearch/test/rest/yaml/package-info.java @@ -18,7 +18,7 @@ */ /** - * Infrastructure to run suites of tests written in YAML against a running Elasticsearch cluster using Elasticsearch's low level REST - * client. The YAML tests are run by all official clients and serve as tests for both Elasticsearch and the clients. + * Infrastructure to run suites of tests written in YAML against a running OpenSearch cluster using OpenSearch's low level REST + * client. The YAML tests are run by all official clients and serve as tests for both OpenSearch and the clients. */ package org.opensearch.test.rest.yaml; diff --git a/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/ClientYamlSuiteRestApi.java b/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/ClientYamlSuiteRestApi.java index 88f47cb4eb82a..e7bf8f9591e8a 100644 --- a/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/ClientYamlSuiteRestApi.java +++ b/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/ClientYamlSuiteRestApi.java @@ -33,7 +33,7 @@ import java.util.Set; /** - * Specification of an Elasticsearch endpoint used by the YAML specs to generate REST requests. + * Specification of an OpenSearch endpoint used by the YAML specs to generate REST requests. */ public class ClientYamlSuiteRestApi { diff --git a/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/ClientYamlSuiteRestSpec.java b/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/ClientYamlSuiteRestSpec.java index 1dbb84b50f50e..4baa29e1ce12d 100644 --- a/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/ClientYamlSuiteRestSpec.java +++ b/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/ClientYamlSuiteRestSpec.java @@ -62,15 +62,15 @@ public Collection getApis() { } /** - * Returns whether the provided parameter is one of those parameters that are supported by all Elasticsearch api + * Returns whether the provided parameter is one of those parameters that are supported by all OpenSearch api */ public boolean isGlobalParameter(String param) { return globalParameters.contains(param); } /** - * Returns whether the provided parameter is one of those parameters that are supported by the Elasticsearch language clients, meaning - * that they influence the client behaviour and don't get sent to Elasticsearch + * Returns whether the provided parameter is one of those parameters that are supported by the OpenSearch language clients, meaning + * that they influence the client behaviour and don't get sent to OpenSearch */ public boolean isClientParameter(String name) { return "ignore".equals(name); diff --git a/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/package-info.java b/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/package-info.java index 99441108fc318..7d950a955176b 100644 --- a/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/package-info.java +++ b/test/framework/src/main/java/org/opensearch/test/rest/yaml/restspec/package-info.java @@ -18,6 +18,6 @@ */ /** - * Specification of REST endpoints used to convert YAML {@code do} sections into actual calls to Elasticsearch. + * Specification of REST endpoints used to convert YAML {@code do} sections into actual calls to OpenSearch. */ package org.opensearch.test.rest.yaml.restspec;