diff --git a/.github/workflows/manual-coverage.yml b/.github/workflows/manual-coverage.yml
index 03320e59..02cbca48 100644
--- a/.github/workflows/manual-coverage.yml
+++ b/.github/workflows/manual-coverage.yml
@@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- jdk: [ 8 ]
+ jdk: [ 17 ]
os: [ ubuntu-latest ]
include:
# - os: windows-latest
diff --git a/.github/workflows/manual-os-matrix.yml b/.github/workflows/manual-os-matrix.yml
index 9e2d36f6..6f1dffa5 100644
--- a/.github/workflows/manual-os-matrix.yml
+++ b/.github/workflows/manual-os-matrix.yml
@@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
- jdk: [ 8, 11 ]
+ jdk: [ 17 ]
os: [ windows-latest, ubuntu-latest, macos-latest ]
include:
- os: windows-latest
diff --git a/LICENSE b/LICENSE
index 61f8cad6..57984d5f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -215,24 +215,6 @@ APPENDIX B: Additional licenses relevant to this product:
conditions of the following licenses.
-
- =============================================================
- Apache License version 2.0 (see above)
- =============================================================
- DirectMemory
- Copyright 2015 Odnoklassniki Ltd, Mail.Ru Group
-
- Code locations:
- -------------------------------------------------------------
- This product contains a method to create a dummy read-only ByteBuffer using unsafe:
- * datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/AccessByteBuffer.java,
- Method: getDummyReadOnlyDirectByteBuffer(...)
- and adapted from Java source code located at:
- * src/one/nio/mem/DirectMemory.java,
- Method: wrap(...).
-
-
-
=============================================================
Apache License version 2.0 (see above)
=============================================================
@@ -251,55 +233,6 @@ APPENDIX B: Additional licenses relevant to this product:
* https://github.com/OpenHFT/Zero-Allocation-Hashing
-
- =============================================================
- Google Protobuf License:
- =============================================================
- Copyright 2008 Google Inc.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following disclaimer
- in the documentation and/or other materials provided with the
- distribution.
- * Neither the name of Google Inc. nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Code generated by the Protocol Buffer compiler is owned by the owner
- of the input file used when generating it. This code is not
- standalone and requires a support library to be linked with it. This
- support library is itself covered by the above license.
-
- Code locations:
- -------------------------------------------------------------
- This product contains code for encoding, decoding and testing UTF8:
- * datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/Utf8.java
- * datasketches-memory-java8-tests/src/test/java/org/apache/datasketches/memory/test/Utf8Test.java
- * datasketches-memory-java8-tests/src/test/java/org/apache/datasketches/memory/test/IsValidUtf8TestUtil.java
- and adapted from Java source code located at:
- * https://github.com/protocolbuffers/protobuf/blob/master/java/core/src/main/java/com/google/protobuf/Utf8.java,
- * https://github.com/protocolbuffers/protobuf/blob/master/java/core/src/test/java/com/google/protobuf/Utf8Test.java,
- * https://github.com/protocolbuffers/protobuf/blob/master/java/core/src/test/java/com/google/protobuf/IsValidUtf8TestUtil.java,
-
-
-
=============================================================
BSD-2-Clause License
=============================================================
@@ -330,14 +263,13 @@ APPENDIX B: Additional licenses relevant to this product:
Code locations:
-------------------------------------------------------------
- This product contains code for encoding, decoding and testing UTF8:
+ This product contains code for encoding, decoding and testing XxHash:
* datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/XxHash64.java
and adapted from C++ code located at:
* https://github.com/Cyan4973/xxHash/blob/dev/xxhash.c,
* https://github.com/Cyan4973/xxHash/blob/dev/xxhash.h
-
=============================================================
Public Domain (optional notice)
=============================================================
diff --git a/NOTICE b/NOTICE
index e69ad8ac..578c487b 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,9 +1,9 @@
Apache DataSketches Memory
-Copyright 2022 - The Apache Software Foundation
+Copyright 2024 - The Apache Software Foundation
Copyright 2015-2018 Yahoo Inc.
Copyright 2019-2020 Verizon Media
-Copyright 2021 Yahoo Inc.
+Copyright 2021- Yahoo Inc.
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/README.md b/README.md
index ce9c5ee7..82e49882 100644
--- a/README.md
+++ b/README.md
@@ -19,8 +19,6 @@
[![Build Status](https://travis-ci.org/apache/datasketches-memory.svg?branch=master)](https://travis-ci.org/apache/datasketches-memory)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.datasketches/datasketches-memory/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.datasketches/datasketches-memory)
-[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/datasketches-memory.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/datasketches-memory/context:java)
-[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/datasketches-memory.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/datasketches-memory/alerts/)
[![Coverage Status](https://coveralls.io/repos/github/apache/datasketches-memory/badge.svg?branch=master)](https://coveralls.io/github/apache/datasketches-memory?branch=master)
=================
@@ -29,110 +27,72 @@
This Memory component is general purpose, has no external runtime dependencies and can be used in any
application that needs to manage data structures inside or outside the Java heap.
-The goal of this component of the DataSketches library is to provide a high performance access API for accessing four different types of memory resources. Each of the four resource types is accessed using different API methods in the Memory component.
-
-* **Heap:** Contiguous bytes on the Java Heap constructed by, e.g., *WritableMemory.writableWrap(byte[])* or using the *WritableMemory.allocate(int)* method. For purposes of this document this includes on-heap ByteBuffers constructed using *ByteBuffer.allocate(int)*.
-
-* **DirectByteBuffer:** Contiguous bytes of a ByteBuffer constructed by, e.g., *WritableMemory.writableWrap(ByteBuffer)* where the ByteBuffer was previously constructed using *ByteBuffer.allocateDirect(int)*; or, is a slice() thereof.
-
-* **Direct:** Contiguous bytes off the Java Heap constructed by, e.g., *WritableMemory.allocateDirect(long)* method.
-
-* **Memory-Mapped Files** Contiguous bytes of a file represented in off-heap memory and created using, e.g., the *WritableMemory.writableMap(File)* method.
-
Please visit the main [DataSketches website](https://datasketches.apache.org) for more information.
If you are interested in making contributions to this Memory component please see our
[Community](https://datasketches.apache.org/docs/Community/) page.
-## Release 2.0.0+
-Starting with release *datasketches-memory-2.0.0*, this Memory component supports Java 8 through Java 13. Providing access to the four contiguous byte resources (mentioned above) in Java 8 only requires reflection. However, **Java 9 introduced the Java Platform Module System (JPMS) where access to these internal classes requires starting up the JVM with special JPMS arguments.** The actual JVM arguments required will depend on how the user intends to use the Memory API, the Java version used to run the user's application and whether the user's application is a JPMS application or not.
+The goal of this component of the DataSketches library is to provide a high performance access API for accessing four different types of memory resources:
-Also see the [usage examples](docs/usage-examples.md) for more information.
+* On-heap Memory via primitive arrays
+* On-heap Memory via ByteBuffers
+* Off-heap (Direct) Memory via direct allocation
+* Off-Heap Memory-Mapped files
-## USE AS A LIBRARY (using jars from Maven Central)
-In this environment, the user is using the Jars from Maven Central as a library dependency and not attempting to build the Memory component from the source code or run the Memory component tests.
+Each of the four resource types is accessed using different API methods in the Memory component.
-* If you are running Java 8, no extra JVM arguments are required.
-* If you are running Java 11-13 and only using the **Heap** related API, no extra JVM arguments are required.
+Note: *primitive* := *{byte, short, int, long, float, double}*
-Otherwise, if you are running Java 11-13 and ...
+### Contiguous bytes on the Java Heap constructed by these examples:
-* If your application **is not a JPMS module** use the following table. Choose the columns that describe your use of the Memory API. If any of the columns contain a *Yes*, then the JVM argument in the first column of the row containing a *Yes* will be required. If you are not sure the extent of the Memory API being used, there is no harm in specifying all 4 JVM arguments. Note: do not embed any spaces in the full argument.
+* **Heap via primitive arrays:**
+ * *Memory.wrap(primitive[])* (read only)
+ * *WritableMemory.allocate(int)*
+ * *WritableMemory.writableWrap(primitive[])*
-| JVM Arguments for non-JPMS Applications | Direct ByteBuffer | Direct | MemoryMapped Files |
-| :----------------------------------------------------: | :---------------: | :----: | :----------------: |
-| --add-exports java.base/jdk.internal.misc= ALL-UNNAMED | | Yes | |
-| --add-exports java.base/jdk.internal.ref= ALL-UNNAMED | | Yes | Yes |
-| --add-opens java.base/java.nio= ALL-UNNAMED | | Yes | Yes |
-| --add-opens java.base/sun.nio.ch= ALL-UNNAMED | | | Yes |
+* **Heap via ByteBuffer**
+ * *Memory.wrap(ByteBuffer.wrap(byte[]))* (read only)
+ * *WritableMemory.writableWrap(ByteBuffer.allocate(int))*
-* If your application **is a JPMS module** use the following table. Choose the columns that describe your use of the Memory API. If any of the columns contain a *Yes*, then the JVM argument in the first column of the row containing a *Yes* will be required. If you are not sure the extent of the Memory API being used, there is no harm in specifying all 4 JVM arguments. Note: do not embed any spaces in the full argument.
+### Contiguous bytes off the Java Heap constructed by these examples:
-| JVM Arguments for JPMS Applications | Direct ByteBuffer | Direct | MemoryMapped Files |
-| :-----------------------------------------------------------------------: | :---------------: | :----: | :----------------: |
-| --add-exports java.base/jdk.internal.misc= org.apache.datasketches.memory | | Yes | |
-| --add-exports java.base/jdk.internal.ref= org.apache.datasketches.memory | | Yes | Yes |
-| --add-opens java.base/java.nio= org.apache.datasketches.memory | | Yes | Yes |
-| --add-opens java.base/sun.nio.ch= org.apache.datasketches.memory | Yes | | Yes |
+* **Off-Heap, Direct via direct allocation:**
+ * *WritableMemory.allocateDirect(long)*
+* **Off-Heap, Direct via (Direct) ByteBuffer**
+ * *WritableMemory.writableWrap(ByteBuffer.allocateDirect(int))*
-## DEVELOPER USAGE
-In this environment the developer needs to build the Memory component from source and run the Memory Component tests. There are two use cases. The first is for a *System Developer* that needs to build and test their own Jar from source for a specific Java version. The second use case is for a *Memory Component Developer and Contributor*.
+* **Off-Heap, Memory-Mapped Files**
+ * *Memory.map(File)* (read only)
+ * *WritableMemory.writableMap(File)*
-* System Developer
- * Compile, test and create a Jar for a specific Java version
- * use the provided script for this purpose
+## Release 4.0.0 (inclusive) to 5.0.0 (exclusive)
+Starting with release *datasketches-memory-4.0.0*, this Memory component supports Java 17 when compiling from source and should work with later Java versions at runtime. This component is not designed as a Java Module, so the Jar file should be part of the application classpath.
-* Memory Component Developer / Contributor
- * Compile & test the library from source code using:
- * Eclipse (version)
- * IntelliJ (version)
- * Maven (version)
- * Command-line or scripts
- * The developer must have installed in their development system at least JDK versions 8 and 11.
- * Unless building with the provided script, the developer must have a valid [Maven toolchain configuration](docs/maven-toolchains.md).
-
-
-### Build Instructions
+## Build Instructions
__NOTES:__
-1) This component accesses resource files for testing. As a result, the directory elements
- of the full absolute path of the target installation directory must qualify as Java identifiers.
- In other words, the directory elements must not have any space characters (or non-Java identifier
- characters) in any of the path elements. This is required by the Oracle Java Specification in
- order to ensure location-independent access to resources:
- [See Oracle Location-Independent Access to Resources](https://docs.oracle.com/javase/8/docs/technotes/guides/lang/resources.html)
+* This component accesses resource files for testing.
+As a result, the directory elements of the full absolute path of the target installation directory must qualify as Java identifiers.
+In other words, the directory elements must not have any space characters (or non-Java identifier characters) in any of the path elements. This is required by the Oracle Java Specification in order to ensure location-independent access to resources:
+[See Oracle Location-Independent Access to Resources](https://docs.oracle.com/javase/8/docs/technotes/guides/lang/resources.html)
+* The compile command line must contain the JVM flag *--add-modules=jdk.incubator.foreign*.
+* This component is not designed as a Java Module, so the Jar file should be part of the application classpath.
#### Dependencies
There are no run-time dependencies. See the pom.xml file for test dependencies.
#### Maven build instructions
-The Maven build requires the following JDKs to compile:
-
-- JDK8/Hotspot
-- JDK11/Hotspot
-
-Before building, first ensure that your local environment has been configured according to the [Maven Toolchains Configuration](docs/maven-toolchains.md).
-
-There are three types of tests: normal unit tests, tests run by the strict profile and continuous integration(CI) tests.
-The CI tests target the Multi-Release (MR) JAR and run the entire test suite using a specific version of Java. Running the CI test command also runs the default unit tests.
+The Maven build requires JDK-17 to compile:
To run normal unit tests:
mvn clean test
-To run the strict profile tests (only supported in Java 8):
-
- mvn clean test -P strict
-
-To run javadoc on this multi-module project, use:
+To run javadoc:
mvn clean javadoc:javadoc -DskipTests=true
-To build the multi-release JAR, use:
-
- mvn clean package
-
To run the eclipse plugin on this multi-module project, use:
mvn clean eclipse:eclipse -DskipTests=true
@@ -149,57 +109,7 @@ This will create the following Jars:
* datasketches-memory-X.Y.Z-test-sources.jar The test source files
* datasketches-memory-X.Y.Z-javadoc.jar The compressed Javadocs.
-#### Building for a specific java version
-
-A build script named **package-single-release-jar.sh** has been provided to package a JAR for a specific java version. This is necessary in cases where a developer is unable to install all the required versions of the JDK that are required as part of the Maven build.
-
-The build script performs the following steps:
-
-1. Sets up staging directories under **target/** for the package files
-2. Uses git commands to gather information about the current Git commit and branch
-3. Compiles java source tree
-4. Packages a JAR containing compiled sources together with the Manifest, License and Notice files
-5. Checks and tests the assembled JAR by using the API to access four different resource types
-
-The build script is located in the **tools/scripts/** directory and requires the following arguments:
-
-* JDK Home Directory - The first argument is the absolute path of JDK home directory e.g. $JAVA_HOME
-* Git Version Tag - The second argument is the Git Version Tag for this deployment e.g. 1.0.0-SNAPSHOT, 1.0.0-RC1, 1.0.0 etc.
-* Project Directory - The third argument is the absolute path of project.basedir e.g. /src/apache-datasketches-memory
-
-For example, if the project base directory is `/src/datasketches-memory`;
-
-To run the script for a release version:
-
- ./tools/scripts/package-single-release-jar.sh $JAVA_HOME 2.1.0 /src/datasketches-memory
-
-To run the script for a snapshot version:
-
- ./tools/scripts/package-single-release-jar.sh $JAVA_HOME 2.2.0-SNAPSHOT /src/datasketches-memory
-
-To run the script for an RC version:
-
- ./tools/scripts/package-single-release-jar.sh $JAVA_HOME 2.1.0-RC1 /src/datasketches-memory
-
-Note that the script does **not** use the _Git Version Tag_ to adjust the working copy to a remote tag - it is expected that the user has a pristine copy of the desired branch/tag available **before** using the script.
-
----
-
-### Further documentation for contributors
-
-For more information on the project configuration, the following topics are discussed in more
-detail:
-
-* [Maven Configuration](docs/maven.md)
-* [Maven Toolchains Configuration](docs/maven-toolchains.md)
-* [Multi-Release Jar](docs/multi-release-jar.md)
-* [Java Platform Module System](docs/module-system.md)
-* [Usage examples](docs/usage-examples.md)
-
-In order to build and contribute to this project, please read the relevant IDE documentation:
-
-- [Eclipse IDE Setup](docs/eclipse.md)
-- [IntelliJ IDE Setup](docs/intellij.md)
+### Deployment to Nexus
-For releasing to AppNexus, please use the `sign-deploy-jar.sh` script in the scripts directory.
+For releasing to Nexus, please use the `sign-deploy-jar.sh` script in the scripts directory.
See the documentation within the script for usage instructions.
diff --git a/docs/eclipse.md b/docs/eclipse.md
deleted file mode 100644
index 1ca35f21..00000000
--- a/docs/eclipse.md
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-# Eclipse IDE Setup
-
-The use of Maven submodules to build a Multi Release JAR was motivated by its compatibility with
-popular IDEs. There are two configuration properties to be aware of when configuring your local
-development environment:
-
-1) Java compiler versions
-2) Compiler arguments for JPMS
-
-### Java compiler versions
-
-Settings are usually synchronized with Maven Toolchain configuration, otherwise the Java version
-for a Maven module should be set as follows:
-
-| Maven submodule | JDK |
-| -------------------------- | --- |
-| datasketches-memory | 8 |
-| datasketches-memory-java8 | 8 |
-| datasketches-memory-java11 | 11 |
-
-### Compiler arguments for JPMS
-
-In order to compile Maven modules in Java versions 11 and above, it is necessary to provide the
-following arguments to the compiler. These are usually synchronized with the `pom.xml`
-configuration:
-
-```xml
-
- --add-exports
- java.base/jdk.internal.ref=org.apache.datasketches.memory
-
-```
-
----
-
-## Running Datasketches-Memory in Eclipse
-
-Note that the following configuration was verified using Eclipse Version: 2020-12 (4.18.0)
-
-### The eclipse maven plugin
-
-The [Eclipse Maven plugin](https://maven.apache.org/plugins/maven-eclipse-plugin/) is used to
-generate Eclipse IDE files. In order to run the eclipse plugin use:
-
- $ mvn clean eclipse:eclipse -DskipTests=true
-
-More information about using the eclipse plugin with multi-module Maven builds can be found
-in the Maven
-[Multiple Module Projects](https://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html)
-document.
-
-Please note that this plugin is retired and no longer maintained!
-
----
-
-### Importing the project into eclipse
-
-From the **Package Explorer** View:
-
-- Right-click on a blank space in the view
-- Select **Import/Maven/Existing Maven Projects**
-- Select **Next**, and browse to the project directory
-- Click **Open**
-
----
-
-### Setting compiler arguments for JPMS
-
-Although these should be set automatically, the Eclipse IDE does not currently configure these
-settings according to the `pom.xml` - see this
-[Eclipse Bug](https://github.com/eclipse-m2e/m2e-core/issues/129).
-Ensure that the required JPMS arguments are set for the compiler (Java 11 only).
-
-- First, right-click on the `datasketches-memory-java11` project, and select
-**Properties/Java Build Path**.
-- Next, open the **Module Dependencies** tab and select the `java.base` package.
-- Click on **Configured details**, followed by **Expose package**.
-- In the dialog box, enter package: ```jdk.internal.ref```, and
-`org.apache.datasketches.memory` as the target module.
-- Ensure that the **exports** checkbox is selected.
-
-![Eclipse java compiler arguments](img/eclipse-java-compiler-arguments-1.png "Eclipse project compiler arguments")
-
-- Finally, click **Apply and Close**:
-
-![Eclipse java compiler arguments](img/eclipse-java-compiler-arguments-2.png "Eclipse project compiler arguments")
-
-Note: These arguments need only be supplied for `datasketches-memory-java11`.
-
----
-
-### Setting Java compiler settings
-
-This should be set automatically by the IDE. However, you may ensure that the correct Java
-compliance level is set for each module by using the Eclipse `Java Compiler` dialog.
-
-- Open the **Java Compiler** dialog, and ensure **Enable project specific settings** is checked:
-
-![Eclipse compiler level](img/eclipse-compiler-level.png "Eclipse Java Compiler Settings")
-
-You might need to verify this for each module, making sure the correct compliance level is used:
-
-- `datasketches-memory-java11` should use level 11 compliance.
-- `datasketches-memory-java8` should use level 1.8 compliance.
-
----
-
-### Setting JRE library versions
-
-This should be set automatically by the IDE. However, you may ensure that the correct JRE is
-used for each module by using the Eclipse **Java Build Path** dialog.
-
-- First, open the project properties dialog for the `datasketches-memory-java11` project, and
-click on **Java Build Path**.
-- Next, open the **Libraries** tab and select the **JRE System Library** under **Modulepath**.
-- Click **Edit** and ensure that the **Execution Environment** is selected and set to Java 11:
-
-![Eclipse build path](img/eclipse-build-path-1.png "Java 11 Eclipse project build path")
-
-- Lastly, for all other modules, verify that the **Execution Environment** is selected and set
-to the Java 8 JRE:
-
-![Eclipse build path](img/eclipse-build-path-2.png "Java 8 Eclipse project build path")
-
-### Running unit tests
-
-- Under the `datasketches-memory-java8` module, right-click on the `src/test/java`
-directory.
-- Select **Run-As** / **TestNG Test**
-- It should open a new window and run over 400 tests without error.
diff --git a/docs/img/eclipse-build-path-1.png b/docs/img/eclipse-build-path-1.png
deleted file mode 100644
index f815f869..00000000
Binary files a/docs/img/eclipse-build-path-1.png and /dev/null differ
diff --git a/docs/img/eclipse-build-path-2.png b/docs/img/eclipse-build-path-2.png
deleted file mode 100644
index 0a824d30..00000000
Binary files a/docs/img/eclipse-build-path-2.png and /dev/null differ
diff --git a/docs/img/eclipse-compiler-level.png b/docs/img/eclipse-compiler-level.png
deleted file mode 100644
index ff308c4d..00000000
Binary files a/docs/img/eclipse-compiler-level.png and /dev/null differ
diff --git a/docs/img/eclipse-java-compiler-arguments-1.png b/docs/img/eclipse-java-compiler-arguments-1.png
deleted file mode 100644
index 4902ab0a..00000000
Binary files a/docs/img/eclipse-java-compiler-arguments-1.png and /dev/null differ
diff --git a/docs/img/eclipse-java-compiler-arguments-2.png b/docs/img/eclipse-java-compiler-arguments-2.png
deleted file mode 100644
index 0ba1798a..00000000
Binary files a/docs/img/eclipse-java-compiler-arguments-2.png and /dev/null differ
diff --git a/docs/img/eclipse-project-structure.png b/docs/img/eclipse-project-structure.png
deleted file mode 100644
index 9ed08cac..00000000
Binary files a/docs/img/eclipse-project-structure.png and /dev/null differ
diff --git a/docs/img/intellij-java-compiler-arguments.png b/docs/img/intellij-java-compiler-arguments.png
deleted file mode 100644
index d06ea287..00000000
Binary files a/docs/img/intellij-java-compiler-arguments.png and /dev/null differ
diff --git a/docs/img/intellij-project-structure.png b/docs/img/intellij-project-structure.png
deleted file mode 100644
index e7f5c322..00000000
Binary files a/docs/img/intellij-project-structure.png and /dev/null differ
diff --git a/docs/img/mr-jar-manifest.png b/docs/img/mr-jar-manifest.png
deleted file mode 100644
index b1d955aa..00000000
Binary files a/docs/img/mr-jar-manifest.png and /dev/null differ
diff --git a/docs/img/mr-jar-sources.png b/docs/img/mr-jar-sources.png
deleted file mode 100644
index dc341b94..00000000
Binary files a/docs/img/mr-jar-sources.png and /dev/null differ
diff --git a/docs/intellij.md b/docs/intellij.md
deleted file mode 100644
index 47e9654e..00000000
--- a/docs/intellij.md
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-# IntelliJ IDE Setup
-
-The use of Maven submodules to build a Multi Release JAR was motivated by its compatibility with
-popular IDEs.
-
-There are two configuration properties to be aware of when configuring your local development
-environment:
-
-1) Java compiler versions
-2) Compiler arguments for JPMS
-
-#### Java compiler versions
-
-Settings are usually synchronised with maven toolchain configuration, otherwise the Java version
-for a maven module should be set as follows:
-
-| Maven submodule | JDK |
-| -------------------------- | --- |
-| datasketches-memory | 8 |
-| datasketches-memory-java8 | 8 |
-| datasketches-memory-java11 | 11 |
-
-#### Compiler arguments for JPMS
-
-In order to compile Maven modules in Java versions 11 and above, it is necessary to provide the
-following arguments to the compiler. These are usually synchronised with the `pom.xml`
-configuration:
-
-```xml
-
- --add-exports
- java.base/jdk.internal.ref=org.apache.datasketches.memory
-
-```
-
----
-
-## Running Datasketches-Memory in IntelliJ-IDEA
-
-Note that the following configuration was verified using IntelliJ IDEA 2021.1.2
-(Community Edition).
-
-### Java compiler versions
-
-Ensure that the correct SDK is used for each module using the IntelliJ project structure dialog:
-
-![IntelliJ project structure dialog](img/intellij-project-structure.png "Intellij project structure dialogue")
-
----
-
-### Compiler arguments for JPMS
-
-Ensure that the required JPMS arguments are set for the compiler (Java 11 only).
-These should be detected and set automatically based on the `pom.xml` configuration.
-
-![IntelliJ java compiler arguments](img/intellij-java-compiler-arguments.png "Intellij project compiler arguments")
diff --git a/docs/maven-toolchains.md b/docs/maven-toolchains.md
deleted file mode 100644
index 703b2086..00000000
--- a/docs/maven-toolchains.md
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-# Maven Toolchains Configuration
-
-From the [maven-toolchain-plugin documentation](https://maven.apache.org/plugins/maven-toolchains-plugin/usage.html):
-
-> A Toolchain is an object that Maven plugins can use to retrieve preconfigured tools
-> (including location and other information).
-> With the jdk toolchain, for example, instead of being stuck with the JDK used to run Maven,
-> all plugins can use the same or other JDK instances without hardcoding absolute paths
-> into the pom.xml and without configuring every plugin that require a path to JDK tools.
-
-
-### Motivation
-
-Toolchains are used in different maven modules to ensure that the correct Java compiler version
-is used when compiling source files. This is because Datasketches Memory uses some JDK
-version-specific APIs, which require different JDKs to compile correctly.
-
-### Toolchains template
-
-Your local environment requires toolchain entries for Java 8 and 11 to build this project.
-These can be found in a reference `toolchains.xml` template in the `tools` directory.
-Any maven commands used during development can be supplemented with:
-`--toolchains tools/toolchains.xml`, without permanently modifying the local
-`~/.m2/toolchains.xml` file.
-
-Alternatively, to avoid having to add this extra argument to every Maven command,
-the toolchain template can be copied to your local maven `toolchains.xml`,
-e.g. `~/.m2/toolchains.xml`. If there is already a locally configured `toolchains.xml` file,
-the requisite entries should be merged into the existing file if they do not already exist.
-
-### Environment variables
-
-In order to compile the project using Maven toolchains, the following environment variables should be set as follows:
-
-| Environment variable | Value |
-| --------------------------------- | ------------------------------------- |
-| JAVA8_HOME | Home directory for Java 8 (openJDK) |
-| JAVA11_HOME | Home directory for Java 11 (openJDK) |
-
-For example, if you are using [SDKMAN!](https://sdkman.io/), your environment
-might be configured as follows:
-
-- JAVA8_HOME: `/Users/me/.sdkman/candidates/java/8.0.282.hs-adpt`
-- JAVA11_HOME: `/Users/me/.sdkman/candidates/java/11.0.10.hs-adpt`
-
-#### For MacOS or Linux variants
-Users can discover what JDKs have been loaded into their environment by using the following
-command:
-
- /usr/libexec/java_home -V
-
-### Eclipse configuration
-
-If you are an Eclipse user, you may need further configuration for your IDE to use the
-appropriate JDK for each module - see the [Eclipse IDE Setup](eclipse.md).
-
-### IntelliJ configuration
-
-Similarly, if you are an IntelliJ user, you may need further configuration for your IDE to use the
-appropriate JDK for each module - see the [IntelliJ IDE Setup](intellij.md).
diff --git a/docs/maven.md b/docs/maven.md
deleted file mode 100644
index 5fd9868f..00000000
--- a/docs/maven.md
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-# Maven Configuration: Multi-Module Project
-
-This project is a multi-module Maven project. A multi-module Maven project consists of an
-aggregator project (the `datasketches-memory` project), together with a set of submodules.
-The aggregator's configuration is inherited by each submodule, thus reducing duplication.
-
-Datasketches Memory makes use of some features of the Java platform, for example, `Unsafe`,
-which have evolved in Java versions 9 and above. Therefore, a multi-module project allows us to
-add support for later versions of Java by using independent Maven modules to target
-platform-specific APIs. For example, to deallocate references a `sun.misc.Cleaner` will be used
-in Java8, but the `jdk.internal.ref.Cleaner` is used in Java 11.
-
-This project has been divided into the following submodules:
-
-* datasketches-memory-java8 (base version of the JVM that is currently supported)
-* datasketches-memory-java11 (Java11 equivalent of some platform specific classes in
-
-### Artifact assembly
-
-During the Maven package phase, the [Maven exec plugin](https://www.mojohaus.org/exec-maven-plugin/index.html)
-invokes a custom bash script `package-mr-jar.sh` located in the `tools/scripts` directory.
-This script assembles sources and compiled classes from the individual maven modules into
-a coherent set of JARs that appear to the end user to originate from a single module.
-
-The following jars are assembled by the bash package script:
-
-* datasketches-memory-X.Y.Z.jar The compiled main class files.
-* datasketches-memory-X.Y.Z-tests.jar The compiled test class files.
-* datasketches-memory-X.Y.Z-sources.jar The main source files.
-* datasketches-memory-X.Y.Z-test-sources.jar The test source files
-* datasketches-memory-X.Y.Z-javadoc.jar The compressed Javadocs.
diff --git a/docs/module-system.md b/docs/module-system.md
deleted file mode 100644
index b5cf78a1..00000000
--- a/docs/module-system.md
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-# Java Platform Module System (JPMS) For JDK 11+
-
-The [Java Platform Module System](https://openjdk.java.net/projects/jigsaw/spec/) defines a module
-system for the Java Platform. For more documentation on the implementation, see
-[JEP-261](https://openjdk.java.net/jeps/261).
-
-#### Reliable configuration
-
-> Reliable configuration, to replace the brittle, error-prone class-path mechanism with a means
-for program components
-> to declare explicit dependencies upon one another;
-
-This prevents ClassLoader errors such as `NoClassDefFoundError` that typically occur at runtime
-and make applications less reliable.
-
-#### Strong encapsulation
-
-> Strong encapsulation, to allow a component to declare which of its APIs are accessible by other
-components, and which are not;
-
-JDK internals are now strongly encapsulated, except for critical internal APIs such as
-`sun.misc.Unsafe` (see [JEP-396](https://openjdk.java.net/jeps/396) and
-[JEP-403](https://openjdk.java.net/jeps/403)).
-Datasketches Memory can no longer access these APIs by default, and requires explicit access.
-
-### Module declarations
-
-A module declaration is a java file (typically `module-info.java`) that explicitly defines a
-dependency graph.
-
-#### org.apache.datasketches.memory
-
-In the `datasketches-memory-java11` maven submodule source root, the following module declaration has
-been added:
-
-```java
-module org.apache.datasketches.memory {
- requires java.base;
- requires java.logging;
- requires jdk.unsupported;
-
- exports org.apache.datasketches.memory;
-}
-```
-
-This declaration explicitly defines the dependencies for the `org.apache.datasketches.memory` module, as well as the
-external API. The `org.apache.datasketches.memory.internal` package is now inaccessible to the end user,
-providing better encapsulation.
-
-### Compiler arguments
-
-Some dependencies are encapsulated by default, and this causes compilation to fail for
-Java versions 11 and above.
-These dependencies can be made accessible at compile time through the use of the
-`add-exports` compiler argument.
-This argument allows one module to access some un-exported types of another module.
-Datasketches Memory depends on several internal APIs and therefore requires special
-exposition.
-
-For example, in order to compile the `datasketches-memory-java11` submodule, the following compiler
-arguments are added to the Maven compiler plugin in the module's pom.xml file:
-
-```xml
-
- --add-exports
- java.base/jdk.internal.ref=org.apache.datasketches.memory
-
-```
-
-### Runtime arguments (only when allocating off-heap memory)
-
-When allocating off-heap memory using `WritableMemory.allocateDirect(...)`,
-reflection is used by the Datasketches Memory component to access JVM internal class
-fields and methods that do not have `public` visibility. For JDK 11+, the JPMS
-requires that the user add additional JVM run-time arguments (`add-opens...`, which permit this reflection.
-
-Note that if the user has allocated off-heap memory using ByteBuffer.allocateDirect(...),
-the DataSketches memory component can still read and write to this memory without these `add-opens...` arguments.
-
-See the use **Use as a Library** and **Developer Usage** sections in the main [README](../README.md) for more details. In addition, examples are provided in the [usage examples](usage-examples.md) document.
-
-### JPMS and Java 8
-
-Java 8 does not support module declarations and the JPMS module system, and no additional
-runtime arguments are necessary.
-However, support is retained for Java 8 users by only including the compiled declaration
-(`module-info.class`) in the `datasketches-memory` multi-release JAR for Java11 and above.
diff --git a/docs/multi-release-jar.md b/docs/multi-release-jar.md
deleted file mode 100644
index 532bc6f0..00000000
--- a/docs/multi-release-jar.md
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-# Multi-Release JAR
-
-The `datasketches-memory` module assembles a multi-release (MR) JAR for release that consists of
-multiple Java-release-specific versions of compiled class files.
-
-From [JEP-238](https://openjdk.java.net/jeps/238):
-
-> Third party libraries and frameworks typically support a range of Java platform versions,
-generally going several versions back. As a consequence they often do not take advantage of
-language or API features available in newer releases since it is difficult to express conditional
-platform dependencies, which generally involves reflection, or to distribute different library
-artifacts for different platform versions.
-
-The next case describes the challenge in supporting newer versions of Java for libraries
-such as DataSketches Memory:
-
-> Some libraries and frameworks, furthermore, use internal APIs of the JDK that will be made
-inaccessible in Java 9 when module boundaries are strictly enforced. This also creates a
-disincentive to support new platform versions when there are public, supported API
-replacements for such internal APIs.
-
-### Assembly
-
-During the Maven package phase, the [Maven exec plugin](https://www.mojohaus.org/exec-maven-plugin/index.html)
-invokes a custom bash script `package-mr-jar.sh` located in the `tools/scripts` directory.
-This script requires that the prior phases in the Maven lifecycle have been completed.
-
-The following maven submodules are used to source the compiled class files for the MR-JAR:
-
-![MR-JAR maven module mapping](img/mr-jar-sources.png "MR-JAR maven module mapping")
-
-### Manifest
-
-The Maven assembly plugin copies version specific class files into JAR manifest META-INF
-directory, as shown in the diagram below:
-
-![MR-JAR manifest file contents](img/mr-jar-manifest.png "MR-JAR manifest file contents")
diff --git a/docs/usage-examples.md b/docs/usage-examples.md
deleted file mode 100644
index 948c0339..00000000
--- a/docs/usage-examples.md
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-# Usage Examples
-
-You may need to supply additional runtime arguments to the JVM depending on how you are using the Datasketches Memory library.
-For more information regarding required JPMS arguments and when they are applicable, see the [README](../README.md).
-This document provides examples for the following scenarios:
-
-1. Using the library from a Java 8 application
-2. Using the library with on-heap memory only
-3. Using off-heap memory in a non-modularized Java 11+ application
-4. Using off-heap memory in a modularized Java 11+ application
-
-### 1) Using the library from a Java 8 application
-
-No additional runtime arguments are required.
-
-As an example, consider the following launch script that compiles and runs a simple Java 8 application:
-
-```shell
- JH=$JAVA8_HOME
- JAVAC=$JH/bin/javac
- JAVA=$JH/bin/java
- JAR=$JH/bin/jar
-
- patha=nomvn-jdk8
-
- cd $patha
- echo PWD:$(pwd)
- echo $JAVA_HOME
-
- echo "--- CLEAN & COMPILE ---"
- rm -rf target
- mkdir -p target/test-classes
-
- $JAVAC\
- -d target/test-classes/\
- -cp libs/*\
- $(find . -name '*.java')
-
- echo "---- RUN ----"
-
- $JAVA\
- -cp libs/*:target/test-classes:src/test/resources/\
- org.xyz.memory.RunMain
-```
-
-### 2) Using the library with on-heap memory only
-
-Similarly, no additional runtime arguments are required in this scenario - regardless of whether the library is used from a Java 8 or Java 11+ application.
-
-As an example, consider the following launch script that compiles and runs a simple Java 11 application that only exclusively
-uses on-heap memory:
-
-```shell
- JH=$JAVA11_HOME
- JAVAC=$JH/bin/javac
- JAVA=$JH/bin/java
- JAR=$JH/bin/jar
-
- patha=nomvn-nomod-heap-jdk11
-
- cd $patha
-
- echo "--- CLEAN & COMPILE ---"
- rm -rf target
- mkdir -p target/test-classes
-
- $JAVAC\
- -d target/test-classes/\
- -cp "mods/*":"libs/*"
- -p mods
- $(find . -name '*.java')
-
- echo "---- RUN ----"
-
- $JAVA\
- -cp target/test-classes:"mods/*":"libs/*":src/test/resources\
- org.xyz.memory.RunMain
-```
-
-### 3) Using off-heap memory in a non-modularized Java 11+ application
-
-The following section applies to applications that are not modularized JPMS applications.
-
-In order to allocate off-heap memory using the `WritableMemory.allocateDirect(...)` method in Java 11 and above, you must provide the
-following runtime arguments to the JVM:
-
-```shell
- --add-exports java.base/jdk.internal.misc=ALL-UNNAMED\
- --add-exports java.base/jdk.internal.ref=ALL-UNNAMED\
- --add-opens java.base/java.nio=ALL-UNNAMED\
- --add-opens java.base/sun.nio.ch=ALL-UNNAMED\
-```
-
-These arguments expose encapsulated packages in the `java.base` package to the `org.apache.datasketches.memory` module,
-which runs as an UNNAMED module in a non-JPMS (non-modularized) application.
-
-The following launch script compiles and runs a non-modularized Java 11 application:
-
-```shell
- JH=$JAVA11_HOME
- JAVAC=$JH/bin/javac
- JAVA=$JH/bin/java
- JAR=$JH/bin/jar
-
- patha=nomvn-nomod-jdk11
-
- cd $patha
-
- echo "--- CLEAN & COMPILE ---"
- rm -rf target
- mkdir -p target/test-classes
-
- $JAVAC\
- -d target/test-classes/\
- -cp "mods/*":"libs/*"
- -p mods
- $(find . -name '*.java')
-
- echo "---- RUN ----"
-
- $JAVA\
- --add-exports java.base/jdk.internal.misc=ALL-UNNAMED\
- --add-exports java.base/jdk.internal.ref=ALL-UNNAMED\
- --add-opens java.base/java.nio=ALL-UNNAMED\
- --add-opens java.base/sun.nio.ch=ALL-UNNAMED\
- -cp target/test-classes:"mods/*":"libs/*":src/test/resources\
- org.xyz.memory.RunMain
-```
-where the traditional classpath (`-cp`) argument contains all modules, libraries and resources.
-
-Note: `mods` is a local directory containing external modules, and `libs` is a local directory for external library
-dependencies. No distinction is made between modules and libraries since they are both appended to the classpath.
-
-### 4) Using off-heap memory in a modularized Java 11+ application
-
-The following section applies to modularized JPMS applications.
-
-In order to allocate off-heap memory using the `WritableMemory.allocateDirect(...)` method in Java 11 and above, you must provide the
-following runtime arguments to the JVM:
-
-```shell
- --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\
-```
-
-These arguments expose encapsulated packages in the `java.base` package to the `org.apache.datasketches.memory` module.
-
-The following launch script compiles and runs a modularized Java 11 application:
-
-```shell
- JH=$JAVA11_HOME
- JAVAC=$JH/bin/javac
- JAVA=$JH/bin/java
- JAR=$JH/bin/jar
-
- patha=nomvn-mod-jdk11
-
- cd $patha
- echo PWD:$(pwd)
- echo $JAVA_HOME
-
- echo "--- CLEAN & COMPILE ---"
- rm -rf target
- mkdir -p target/test-classes
-
- $JAVAC\
- -d target/test-classes/\
- -cp "mods/*":"libs/*"
- -p mods
- $(find . -name '*.java')
-
- echo "---- RUN ----"
- echo PWD:$(pwd)
-
- $JAVA\
- --add-opens java.base/java.nio=org.apache.datasketches.memory\
- --add-opens java.base/sun.nio.ch=org.apache.datasketches.memory\
- -cp "/libs/*":src/test/resources\
- -p target/test-classes:mods\
- -m org.xyz.memory/org.xyz.memory.RunMain
-```
-where the traditional classpath (`-cp`) argument contains libraries and resources, and the module-path argument (`-p`)
-references all external modules and compiled classes for the current user application, which is itself a module.
diff --git a/pom.xml b/pom.xml
index c6aea3f4..00b53966 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,11 +18,20 @@ specific language governing permissions and limitations
under the License.
-->
-
+
4.0.0
+
+
org.apache.datasketches
datasketches-memory
4.1.0-SNAPSHOT
@@ -58,8 +67,8 @@ under the License.
-
-
+
GitHub
https://github.com/apache/${project.artifactId}/issues
@@ -76,7 +85,7 @@ under the License.
- 7.10.0
+ 7.10.2
3.6.3
@@ -90,33 +99,32 @@ under the License.
${charset.encoding}
yyyy-MM-dd'T'HH-mm-ss'Z'
-
+
3.7.1
3.13.0
3.1.3
3.5.0
3.2.7
+ 3.1.2
3.4.2
3.10.1
3.1.1
3.2.0
3.3.1
- 3.5.0
- 3.1.2
-
+ 3.5.0
+
+ 4.9.10
+
0.16.1
-
- 0.8.12
-
+
4.3.0
-
+
+ 0.8.12
+
2.17.1
-
- 1.0.0
- 4.9.10
-
+ 1.0.0
0.16
@@ -182,7 +190,7 @@ under the License.
[17,18)
- [${maven.version},)
+ [${maven.version},4.0.0)
@@ -303,9 +311,7 @@ under the License.
**/*.yml
**/.*
**/test/resources/**/*.txt
- **/img/**/*.png
**/git.properties
- **/scripts/assets/LoremIpsum.txt
LICENSE
NOTICE
diff --git a/tools/CloverConfig.txt b/tools/CloverConfig.txt
deleted file mode 100644
index 77ea2ce2..00000000
--- a/tools/CloverConfig.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-Clover Config for Eclipse:
-
-At Project Level Properties:
- Instrumentation:
- Initstring: Default value
- Output Folder: ...project output dir(s)
- Flush Policy: At JVM shutdown ...
- Misc: Fully qualify ... , Instrument and compile at statement level
- Contexts:
- Check: assert statements
- Add Custom Coverage Context Filter:
- private-constructor: also see link below
- Method
- (.* )?private +[a-zA-Z0-9_$]+ *\( *\).*
- Source Files
- Only look ...
- [check] src/main/java[includes=**/*.java][excludes=]
- [check] src/test/java[includes=**/*.java][excludes=]
- Test Classes
- Assume all source in the specified folders are tests or test utility classes
- [check] src/test/java
-
-At Clover "down-triangle" menu:
- Columns:
- Element
- % TOTAL Coverage
- Uncovered Elements: Custom: %UncoveredElements * TotalElements / 100
- Total Elements
-
-
-
-http://alexruizlog.blogspot.com/2009/04/how-to-make-clover-ignore-private_21.html
\ No newline at end of file
diff --git a/tools/scripts/assets/CheckMemoryJar.java b/tools/scripts/assets/CheckMemoryJar.java
deleted file mode 100644
index d369c852..00000000
--- a/tools/scripts/assets/CheckMemoryJar.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.datasketches.memory.tools.scripts;
-
-import java.io.File;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-import org.apache.datasketches.memory.MapHandle;
-import org.apache.datasketches.memory.Memory;
-import org.apache.datasketches.memory.WritableHandle;
-import org.apache.datasketches.memory.WritableMemory;
-
-public class CheckMemoryJar {
-
- public void printJDK() {
- String JdkVersionString = System.getProperty("java.version");
- int JdkMajorVersion = getJavaMajorVersion(JdkVersionString);
- println("JDK Full Version : " + JdkVersionString);
- println("JDK Major Version: " + JdkMajorVersion);
- println("");
- }
-
- public void checkHeapWritableMemory() {
- try {
- String str = "1 - Heap WritableMemory Successful";
- WritableMemory mem = WritableMemory.allocate(2 * str.length());
- writeReadAndPrintString(mem, str);
- } catch (Exception ex) {
- exitOnError("Heap Writable Memory", ex);
- }
- }
-
- public void checkAllocateDirect() throws Exception {
- try {
- String str = "2 - Allocate Direct Successful";
- WritableHandle wh = WritableMemory.allocateDirect(2 * str.length());
- WritableMemory wmem = wh.getWritable();
- writeReadAndPrintString(wmem, str);
- wh.close();
- } catch (Exception ex) {
- exitOnError("Allocate Direct", ex);
- }
- }
-
- public void checkByteBuffer() throws Exception {
- try {
- String str = "3 - Map ByteBuffer Successful";
- ByteBuffer bb = ByteBuffer.allocateDirect(2 * str.length());
- bb.order(ByteOrder.nativeOrder());
- WritableMemory wmem = WritableMemory.writableWrap(bb);
- writeReadAndPrintString(wmem, str);
- } catch (Exception ex) {
- exitOnError("Map ByteBuffer", ex);
- }
- }
-
- public void checkMap(String mappedFilePath) throws Exception {
- try {
- String str = "4 - Memory Map Successful";
- File file = new File(mappedFilePath);
- MapHandle mh = Memory.map(file);
- Memory mem = mh.get();
- mh.close();
- println(str);
- } catch (Exception ex) {
- exitOnError("Memory Map", ex);
- }
- }
-
- public static void main(final String[] args) throws Exception {
- if (args.length < 1) {
- System.out.println("Please provide the full path to the memory mapped file!");
- System.exit(1);
- }
-
- String mappedFilePath = args[0];
- CheckMemoryJar check = new CheckMemoryJar();
- check.printJDK();
- check.checkHeapWritableMemory();
- check.checkAllocateDirect();
- check.checkByteBuffer();
- check.checkMap(mappedFilePath);
- println("");
- println("All checks passed.");
- }
-
- /**********************/
-
- private static void writeReadAndPrintString(WritableMemory wmem, String str) {
- int len = str.length();
- char[] cArr1 = str.toCharArray();
- wmem.putCharArray(0, cArr1, 0, len);
- char[] cArr2 = new char[len];
- wmem.getCharArray(0, cArr2, 0, len);
- String s2 = String.valueOf(cArr2);
- println(s2);
- }
-
- private static void exitOnError(String checkName, Exception ex){
- println(checkName + " check failed. Error: " + ex.toString());
- System.exit(1);
- }
-
- private static int getJavaMajorVersion(final String jdkVersion) {
- int[] verArr = parseJavaVersion(jdkVersion);
- return (verArr[0] == 1) ? verArr[1] : verArr[0];
- }
-
- /**
- * Returns first two number groups of the java version string.
- * @param jdkVersion the java version string from System.getProperty("java.version").
- * @return first two number groups of the java version string.
- */
- private static int[] parseJavaVersion(final String jdkVersion) {
- final int p0, p1;
- try {
- String[] parts = jdkVersion.trim().split("[^0-9\\.]");//grab only number groups and "."
- parts = parts[0].split("\\."); //split out the number groups
- p0 = Integer.parseInt(parts[0]); //the first number group
- p1 = (parts.length > 1) ? Integer.parseInt(parts[1]) : 0; //2nd number group, or 0
- } catch (final NumberFormatException | ArrayIndexOutOfBoundsException e) {
- throw new IllegalArgumentException("Improper Java -version string: " + jdkVersion + "\n" + e);
- }
- return new int[] {p0, p1};
- }
-
- private static void println(Object obj) { System.out.println(obj.toString()); }
-}
diff --git a/tools/scripts/assets/LoremIpsum.txt b/tools/scripts/assets/LoremIpsum.txt
deleted file mode 100644
index 5c0dbb27..00000000
--- a/tools/scripts/assets/LoremIpsum.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas id fermentum sem. Donec malesuada tristique erat vitae molestie. In urna eros, scelerisque ut finibus a, commodo et felis. Sed lacinia lacus ex, sit amet imperdiet tortor rutrum dictum. Nunc turpis dolor, placerat non condimentum quis, suscipit ut libero. Morbi suscipit porta nibh, sit amet bibendum erat posuere maximus. Pellentesque egestas magna sed purus scelerisque aliquam. Vestibulum placerat odio risus, nec semper sapien imperdiet eu.
-
-Suspendisse vitae elit urna. Donec orci dolor, ullamcorper ut felis eget, porta facilisis ante. Vivamus odio quam, porta sed sapien quis, sodales tincidunt ligula. Donec porttitor.
\ No newline at end of file
diff --git a/tools/scripts/package-multi-release-jar.sh b/tools/scripts/package-multi-release-jar.sh
deleted file mode 100755
index 57b423ec..00000000
--- a/tools/scripts/package-multi-release-jar.sh
+++ /dev/null
@@ -1,189 +0,0 @@
-#!/bin/bash -e
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# This is a general bash script to build a datasketches-memory-X.jar
-# with multi-release functionality. The sources, test-sources, tests and
-# javadoc jars are also included in the output.
-# It does use git and also uses the script get-git-properties.sh.
-#
-# NOTE: This script assumes that `mvn package` has been run prior to invocation.
-# By default, it is called from the maven exec-plugin.
-
-# Required Input Parameters:
-# \$1 = absolute path of JDK home directory
-# \$2 = Git Version Tag for this deployment
-# Example tag for SNAPSHOT : 1.0.0-SNAPSHOT
-# Example tag for Release Candidate: 1.0.0-RC1
-# Example tag for Release : 1.0.0
-# \$3 = absolute path of project.basedir
-# For example: $ .sh $JAVA_HOME 2.1.0 .
-
-if [ -z "$1" ]; then echo "Missing JDK home"; exit 1; fi
-if [ -z "$2" ]; then echo "Missing Git Tag"; exit 1; fi
-if [ -z "$3" ]; then echo "Missing project.basedir"; exit 1; fi
-
-#### Extract JDKHome, Version and ProjectBaseDir from input parameters ####
-JDKHome=$1
-GitTag=$2
-ProjectBaseDir=$3 #this must be an absolute path
-
-#### Setup absolute directory references ####
-ProjectArtifactId="datasketches-memory"
-ScriptsDir=${ProjectBaseDir}/tools/scripts/
-
-#### Initialise path dependent variables ####
-OutputDir=target
-OutputMrJar=${OutputDir}/datasketches-memory-${GitTag}.jar
-OutputTests=${OutputDir}/datasketches-memory-${GitTag}-tests.jar
-OutputJavaDoc=${OutputDir}/datasketches-memory-${GitTag}-javadoc.jar
-OutputSources=${OutputDir}/datasketches-memory-${GitTag}-sources.jar
-OutputTestSources=${OutputDir}/datasketches-memory-${GitTag}-test-sources.jar
-
-ArchiveDir=${OutputDir}/archive-tmp
-PackageSources=${ArchiveDir}/sources
-PackageTestSources=${ArchiveDir}/test-sources
-PackageTests=${ArchiveDir}/tests
-PackageJavaDoc=${ArchiveDir}/javadoc
-PackageMrJar=${ArchiveDir}/jar
-
-#### Move to project directory ####
-cd ${ProjectBaseDir}
-
-#### Use JAVA_HOME to set required executables ####
-if [[ -n "$JDKHome" ]] && [[ -x "${JDKHome}/bin/jar" ]]; then Jar_="${JDKHome}/bin/jar"; else echo "No jar version could be found."; exit 1; fi
-
-MemoryJava8Classes=datasketches-memory-java8/target/classes
-MemoryJava8TestClasses=datasketches-memory-java8/target/test-classes
-MemoryJava8Sources=datasketches-memory-java8/src/main/java
-MemoryJava8TestSources=datasketches-memory-java8/src/test/java
-MemoryJava8Docs=datasketches-memory-java8/target/apidocs/
-MemoryJava11Classes=datasketches-memory-java11/target/classes
-MemoryJava11Sources=datasketches-memory-java11/src/main/java
-MemoryJava8Docs=datasketches-memory-java8/target/apidocs/
-MavenArchiver=target/maven-archiver
-
-if ! [[ -x "${MemoryJava8Classes}" ]]; then echo "No compiled classes - run mvn package first."; exit 1; fi
-if ! [[ -x "${MemoryJava8TestClasses}" ]]; then echo "No compiled test classes - run mvn package first."; exit 1; fi
-if ! [[ -x "${MemoryJava11Classes}" ]]; then echo "No compiled classes - run mvn package first."; exit 1; fi
-if ! [[ -x "${MemoryJava8Docs}" ]]; then echo "No javadocs - run mvn package first."; exit 1; fi
-if ! [[ -x "${MavenArchiver}" ]]; then echo "No maven archiver - run mvn package first."; exit 1; fi
-
-#### Cleanup and setup output directories ####
-echo
-if [ -d "$OutputDir" ]; then rm -f $OutputDir/*.jar; fi
-if [ -d "$ArchiveDir" ]; then rm -r $ArchiveDir; fi
-
-mkdir -p $PackageSources
-mkdir -p $PackageTestSources
-mkdir -p $PackageTests
-mkdir -p $PackageJavaDoc
-mkdir -p $PackageMrJar
-
-#### JAR Metadata function
-prepare_jar () {
- JarBase=$1
- JarMeta=${JarBase}/META-INF
- JarMaven=${JarMeta}/maven/org.apache.datasketches/datasketches-memory
-
- mkdir -p ${JarMeta}/versions/11
- mkdir -p ${JarMaven}
-
- #### Generate DEPENDENCIES ####
- cat >> ${JarMeta}/DEPENDENCIES<< EOF
-// ------------------------------------------------------------------
-// Transitive dependencies of this project determined from the
-// maven pom organized by organization.
-// ------------------------------------------------------------------
-EOF
-
- #### Copy LICENSE and NOTICE ####
- cp LICENSE $JarMeta
- cp NOTICE $JarMeta
-
- #### Copy pom.properties
- cp ${MavenArchiver}/pom.properties $JarMaven
- cp pom.xml $JarMaven
-
-}
-
-#### Generate MANIFEST.MF ####
-cat >> ${ArchiveDir}/MANIFEST.MF<< EOF
-Manifest-Version: 1.0
-Created-By: Apache Datasketches Memory package-mr-jar.sh
-Multi-Release: true
-EOF
-#### Generate git.properties file ####
-echo "$($ScriptsDir/get-git-properties.sh $ProjectBaseDir $ProjectArtifactId $GitTag)" >> ${ArchiveDir}/MANIFEST.MF
-
-###########################
-#### MULTI-RELEASE JAR ####
-###########################
-prepare_jar $PackageMrJar
-#### Copy java 8 compiled classes to target/jar
-rsync -q -a -I --filter="- .*" ${MemoryJava8Classes}/org $PackageMrJar
-#### Copy java 11 compiled classes to target/jar/META-INF/versions/11
-rsync -q -a -I --filter="- .*" ${MemoryJava11Classes}/org ${PackageMrJar}/META-INF/versions/11
-cp ${MemoryJava11Classes}/module-info.class ${PackageMrJar}/META-INF/versions/11
-
-${Jar_} cfm $OutputMrJar ${ArchiveDir}/MANIFEST.MF -C $PackageMrJar .
-echo "Created multi-release jar ${OutputMrJar}"
-
-###########################
-#### TESTS JAR ####
-###########################
-prepare_jar $PackageTests
-#### Copy java 8 compiled test classes to target/jar
-rsync -q -a -I --filter="- .*" ${MemoryJava8TestClasses}/org $PackageTests
-
-${Jar_} cfm $OutputTests ${ArchiveDir}/MANIFEST.MF -C $PackageTests .
-echo "Created tests jar ${OutputTests}"
-
-###########################
-#### SOURCES JAR ####
-###########################
-prepare_jar $PackageSources
-#### Copy java 8 source files to target/sources
-rsync -q -a -I --filter="- .*" ${MemoryJava8Sources}/org $PackageSources
-#### Copy java 11 source files to target/sources/META-INF/versions/11
-rsync -q -a -I --filter="- .*" ${MemoryJava11Sources}/org ${PackageSources}/META-INF/versions/11
-cp ${MemoryJava11Sources}/module-info.java ${PackageSources}/META-INF/versions/11
-
-${Jar_} cfm $OutputSources ${ArchiveDir}/MANIFEST.MF -C $PackageSources .
-echo "Created sources jar ${OutputSources}"
-
-###########################
-#### TEST SOURCES JAR ####
-###########################
-prepare_jar $PackageTestSources
-#### Copy java 8 test source files to target/test-sources
-rsync -q -a -I --filter="- .*" ${MemoryJava8TestSources}/org $PackageTestSources
-
-${Jar_} cfm $OutputTestSources ${ArchiveDir}/MANIFEST.MF -C $PackageTestSources .
-echo "Created test sources jar ${OutputTestSources}"
-
-###########################
-#### JAVADOC JAR ####
-###########################
-prepare_jar $PackageJavaDoc
-
-rsync -q -a -I --filter="- .*" ${MemoryJava8Docs} $PackageJavaDoc
-${Jar_} cfm $OutputJavaDoc ${ArchiveDir}/MANIFEST.MF -C $PackageJavaDoc .
-echo "Created javadoc jar ${OutputJavaDoc}"
-
-echo "$($ScriptsDir/test-jar.sh $JDKHome $GitTag $OutputMrJar $ProjectBaseDir)"
diff --git a/tools/scripts/package-single-release-jar.sh b/tools/scripts/package-single-release-jar.sh
deleted file mode 100755
index e58ff570..00000000
--- a/tools/scripts/package-single-release-jar.sh
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/bin/bash -e
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# This is a general bash script to build a JDK version-specific
-# datasketches-memory-X.jar without multi-release functionality.
-# This is intended to be used for developers compiling from source
-# who do not wish to install several versions of the JDK on their
-# machine.
-# The script does not assume a POM file and does not use Maven.
-# It does use git and also uses the script get-git-properties.sh and
-# test-jar.sh scripts.
-
-# Required Input Parameters:
-# \$1 = absolute path of JDK home directory
-# \$2 = Git Version Tag for this deployment
-# Example tag for SNAPSHOT : 1.0.0-SNAPSHOT
-# Example tag for Release Candidate: 1.0.0-RC1
-# Example tag for Release : 1.0.0
-# \$3 = absolute path of project.basedir
-# For example: $ .sh $JAVA_HOME 2.1.0 .
-
-if [ -z "$1" ]; then echo "Missing JDK home"; exit 1; fi
-if [ -z "$2" ]; then echo "Missing Git Tag"; exit 1; fi
-if [ -z "$3" ]; then echo "Missing project.basedir"; exit 1; fi
-
-#### Extract JDKHome, Version and ProjectBaseDir from input parameters ####
-JDKHome=$1
-GitTag=$2
-ProjectBaseDir=$3 #this must be an absolute path
-
-#### Setup absolute directory references ####
-ProjectArtifactId="memory"
-ScriptsDir=${ProjectBaseDir}/tools/scripts/
-MemoryMapFile=$ScriptsDir/assets/LoremIpsum.txt
-
-#### Initialise path dependent variables ####
-OutputDir=target
-OutputJar=${OutputDir}/org.apache.datasketches.memory-${GitTag}.jar
-
-PackageDir=${OutputDir}/archive-tmp
-PackageSrc=${PackageDir}/src
-PackageTests=${PackageDir}/test-classes
-PackageContents=${PackageDir}/contents
-PackageMeta=${PackageContents}/META-INF
-PackageManifest=${PackageMeta}/MANIFEST.MF
-
-MemoryJava8Src=datasketches-memory-java8/src/main/java
-MemoryJava11Src=datasketches-memory-java11/src/main/java
-
-#### Move to project directory ####
-cd ${ProjectBaseDir}
-
-#### Use JAVA_HOME to set required executables ####
-if [[ -n "$JDKHome" ]] && [[ -x "${JDKHome}/bin/java" ]]; then Java_="${JDKHome}/bin/java"; else echo "No java version could be found."; exit 1; fi
-if [[ -n "$JDKHome" ]] && [[ -x "${JDKHome}/bin/javac" ]]; then Javac_="${JDKHome}/bin/javac"; else echo "No javac version could be found."; exit 1; fi
-if [[ -n "$JDKHome" ]] && [[ -x "${JDKHome}/bin/jar" ]]; then Jar_="${JDKHome}/bin/jar"; else echo "No jar version could be found."; exit 1; fi
-
-#### Parse java -version into major version number ####
-if [[ "$Java_" ]]; then
- # This expression extracts the correct major version of the Java runtime.
- # For older runtime versions, such as 1.8, the leading '1.' is removed.
- # Adapted from this answer on StackOverflow:
- # https://stackoverflow.com/questions/7334754/correct-way-to-check-java-version-from-bash-script/56243046#56243046
- JavaVersion=$("$Java_" -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1)
-else
- echo "No version information could be determined from installed JDK."; exit 1;
-fi
-
-# Exit if Java version too low (< 8) or too high (> 13)
-if [[ $JavaVersion -lt 8 || $JavaVersion -gt 13 ]]; then
- echo "Java version not supported: " $JavaVersion; exit 1;
-fi
-
-#### Cleanup and setup output directories ####
-echo
-if [ -d "$OutputDir" ]; then rm -r $OutputDir; fi
-mkdir -p $PackageSrc
-mkdir -p $PackageTests
-mkdir -p $PackageMeta
-
-#### Copy LICENSE and NOTICE ####
-cp LICENSE $PackageMeta
-cp NOTICE $PackageMeta
-
-#### Generate MANIFEST.MF ####
-cat >> ${PackageManifest}<< EOF
-Manifest-Version: 1.0
-Created-By: Apache Datasketches Memory package-single-release-jar.sh
-Multi-Release: false
-EOF
-
-#### Generate git.properties file ####
-echo "$($ScriptsDir/get-git-properties.sh $ProjectBaseDir $ProjectArtifactId $GitTag)" >> $PackageManifest
-
-#### Copy source tree to target/src
-rsync -a -I $MemoryJava8Src $PackageSrc
-
-if [[ $JavaVersion -gt 10 ]]; then
- #### Copy java 11 src trees to target/src, overwriting replacements
- rsync -a -I $MemoryJava11Src $PackageSrc
-fi
-
-#### Compile ####
-echo "--- CLEAN & COMPILE ---"
-echo
-echo "Compiling with JDK version $JavaVersion..."
-if [[ $JavaVersion -lt 9 ]]; then
- ${Javac_} -d $PackageContents $(find $PackageSrc -name '*.java')
-else
- # Compile with JPMS exports
- ${Javac_} \
- --add-exports java.base/jdk.internal.ref=org.apache.datasketches.memory \
- --add-exports java.base/sun.nio.ch=org.apache.datasketches.memory \
- -d $PackageContents $(find $PackageSrc -name '*.java')
-fi
-echo
-echo "--- JARS ---"
-echo
-echo "Building JAR from ${PackageContents}..."
-${Jar_} cfm $OutputJar ${PackageManifest} -C $PackageContents .
-echo
-echo "Successfully built ${OutputJar}"
-
-# Uncomment this section to display JAR contents
-# echo "--- JAR CONTENTS ---"
-# echo
-# ${Jar_} tf ${OutputJar}
-# echo
-
-echo "$($ScriptsDir/test-jar.sh $JDKHome $GitTag $OutputJar $ProjectBaseDir)"
diff --git a/tools/scripts/sign-deploy-jar.sh b/tools/scripts/sign-deploy-jar.sh
index 646e5647..723c3ed6 100755
--- a/tools/scripts/sign-deploy-jar.sh
+++ b/tools/scripts/sign-deploy-jar.sh
@@ -17,21 +17,31 @@
# specific language governing permissions and limitations
# under the License.
-# This is a general bash script to sign and deploy a datasketches-memory-X.jar.
-# This is intended to be used for releasing the Memory component to Maven central.
+# This is a general bash script to sign and deploy datasketches-memory-X.Y.Z.jars to Nexus.
+# This assumes that the jar files exist with X.Y.Z suffix in /target/
+# and were created by "mvn clean install".
+# Also the project.basedir must be set to the X.Y.X candidate at the correct git hash
+# and there must be an X.Y.Z tag at that git hash.
+
+# Even for release candidates, e.g. "-RCn", it is recommended to deploy the candidates
+# without the "-RCn". If the candidate succeeds, it is trivial just "release" them in Nexus.
+# If the candidate does not succeed, you can just "drop" them in Nexus for the next round.
# Required Input Parameters:
-# \$1 = Git Version Tag for this deployment
-# Example tag for SNAPSHOT : 1.0.0-SNAPSHOT
-# Example tag for Release Candidate: 1.0.0-RC1
-# Example tag for Release : 1.0.0
+# \$1 = Git Version Tag for this deployment (with -SNAPSHOT is OK, but rarely needed)
+# Example tag for Release : 1.0.0 //always use this form
# \$2 = absolute path of project.basedir
-# For example: $ .sh 2.1.0 .
+
+# For example, from the scripts directory: $ ./sign-deploy-jar.sh 3.0.0 ${project.basedir}
#### Extract GitTag, TestJar and ProjectBaseDir from input parameters ####
GitTag=$1
ProjectBaseDir=$2
+#### Common Variables ####
+GroupId="org.apache.datasketches"
+ArtifactId="datasketches-memory"
+
#### Setup absolute directory references ####
OutputDir=${ProjectBaseDir}/target
@@ -63,6 +73,8 @@ fi;
mvn org.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign-and-deploy-file \
-Durl=$DistributionsUrl\
-DrepositoryId=$DistributionsId \
+ -DgroupId=${GroupId} \
+ -DartifactId=${ArtifactId} \
-Dfile=$OutputMrJar \
-Dsources=$OutputSources \
-Dfiles=$OutputTests,$OutputTestSources \
diff --git a/tools/scripts/test-jar.sh b/tools/scripts/test-jar.sh
deleted file mode 100755
index a565073c..00000000
--- a/tools/scripts/test-jar.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/bash -e
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# This is a general bash script to test a datasketches-memory-X.jar.
-# This is intended to be used for C/I matrix testing or for quick
-# verification of the output from the assembly process.
-
-# Required Input Parameters:
-# \$1 = absolute path of JDK home directory
-# \$2 = Git Version Tag for this deployment
-# Example tag for SNAPSHOT : 1.0.0-SNAPSHOT
-# Example tag for Release Candidate: 1.0.0-RC1
-# Example tag for Release : 1.0.0
-# \$3 = absolute path of datasketches-memory-X.jar
-# \$4 = absolute path of project.basedir
-# For example: $ .sh $JAVA_HOME 2.1.0 target/datasketches-memory-X.jar .
-
-#### Extract JDKHome, Version, TestJar and ProjectBaseDir from input parameters ####
-JDKHome=$1
-GitTag=$2
-TestJar=$3
-ProjectBaseDir=$4
-
-#### Setup absolute directory references ####
-ProjectArtifactId="memory"
-ScriptsDir=${ProjectBaseDir}/tools/scripts/
-MemoryMapFile=$ScriptsDir/assets/LoremIpsum.txt
-
-#### Initialise path dependent variables ####
-PackageChecks=target/archive-tmp/checks
-
-#### Move to project directory ####
-cd ${ProjectBaseDir}
-
-#### Use JAVA_HOME to set required executables ####
-if [[ -n "$JDKHome" ]] && [[ -x "${JDKHome}/bin/java" ]]; then Java_="${JDKHome}/bin/java"; else echo "No java version could be found."; exit 1; fi
-if [[ -n "$JDKHome" ]] && [[ -x "${JDKHome}/bin/javac" ]]; then Javac_="${JDKHome}/bin/javac"; else echo "No javac version could be found."; exit 1; fi
-if [[ -n "$JDKHome" ]] && [[ -x "${JDKHome}/bin/jar" ]]; then Jar_="${JDKHome}/bin/jar"; else echo "No jar version could be found."; exit 1; fi
-
-#### Parse java -version into major version number ####
-if [[ "$Java_" ]]; then
- # This expression extracts the correct major version of the Java runtime.
- # For older runtime versions, such as 1.8, the leading '1.' is removed.
- # Adapted from this answer on StackOverflow:
- # https://stackoverflow.com/questions/7334754/correct-way-to-check-java-version-from-bash-script/56243046#56243046
- JavaVersion=$("$Java_" -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1)
-else
- echo "No version information could be determined from installed JDK."; exit 1;
-fi
-
-# Exit if Java version too low (< 8) or too high (> 13)
-if [[ $JavaVersion -lt 8 || $JavaVersion -gt 13 ]]; then
- echo "Java version not supported: " $JavaVersion; exit 1;
-fi
-
-#### Cleanup and setup output directories ####
-echo
-if [ -d "$PackageChecks" ]; then rm -r $PackageChecks; fi
-mkdir -p $PackageChecks
-
-echo "--- RUN JAR CHECKS ---"
-echo
-if [[ $JavaVersion -eq 8 ]]; then
- ${Javac_} -cp $TestJar -d $PackageChecks $(find ${ScriptsDir/assets} -name '*.java')
- ${Java_} -cp $PackageChecks:$TestJar org.apache.datasketches.memory.tools.scripts.CheckMemoryJar $MemoryMapFile
-else
- ${Javac_} \
- --add-modules org.apache.datasketches.memory \
- -p "$TestJar" -d $PackageChecks $(find ${ScriptsDir/assets} -name '*.java')
-
- ${Java_} \
- --add-modules org.apache.datasketches.memory \
- --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 \
- -p $TestJar -cp $PackageChecks org.apache.datasketches.memory.tools.scripts.CheckMemoryJar $MemoryMapFile
-fi
-echo
-echo "Successfully checked ${TestJar}"
diff --git a/tools/toolchains.xml b/tools/toolchains.xml
deleted file mode 100644
index 9ab86f2b..00000000
--- a/tools/toolchains.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
- jdk
-
- 1.8
- openjdk
-
-
- ${env.JAVA8_HOME}
-
-
-
- jdk
-
- 8
- openjdk
-
-
- ${env.JAVA8_HOME}
-
-
-
- jdk
-
- 11
- openjdk
-
-
- ${env.JAVA11_HOME}
-
-
-
\ No newline at end of file