Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-22669 Change maven.compiler.source to 11 #11432

Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/commit-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ '8', '11' ]
java: [ '11' ]
name: Check java code on JDK ${{ matrix.java }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -63,7 +63,6 @@ jobs:
./mvnw test-compile -Pall-java,licenses,lgpl,checkstyle,examples,all-scala,scala,check-licenses -B -V

- name: Run abandoned tests checks.
if: ${{ matrix.java == '8' }}
run : |
./mvnw test -Pcheck-test-suites,all-java,all-scala,scala -B -V

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 8
java-version: 11
distribution: 'adopt'
server-id: apache.snapshots.https
server-username: NEXUS_USER
Expand Down
4 changes: 2 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Instructions on how to start examples can be found in [README.txt](README.txt).

How to start examples in the developer's environment, please see [DEVNOTES.txt](DEVNOTES.txt).

## Running examples on JDK 9/10/11
Ignite uses proprietary SDK APIs that are not available by default. See also [How to run Ignite on JDK 9,10 and 11](https://ignite.apache.org/docs/latest/setup#running-ignite-with-java-11-or-later)
## Running examples
Ignite uses proprietary SDK APIs that are not available by default. See also [How to run Ignite](https://ignite.apache.org/docs/latest/setup#running-ignite-with-java-11-or-later)

To set up local IDE to easier access to examples, it is possible to add following options as default for all applications

Expand Down
4 changes: 2 additions & 2 deletions examples/pom-standalone-lgpl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<modelVersion>4.0.0</modelVersion>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

Expand Down
4 changes: 2 additions & 2 deletions examples/pom-standalone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<modelVersion>4.0.0</modelVersion>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

Expand Down
4 changes: 2 additions & 2 deletions modules/checkstyle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
<version>${revision}</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.flatten.file.name>pom-installed.xml</maven.flatten.file.name>
<revision>2.17.0-SNAPSHOT</revision>
<checkstyle.puppycrawl.version>8.45</checkstyle.puppycrawl.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,7 @@ public void testCustomCiphersOnServer() throws Exception {
* @throws Exception If failed.
*
* Note: Disabled cipher suite can be enabled via Java Security property "jdk.tls.disabledAlgorithms" or in
* &lt;JRE_8_HOME&gt;/lib/security/java.security file.
*
* Note: java.security file location may be changed for Java 9+ version
* &lt;JAVA_HOME&gt;/conf/security/java.security file.
*/
@Test
public void testDisabledCustomCipher() throws Exception {
Expand Down Expand Up @@ -373,9 +371,7 @@ public void testDisabledCustomCipher() throws Exception {
* @throws Exception If failed.
*
* Note: Disabled cipher suite can be enabled via Java Security property "jdk.tls.disabledAlgorithms" or in
* &lt;JRE_8_HOME&gt;/lib/security/java.security file.
*
* Note: java.security file location may be changed for Java 9+ version
* &lt;JAVA_HOME&gt;/conf/security/java.security file.
*/
@Test
public void testUnsupportedCustomCipher() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void testNodeStartByOldVersionPersistenceData() throws Exception {
Assume.assumeTrue("Skipped on jdk " + U.jdkVersion(),
VER_2_12_0.compareTo(IgniteReleasedVersion.fromString(version)) < 0);
}
else if (majorJavaVer > 8) {
else if (majorJavaVer == 11) {
nizhikov marked this conversation as resolved.
Show resolved Hide resolved
Assume.assumeTrue("Skipped on jdk " + U.jdkVersion(),
VER_2_3_0.compareTo(IgniteReleasedVersion.fromString(version)) < 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.ignite.internal.processors.platform.memory;

import org.apache.ignite.internal.util.GridCleaner;
import java.lang.ref.Cleaner;

import static org.apache.ignite.internal.processors.platform.memory.PlatformMemoryUtils.POOL_HDR_OFF_MEM_1;
import static org.apache.ignite.internal.processors.platform.memory.PlatformMemoryUtils.POOL_HDR_OFF_MEM_2;
Expand Down Expand Up @@ -50,7 +50,8 @@ public class PlatformMemoryPool {
public PlatformMemoryPool() {
poolPtr = allocatePool();

GridCleaner.create(this, new CleanerRunnable(poolPtr));
Cleaner cleaner = Cleaner.create();
cleaner.register(this, new CleanerRunnable(poolPtr));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ public class JvmConfigurationSuggestions {
/** */
private static final String SERVER = "-server";

/** */
private static final String USE_G1_GC = "-XX:+UseG1GC";

/**
* Checks JVM configurations and produces tuning suggestions.
*
Expand All @@ -58,12 +55,6 @@ public static synchronized List<String> getSuggestions() {
if (!U.jvmName().toLowerCase().contains("server"))
suggestions.add("Enable server mode for JVM (add '" + SERVER + "' to JVM options)");

if (!"11".equals(U.jdkVersion()))
suggestions.add("Switch to the most recent 11 JVM version");

if (U.jdkVersion().equals("1.8") && !args.contains(USE_G1_GC))
suggestions.add("Enable G1 Garbage Collector (add '" + USE_G1_GC + "' to JVM options)");

if (!anyStartWith(args, XMX) && !anyStartWith(args, MX))
suggestions.add("Specify JVM heap max size (add '" + XMX + "<size>[g|G|m|M|k|K]' to JVM options)");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* initialization effects.
*/
public class FeatureChecker {
/** Required Options to Run on Java 9, 10, 11. */
public static final String JAVA_9_10_11_OPTIONS = "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED\n" +
/** Required Options to Run on Java 11. */
public static final String JAVA_11_OPTIONS = "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED\n" +
"--add-exports=java.base/sun.nio.ch=ALL-UNNAMED\n" +
"--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED\n" +
"--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED\n" +
Expand Down Expand Up @@ -57,7 +57,7 @@ public class FeatureChecker {
/** Java version specific warning to be added in case access failed */
public static final String JAVA_VER_SPECIFIC_WARN =
"\nPlease add the following parameters to JVM startup settings and restart the application: {parameters: " +
JAVA_9_10_11_OPTIONS +
JAVA_11_OPTIONS +
"\n}" +
"\nSee https://apacheignite.readme.io/docs/getting-started#section-running-ignite-with-java-9-10-11 for more information.";
"\nSee https://ignite.apache.org/docs/latest/quick-start/java#running-ignite-with-java-11-or-later for more information.";
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ public abstract class GridUnsafe {
private static final boolean HAS_JAVA_NIO_ACCESS_MEMORY_SEGMENT_PARAM = majorJavaVersion(jdkVersion()) >= 19;

/** Cleaner code for direct {@code java.nio.ByteBuffer}. */
private static final DirectBufferCleaner DIRECT_BUF_CLEANER =
majorJavaVersion(jdkVersion()) < 9
? new ReflectiveDirectBufferCleaner()
: new UnsafeDirectBufferCleaner();
private static final DirectBufferCleaner DIRECT_BUF_CLEANER = new UnsafeDirectBufferCleaner();

/** JavaNioAccess object. If {@code null} then {@link #NEW_DIRECT_BUF_CONSTRUCTOR} should be available. */
@Nullable private static final Object JAVA_NIO_ACCESS_OBJ;
Expand Down Expand Up @@ -1684,9 +1681,6 @@ private static Method newDirectBufferMethod(Object nioAccessObj) {
@NotNull private static String getSharedSecretsPackage() {
int javaVer = majorJavaVersion(jdkVersion());

if (javaVer < 9)
return "sun.misc";

if (javaVer < 12)
return "jdk.internal.misc";

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
import org.apache.ignite.internal.processors.metastorage.persistence.DmsDataWriterWorkerTest;
import org.apache.ignite.internal.processors.metastorage.persistence.InMemoryCachedDistributedMetaStorageBridgeTest;
import org.apache.ignite.internal.suggestions.JvmConfigurationSuggestionsTest;
import org.apache.ignite.internal.util.GridCleanerTest;
import org.apache.ignite.internal.util.collection.BitSetIntSetTest;
import org.apache.ignite.internal.util.collection.ImmutableIntSetTest;
import org.apache.ignite.internal.util.collection.IntHashMapTest;
Expand Down Expand Up @@ -155,8 +154,6 @@

IgniteRejectConnectOnNodeStopTest.class,

GridCleanerTest.class,

ClassSetTest.class,

// Basic failure handlers.
Expand Down
4 changes: 2 additions & 2 deletions modules/numa-allocator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ $ sudo apt install numactl
1. `RHEL` or `Cent OS`
```bash
$ sudo yum groupinstall 'Development Tools'
$ sudo yum install java-1.8.0-openjdk numactl-devel libstdc++-static
$ sudo yum install java-11-openjdk numactl-devel libstdc++-static
```
2. `Ubuntu` or `Debian`
```bash
$ sudo apt install build-essential libnuma-dev openjdk-8-jdk
$ sudo apt install build-essential libnuma-dev openjdk-11-jdk
```
## Usage
### Simple allocation strategy
Expand Down
2 changes: 1 addition & 1 deletion modules/platforms/dotnet/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Requirements

* [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet-core)
* [JDK 8](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html) or [JDK 11](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)
* [JDK 11](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)

Windows, Linux, and macOS are supported.

Expand Down
Loading