Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
13 changes: 11 additions & 2 deletions .github/workflows/auto-jdk-os-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
jdk: [ 8 ]
jdk: [ 8, 11 ]
os: [ windows-latest, ubuntu-latest, macos-latest ]
include:
- os: windows-latest
Expand All @@ -28,9 +28,18 @@ jobs:
- os: macos-latest
arch: aarch64

- jdk: 8
distribution: 'zulu'
jvm_args: ""
- jdk: 11
distribution: 'zulu'
jvm_args: "--add-exports java.base/jdk.internal.misc=org.apache.datasketches.memory --add-exports java.base/jdk.internal.ref=org.apache.datasketches.memory --add-opens java.base/java.nio=org.apache.datasketches.memory --add-opens java.base/sun.nio.ch=org.apache.datasketches.memory"

# Reference the reusable workflow on the "workflows" branch
uses: apache/datasketches-memory/.github/workflows/reusable-jdk-os-matrix.yml@workflows
with:
jdk_version: ${{ matrix.jdk }}
os_type: ${{ matrix.os }}
java_arch: ${{ matrix.arch }}
cpu_arch: ${{ matrix.arch }}
jdk_distribution: ${{ matrix.distribution }}
jvm_args: ${{ matrix.jvm_args }}
2 changes: 1 addition & 1 deletion .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
distribution: 'zulu'
java-package: jdk
architecture: x64
cache: 'maven'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ datasketches-memory*/.gitignore
.classpath
.project
.settings/
.factorypath
.checkstyle

# IntelliJ project files
Expand Down
9 changes: 9 additions & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# suppresses the warning:
# Direct modification of testCompileSourceRoots through add() is deprecated and will not work in Maven 4.0.0. Please use the add/remove methods instead.
# If you're using a plugin that causes this warning, please upgrade to the latest version and report an issue if the warning persists.
# To disable these warnings, set -Dmaven.project.sourceRoots.warningsDisabled=true on the command line or in the .mvn/maven.config file.
-Dmaven.project.sourceRoots.warningsDisabled=true
-Dproject.root=${session.rootDirectory}
--no-transfer-progress
--batch-mode
-Dstyle.color=always
128 changes: 108 additions & 20 deletions datasketches-memory-java11/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,60 +17,148 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.datasketches</groupId>
<artifactId>datasketches-memory</artifactId>
<version>3.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>datasketches-memory-java11</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging>

<properties>
<!-- Test -->
<testng.version>7.12.0</testng.version>
<java.version>11</java.version>
<jdk-toolchain.version>11</jdk-toolchain.version>

<jdk-toolchain.version>${java.version}</jdk-toolchain.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.javadoc.skip>true</maven.javadoc.skip>
<maven.javadoc.skip>false</maven.javadoc.skip>
<maven.compiler.showWarnings>true</maven.compiler.showWarnings>
<!-- jdk.internal.misc is used to call public Unsafe & public VM -->
<arg.jdk.internal.misc>--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED</arg.jdk.internal.misc>
<!-- jdk.internal.ref is used to call public Cleaner -->
<arg.jdk.internal.ref>--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED</arg.jdk.internal.ref>
<!-- sun.nio.ch.exports is used to open FileChannelImpl for DirectBuffer-->
<arg.sun.nio.ch.exports>--add-exports=java.base/sun.nio.ch=ALL-UNNAMED</arg.sun.nio.ch.exports>
<!-- sun.nio.ch.opens is used to open FileChannelImpl for map0 & unmap0 for reflection-->
<arg.sun.nio.ch.opens>--add-opens=java.base/sun.nio.ch=ALL-UNNAMED</arg.sun.nio.ch.opens>
<!-- java.nio is used to open MappedByteBuffer load0, isloaded0, & force0 for reflection -->
<arg.java.nio>--add-opens=java.base/java.nio=ALL-UNNAMED</arg.java.nio>

</properties>

<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- Used for xxHash testing -->
<groupId>net.openhft</groupId>
<artifactId>zero-allocation-hashing</artifactId>
<version>${zero-allocation-hashing.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${org-slf4j.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<compilerArgs>
<arg>--add-exports</arg>
<arg>java.base/jdk.internal.ref=org.apache.datasketches.memory</arg>
</compilerArgs>
</configuration>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork> <!-- required if Maven is using a different JVM -->
<compilerArgs>
<arg>${arg.jdk.internal.ref}</arg>
<arg>${arg.jdk.internal.misc}</arg>
<arg>${arg.sun.nio.ch.exports}</arg>
<arg>${arg.sun.nio.ch.opens}</arg>
</compilerArgs>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
@{argLine} @{jvm.args} ${arg.java.nio} ${arg.sun.nio.ch.exports} ${arg.sun.nio.ch.opens} ${arg.jdk.internal.misc} ${arg.jdk.internal.ref}
</argLine>
<trimStackTrace>false</trimStackTrace>
<useFile>false</useFile>
<useManifestOnlyJar>false</useManifestOnlyJar>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
<reportsDirectory>${project.build.directory}/test-output/${maven.build.timestamp}</reportsDirectory>
<perCoreThreadCount>false</perCoreThreadCount>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>${java.version}</version> <!-- override -->
</jdk>
</toolchains>
</configuration>
</plugin>
</plugins>
</build>

<profiles>

<profile>
<id>assemble-mr-jar</id>
<activation>
<property>
<name>!unsetDefaultProfile</name>
</property>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<assembly.script.path>${maven.multiModuleProjectDirectory}/tools/scripts/package-multi-release-jar.sh</assembly.script.path>
<properties> <!-- project.root defined in /.mvn/maven.config -->
<assembly.script.path>${project.root}/tools/scripts/package-multi-release-jar.sh</assembly.script.path>
<assembly.java.home>${env.JAVA_HOME}</assembly.java.home>
<assembly.git.tag>${project.version}</assembly.git.tag>
<assembly.base.dir>${maven.multiModuleProjectDirectory}</assembly.base.dir>
<assembly.base.dir>${project.root}</assembly.base.dir>
</properties>
<build>
<defaultGoal>exec:exec</defaultGoal>
Expand All @@ -79,7 +167,7 @@ under the License.
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<!-- The trailing comment on the line below ignores an eclipse warning. The version is required for dependency updates. -->
<version>${exec-maven-plugin.version}</version><!--$NO-MVN-MAN-VER$-->
<version>${exec-maven-plugin.version}</version><!--$NO-MVN-MAN-VER$--> <!-- ?? -->
<executions>
<execution>
<id>package-mr-jar</id>
Expand Down
25 changes: 0 additions & 25 deletions datasketches-memory-java11/src/main/java/module-info.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static long[] hash(
* @param hashOut the size 2 long array for the resulting 128-bit hash
* @return the hash.
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
public static long[] hash(
final Memory mem,
final long offsetBytes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @author Praveenkumar Venkatesan
* @author Roman Leventov
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
final class AccessByteBuffer {

static final ByteBuffer ZERO_READ_ONLY_DIRECT_BYTE_BUFFER =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @author Roman Leventov
* @author Lee Rhodes
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
final class AllocateDirect {
static final Logger LOG = Logger.getLogger(AllocateDirect.class.getCanonicalName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* @author Lee Rhodes
* @author Praveenkumar Venkatesan
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
final class AllocateDirectWritableMap {
static final Logger LOG = Logger.getLogger(AllocateDirectWritableMap.class.getCanonicalName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* Common base of native-ordered and non-native-ordered {@link WritableBuffer} implementations.
* Contains methods which are agnostic to the byte order.
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
public abstract class BaseWritableBufferImpl extends PositionalImpl implements WritableBuffer {

//Pass-through constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* Common base of native-ordered and non-native-ordered {@link WritableMemory} implementations.
* Contains methods which are agnostic to the byte order.
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
public abstract class BaseWritableMemoryImpl extends ResourceImpl implements WritableMemory {

//1KB of empty bytes for speedy clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/**
* @author Lee Rhodes
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
final class CompareAndCopy {

private CompareAndCopy() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* @author Roman Leventov
* @author Lee Rhodes
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
abstract class NativeWritableBufferImpl extends BaseWritableBufferImpl {

//Pass-through constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* @author Roman Leventov
* @author Lee Rhodes
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
abstract class NativeWritableMemoryImpl extends BaseWritableMemoryImpl {

//Pass-through constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @author Roman Leventov
* @author Lee Rhodes
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
abstract class NonNativeWritableBufferImpl extends BaseWritableBufferImpl {

//Pass-through constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @author Roman Leventov
* @author Lee Rhodes
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
abstract class NonNativeWritableMemoryImpl extends BaseWritableMemoryImpl {

//Pass-through constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
*
* @author Lee Rhodes
*/
@SuppressWarnings("javadoc")
//@SuppressWarnings("javadoc")
public enum Prim {
BOOLEAN(ARRAY_BOOLEAN_BASE_OFFSET, ARRAY_BOOLEAN_INDEX_SCALE, BOOLEAN_SHIFT),
BYTE(ARRAY_BYTE_BASE_OFFSET, ARRAY_BYTE_INDEX_SCALE, BYTE_SHIFT),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*
* @author Lee Rhodes
*/
@SuppressWarnings("restriction")
//@SuppressWarnings("restriction")
public abstract class ResourceImpl implements Resource {
static final String JDK;
static final int JDK_MAJOR; //8, 11, 17, etc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*
* @author Lee Rhodes
*/
@SuppressWarnings({"restriction","javadoc"})
//@SuppressWarnings({"restriction","javadoc"})
public final class UnsafeUtil {
public static final Unsafe unsafe;

Expand Down
Loading
Loading