Adding support for JDK17 and removing JDK8 (#2025)
* Adding support for JDK17 and removing JDK8 Signed-off-by: Martin Gaievski <gaievski@amazon.com> * Merge overlaping PR, bumping min java version to 11 Signed-off-by: Martin Gaievski <gaievski@amazon.com> * Removing references to JDK8 from dev guide Signed-off-by: Martin Gaievski <gaievski@amazon.com>
This commit is contained in:
parent
270c59f523
commit
309397520c
|
@ -14,6 +14,6 @@
|
||||||
# are 'java' or 'openjdk' followed by the major release number.
|
# are 'java' or 'openjdk' followed by the major release number.
|
||||||
|
|
||||||
OPENSEARCH_BUILD_JAVA=openjdk11
|
OPENSEARCH_BUILD_JAVA=openjdk11
|
||||||
OPENSEARCH_RUNTIME_JAVA=java8
|
OPENSEARCH_RUNTIME_JAVA=java11
|
||||||
GRADLE_TASK=build
|
GRADLE_TASK=build
|
||||||
GRADLE_EXTRA_ARGS=
|
GRADLE_EXTRA_ARGS=
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
- [Git Clone OpenSearch Repo](#git-clone-opensearch-repo)
|
- [Git Clone OpenSearch Repo](#git-clone-opensearch-repo)
|
||||||
- [Install Prerequisites](#install-prerequisites)
|
- [Install Prerequisites](#install-prerequisites)
|
||||||
- [JDK 11](#jdk-11)
|
- [JDK 11](#jdk-11)
|
||||||
- [JDK 8 and 14](#jdk-8-and-14)
|
- [JDK 14](#jdk-14)
|
||||||
- [Runtime JDK](#runtime-jdk)
|
- [Runtime JDK](#runtime-jdk)
|
||||||
- [Windows](#windows)
|
- [Windows](#windows)
|
||||||
- [Docker](#docker)
|
- [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).
|
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
|
#### 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=<major JDK version>` property and `JAVA<major JDK version>_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=<major JDK version>` property and `JAVA<major JDK version>_HOME` environment variable, for example `./gradlew -Druntime.java=17 ...` (in this case, the tooling expects `JAVA17_HOME` environment variable to be set).
|
||||||
|
|
||||||
#### Windows
|
#### Windows
|
||||||
|
|
||||||
|
|
|
@ -158,8 +158,8 @@ if (project != rootProject) {
|
||||||
apply plugin: 'opensearch.publish'
|
apply plugin: 'opensearch.publish'
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
targetCompatibility = 10
|
targetCompatibility = 11
|
||||||
sourceCompatibility = 10
|
sourceCompatibility = 11
|
||||||
}
|
}
|
||||||
|
|
||||||
// groovydoc succeeds, but has some weird internal exception...
|
// groovydoc succeeds, but has some weird internal exception...
|
||||||
|
|
|
@ -28,5 +28,5 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
OPENSEARCH_BUILD_JAVA=openjdk11
|
OPENSEARCH_BUILD_JAVA=openjdk11
|
||||||
OPENSEARCH_RUNTIME_JAVA=java8
|
OPENSEARCH_RUNTIME_JAVA=java11
|
||||||
GRADLE_TASK=build
|
GRADLE_TASK=build
|
||||||
|
|
|
@ -1867,7 +1867,6 @@ public final class IndicesClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate a potentially expensive query without executing it.
|
* Validate a potentially expensive query without executing it.
|
||||||
* <p>
|
|
||||||
*
|
*
|
||||||
* @param validateQueryRequest the request
|
* @param validateQueryRequest the request
|
||||||
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
|
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
|
||||||
|
@ -1886,7 +1885,6 @@ public final class IndicesClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asynchronously validate a potentially expensive query without executing it.
|
* Asynchronously validate a potentially expensive query without executing it.
|
||||||
* <p>
|
|
||||||
*
|
*
|
||||||
* @param validateQueryRequest the request
|
* @param validateQueryRequest the request
|
||||||
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
|
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
|
||||||
|
|
|
@ -175,7 +175,6 @@ public final class IngestClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simulate a pipeline on a set of documents provided in the request
|
* Simulate a pipeline on a set of documents provided in the request
|
||||||
* <p>
|
|
||||||
*
|
*
|
||||||
* @param request the request
|
* @param request the request
|
||||||
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
|
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
|
||||||
|
@ -194,7 +193,6 @@ public final class IngestClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asynchronously simulate a pipeline on a set of documents provided in the request
|
* Asynchronously simulate a pipeline on a set of documents provided in the request
|
||||||
* <p>
|
|
||||||
*
|
*
|
||||||
* @param request the request
|
* @param request the request
|
||||||
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
|
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
|
||||||
|
|
|
@ -293,7 +293,6 @@ public final class SnapshotClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asynchronously creates a snapshot.
|
* Asynchronously creates a snapshot.
|
||||||
* <p>
|
|
||||||
*
|
*
|
||||||
* @return cancellable that may be used to cancel the request
|
* @return cancellable that may be used to cancel the request
|
||||||
*/
|
*/
|
||||||
|
@ -327,7 +326,6 @@ public final class SnapshotClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asynchronously clones a snapshot.
|
* Asynchronously clones a snapshot.
|
||||||
* <p>
|
|
||||||
*
|
*
|
||||||
* @return cancellable that may be used to cancel the request
|
* @return cancellable that may be used to cancel the request
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,7 +11,12 @@
|
||||||
|
|
||||||
org.gradle.warning.mode=none
|
org.gradle.warning.mode=none
|
||||||
org.gradle.parallel=true
|
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
|
options.forkOptions.memoryMaximumSize=2g
|
||||||
|
|
||||||
# Disable duplicate project id detection
|
# Disable duplicate project id detection
|
||||||
|
|
|
@ -48,7 +48,6 @@ import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
|
||||||
* padding is indistinguishable from valid information. To overcome this
|
* padding is indistinguishable from valid information. To overcome this
|
||||||
* problem, a char is appended, indicating the number of encoded bytes in the
|
* problem, a char is appended, indicating the number of encoded bytes in the
|
||||||
* final content char.
|
* final content char.
|
||||||
* <p>
|
|
||||||
*
|
*
|
||||||
* @deprecated Implement {@link TermToBytesRefAttribute} and store bytes directly
|
* @deprecated Implement {@link TermToBytesRefAttribute} and store bytes directly
|
||||||
* instead. This class WAS removed in Lucene 5.0
|
* instead. This class WAS removed in Lucene 5.0
|
||||||
|
|
Loading…
Reference in New Issue