Skip to content

Apache Release DataSketches-Java 7.0.0

Latest
Compare
Choose a tag to compare
@leerho leerho released this 09 Jan 18:36
· 8 commits to main since this release
e37a4a7

What's Changed

  • This release runs on Java 17.

  • This release leverages the new Java Foreign Function & Memory (FFM) API capability (JEP 412), which is in incubation in Java 17. This means that Java 17 is required to compile this code and at runtime. The location of the FFM code was moved from jdk.incubator.foreign in Java 17 to its position for preview in Java 21 at java.base/java.lang.foreign. As a result, code compiled with Java 17 FFM will not run with Java 21, the next LTS. Java does not provide backward compatibility for older incubation code.

  • There are some changes in the DataSketches-Java API, due to the switch to leveraging the new FFM code, especially for methods that must deal with off-heap memory. These changes are a result of the DataSketches-Java-7.0.0 dependency on DataSketches-Memory-4.1.0, which manages all the direct memory.

For example, to allocate direct (off-heap) memory:

DataSketches-Java 6.1.1 using DataSketches-Memory 3.0.2 (Java 8, 11)

    try (WritableMemory wmem = WritableMemory.allocateDirect(4096)) {
      ...
    } //wmem is closed

where WritableMemory is a class of DataSketches-Memory.

In DataSketches-Java 7.0.0 using DataSketches-Memory 4.1.0 (Java 17)

    try (ResourceScope scope = (wmem = WritableMemory.allocateDirect(4096).scope()) {
      ...
    } //wmem is closed

where ResourceScope is an FFM class.


Full Changelog: 6.0.0...7.0.0