diff --git a/.ci/java-versions.properties b/.ci/java-versions.properties index 58f83003994e3..f73122ee21a6b 100644 --- a/.ci/java-versions.properties +++ b/.ci/java-versions.properties @@ -14,6 +14,6 @@ # are 'java' or 'openjdk' followed by the major release number. OPENSEARCH_BUILD_JAVA=openjdk11 -OPENSEARCH_RUNTIME_JAVA=java8 +OPENSEARCH_RUNTIME_JAVA=java11 GRADLE_TASK=build GRADLE_EXTRA_ARGS= diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 381c7c64077cd..701b60cf24276 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -3,7 +3,7 @@ - [Git Clone OpenSearch Repo](#git-clone-opensearch-repo) - [Install Prerequisites](#install-prerequisites) - [JDK 11](#jdk-11) - - [JDK 8 and 14](#jdk-8-and-14) + - [JDK 14](#jdk-14) - [Runtime JDK](#runtime-jdk) - [Windows](#windows) - [Docker](#docker) @@ -65,13 +65,13 @@ OpenSearch builds using Java 11 at a minimum. This means you must have a JDK 11 Download Java 11 from [here](https://adoptium.net/releases.html?variant=openjdk11). -#### JDK 8 and 14 +#### JDK 14 -To run the full suite of tests, download and install [JDK 8](https://adoptium.net/releases.html?variant=openjdk8) and [JDK 14](https://jdk.java.net/archive/) and set `JAVA8_HOME`, `JAVA11_HOME`, and `JAVA14_HOME`. They are required by the [backwards compatibility test](./TESTING.md#testing-backwards-compatibility). +To run the full suite of tests, download and install [JDK 14](https://jdk.java.net/archive/) and set `JAVA11_HOME`, and `JAVA14_HOME`. They are required by the [backwards compatibility test](./TESTING.md#testing-backwards-compatibility). #### Runtime JDK -By default, the test tasks use bundled JDK runtime, configured in `buildSrc/version.properties` and set to JDK 17 (LTS). Other kind of test tasks (integration, cluster, ... ) use the same runtime as `JAVA_HOME`. However, since OpenSearch supports JDK 8 as the runtime, the build supports compiling with JDK 11 and testing on a different version of JDK runtime. To do this, set `RUNTIME_JAVA_HOME` pointing to the Java home of another JDK installation, e.g. `RUNTIME_JAVA_HOME=/usr/lib/jvm/jdk-8`. Alternatively, the runtime JDK version could be provided as the command line argument, using combination of `runtime.java=` property and `JAVA_HOME` environment variable, for example `./gradlew -Druntime.java=17 ...` (in this case, the tooling expects `JAVA17_HOME` environment variable to be set). +By default, the test tasks use bundled JDK runtime, configured in `buildSrc/version.properties` and set to JDK 17 (LTS). Other kind of test tasks (integration, cluster, ... ) use the same runtime as `JAVA_HOME`. However, the build supports compiling with JDK 11 and testing on a different version of JDK runtime. To do this, set `RUNTIME_JAVA_HOME` pointing to the Java home of another JDK installation, e.g. `RUNTIME_JAVA_HOME=/usr/lib/jvm/jdk-14`. Alternatively, the runtime JDK version could be provided as the command line argument, using combination of `runtime.java=` property and `JAVA_HOME` environment variable, for example `./gradlew -Druntime.java=17 ...` (in this case, the tooling expects `JAVA17_HOME` environment variable to be set). #### Windows diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 575aca98e436f..6b88134c9aaa6 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -158,8 +158,8 @@ if (project != rootProject) { apply plugin: 'opensearch.publish' allprojects { - targetCompatibility = 10 - sourceCompatibility = 10 + targetCompatibility = 11 + sourceCompatibility = 11 } // groovydoc succeeds, but has some weird internal exception... diff --git a/buildSrc/src/integTest/resources/org/opensearch/gradle/internal/fake_git/remote/.ci/java-versions.properties b/buildSrc/src/integTest/resources/org/opensearch/gradle/internal/fake_git/remote/.ci/java-versions.properties index ded62500f1d30..97dbc8f7ced11 100644 --- a/buildSrc/src/integTest/resources/org/opensearch/gradle/internal/fake_git/remote/.ci/java-versions.properties +++ b/buildSrc/src/integTest/resources/org/opensearch/gradle/internal/fake_git/remote/.ci/java-versions.properties @@ -28,5 +28,5 @@ # under the License. # OPENSEARCH_BUILD_JAVA=openjdk11 -OPENSEARCH_RUNTIME_JAVA=java8 +OPENSEARCH_RUNTIME_JAVA=java11 GRADLE_TASK=build diff --git a/client/rest-high-level/src/main/java/org/opensearch/client/IndicesClient.java b/client/rest-high-level/src/main/java/org/opensearch/client/IndicesClient.java index 360c0481e619f..00b07fc4881bd 100644 --- a/client/rest-high-level/src/main/java/org/opensearch/client/IndicesClient.java +++ b/client/rest-high-level/src/main/java/org/opensearch/client/IndicesClient.java @@ -1867,7 +1867,6 @@ public Cancellable simulateIndexTemplateAsync( /** * Validate a potentially expensive query without executing it. - *

* * @param validateQueryRequest the request * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized @@ -1886,7 +1885,6 @@ public ValidateQueryResponse validateQuery(ValidateQueryRequest validateQueryReq /** * Asynchronously validate a potentially expensive query without executing it. - *

* * @param validateQueryRequest the request * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized diff --git a/client/rest-high-level/src/main/java/org/opensearch/client/IngestClient.java b/client/rest-high-level/src/main/java/org/opensearch/client/IngestClient.java index 93dd3513a4614..cd304019e771c 100644 --- a/client/rest-high-level/src/main/java/org/opensearch/client/IngestClient.java +++ b/client/rest-high-level/src/main/java/org/opensearch/client/IngestClient.java @@ -175,7 +175,6 @@ public Cancellable deletePipelineAsync( /** * Simulate a pipeline on a set of documents provided in the request - *

* * @param request the request * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized @@ -194,7 +193,6 @@ public SimulatePipelineResponse simulate(SimulatePipelineRequest request, Reques /** * Asynchronously simulate a pipeline on a set of documents provided in the request - *

* * @param request the request * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized diff --git a/client/rest-high-level/src/main/java/org/opensearch/client/SnapshotClient.java b/client/rest-high-level/src/main/java/org/opensearch/client/SnapshotClient.java index c702fcda89e5d..85a793dec24ce 100644 --- a/client/rest-high-level/src/main/java/org/opensearch/client/SnapshotClient.java +++ b/client/rest-high-level/src/main/java/org/opensearch/client/SnapshotClient.java @@ -293,7 +293,6 @@ public CreateSnapshotResponse create(CreateSnapshotRequest createSnapshotRequest /** * Asynchronously creates a snapshot. - *

* * @return cancellable that may be used to cancel the request */ @@ -327,7 +326,6 @@ public AcknowledgedResponse clone(CloneSnapshotRequest cloneSnapshotRequest, Req /** * Asynchronously clones a snapshot. - *

* * @return cancellable that may be used to cancel the request */ diff --git a/gradle.properties b/gradle.properties index 0974eb6d6b7da..53b593923ce26 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,12 @@ org.gradle.warning.mode=none org.gradle.parallel=true -org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m +org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Xss2m \ + --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED options.forkOptions.memoryMaximumSize=2g # Disable duplicate project id detection diff --git a/plugins/analysis-icu/src/main/java/org/opensearch/index/analysis/IndexableBinaryStringTools.java b/plugins/analysis-icu/src/main/java/org/opensearch/index/analysis/IndexableBinaryStringTools.java index eb7e006857f07..c473ca53c6404 100644 --- a/plugins/analysis-icu/src/main/java/org/opensearch/index/analysis/IndexableBinaryStringTools.java +++ b/plugins/analysis-icu/src/main/java/org/opensearch/index/analysis/IndexableBinaryStringTools.java @@ -48,7 +48,6 @@ * padding is indistinguishable from valid information. To overcome this * problem, a char is appended, indicating the number of encoded bytes in the * final content char. - *

* * @deprecated Implement {@link TermToBytesRefAttribute} and store bytes directly * instead. This class WAS removed in Lucene 5.0