You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2024/05/28 17:38:58 UTC
(datasketches-memory) branch integrateJava17_v3 updated (4fab7e4 -> a6fa005)
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a change to branch integrateJava17_v3
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
from 4fab7e4 Add tests from "java17old"
new 1a8c9a7 Change method of accessing Resource file GettysburgAddress.txt
new 74bccd3 Remove SuppressWarnings("javadoc")
new 66600b4 Temporary commit
new a6fa005 update poms.
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/.toolchains.xml | 26 +++-
.github/workflows/auto-jdk-matrix.yml | 15 ++-
datasketches-memory-java11/pom.xml | 143 ++++++++++-----------
datasketches-memory-java17/pom.xml | 12 +-
.../src/main/java/module-info.java | 30 -----
.../AllocateDirectWritableMapMemoryTest.java | 4 +-
datasketches-memory-java8/pom.xml | 15 ++-
.../apache/datasketches/memory/internal/Util.java | 2 +-
.../internal/AllocateDirectMapMemoryTest.java | 16 +--
.../AllocateDirectWritableMapMemoryTest.java | 8 +-
.../datasketches/memory/internal/TestUtil.java} | 29 +++--
pom.xml | 97 ++++++--------
12 files changed, 188 insertions(+), 209 deletions(-)
delete mode 100644 datasketches-memory-java17/src/main/java/module-info.java
copy datasketches-memory-java8/src/{main/java/org/apache/datasketches/memory/internal/Ints.java => test/java/org/apache/datasketches/memory/internal/TestUtil.java} (61%)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org
(datasketches-memory) 04/04: update poms.
Posted by le...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch integrateJava17_v3
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
commit a6fa005d34a5e87f59ff1a4a7ca6b613e057f4a2
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Tue May 28 10:38:45 2024 -0700
update poms.
Fix getResource, which has changed.
Remove module-info.
---
datasketches-memory-java11/pom.xml | 143 ++++++++++-----------
datasketches-memory-java17/pom.xml | 12 +-
.../src/main/java/module-info.java | 30 -----
.../AllocateDirectWritableMapMemoryTest.java | 11 +-
datasketches-memory-java8/pom.xml | 15 ++-
pom.xml | 97 ++++++--------
6 files changed, 130 insertions(+), 178 deletions(-)
diff --git a/datasketches-memory-java11/pom.xml b/datasketches-memory-java11/pom.xml
index e6446b3..2dd0d8b 100644
--- a/datasketches-memory-java11/pom.xml
+++ b/datasketches-memory-java11/pom.xml
@@ -1,83 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-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
+ ~ 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.
+ -->
+<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">
- http://www.apache.org/licenses/LICENSE-2.0
+ <modelVersion>4.0.0</modelVersion>
-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.
--->
-<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.datasketches</groupId>
+ <artifactId>datasketches-memory</artifactId>
+ <version>2.3.0-SNAPSHOT</version>
+ </parent>
- <modelVersion>4.0.0</modelVersion>
+ <artifactId>datasketches-memory-java11</artifactId>
+ <name>${project.artifactId}</name>
+ <packaging>jar</packaging>
- <parent>
- <groupId>org.apache.datasketches</groupId>
- <artifactId>datasketches-memory-root</artifactId>
- <version>2.3.0-SNAPSHOT</version>
- </parent>
+ <properties>
+ <java.version>11</java.version>
+ <jdk-toolchain.version>11</jdk-toolchain.version>
+ <maven.compiler.source>${java.version}</maven.compiler.source>
+ <maven.compiler.target>${java.version}</maven.compiler.target>
+ </properties>
- <artifactId>datasketches-memory-java11</artifactId>
- <name>${project.artifactId}</name>
- <packaging>jar</packaging>
-
- <properties>
- <java.version>11</java.version>
- <testng.version>7.7.1</testng.version>
- <jdk-toolchain.version>11</jdk-toolchain.version>
- <maven.compiler.source>${java.version}</maven.compiler.source>
- <maven.compiler.target>${java.version}</maven.compiler.target>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>${testng.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <!-- Used for UTF8 testing -->
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <!-- Used for xxHash testing -->
- <groupId>net.openhft</groupId>
- <artifactId>zero-allocation-hashing</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <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>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
+ <build>
+ <resources>
+ <resource>
+ <directory>${project.basedir}/src/main/javadoc</directory>
+ </resource>
+ </resources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${maven-compiler-plugin.version}</version>
+ <configuration>
+ <jdkToolchain>
+ <version>${jdk-toolchain.version}</version>
+ </jdkToolchain>
+ <source>${maven.compiler.source}</source>
+ <target>${maven.compiler.target}</target>
+ <compilerArgs>
+ <arg>--add-exports</arg>
+ <arg>java.base/jdk.internal.ref=org.apache.datasketches.memory</arg>
+ <arg>--add-exports</arg>
+ <arg>java.base/jdk.internal.misc=org.apache.datasketches.memory</arg>
+ <arg>--add-exports</arg>
+ <arg>java.base/sun.nio.ch=org.apache.datasketches.memory</arg>
+ <arg>--add-opens</arg>
+ <arg>java.base/sun.nio.ch=org.apache.datasketches.memory</arg>
+ <arg>--add-opens</arg>
+ <arg>java.base/java.nio=org.apache.datasketches.memory</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
</project>
diff --git a/datasketches-memory-java17/pom.xml b/datasketches-memory-java17/pom.xml
index 165ac15..5712cd2 100644
--- a/datasketches-memory-java17/pom.xml
+++ b/datasketches-memory-java17/pom.xml
@@ -18,15 +18,14 @@ 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.datasketches</groupId>
- <artifactId>datasketches-memory-root</artifactId>
+ <artifactId>datasketches-memory</artifactId>
<version>2.3.0-SNAPSHOT</version>
</parent>
@@ -36,7 +35,6 @@ under the License.
<properties>
<java.version>17</java.version>
- <testng.version>7.7.1</testng.version>
<jdk-toolchain.version>17</jdk-toolchain.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
@@ -46,7 +44,7 @@ under the License.
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
+ <version>7.10.0</version><!--$NO-MVN-MAN-VER$-->
<scope>test</scope>
</dependency>
<dependency>
@@ -84,7 +82,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>${maven-exec-plugin.version}</version><!--$NO-MVN-MAN-VER$-->
+ <version>${exec-maven-plugin.version}</version><!--$NO-MVN-MAN-VER$-->
<executions>
<execution>
<id>package-mr-jar</id>
diff --git a/datasketches-memory-java17/src/main/java/module-info.java b/datasketches-memory-java17/src/main/java/module-info.java
deleted file mode 100644
index b71045c..0000000
--- a/datasketches-memory-java17/src/main/java/module-info.java
+++ /dev/null
@@ -1,30 +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.
- */
-/**
- * The DataSketches Memory Java Module.
- * @author lrhodes
- */
-module org.apache.datasketches.memory {
- requires java.base;
- requires java.logging;
- requires jdk.unsupported;
- requires jdk.incubator.foreign;
-
- exports org.apache.datasketches.memory;
-}
\ No newline at end of file
diff --git a/datasketches-memory-java17/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java b/datasketches-memory-java17/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
index 500ee42..76aa2a0 100644
--- a/datasketches-memory-java17/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
+++ b/datasketches-memory-java17/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
@@ -24,7 +24,6 @@
package org.apache.datasketches.memory.internal;
import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.apache.datasketches.memory.internal.TestUtil.gettysPath;
import static org.apache.datasketches.memory.internal.Util.getResourceFile;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
@@ -58,9 +57,9 @@ public class AllocateDirectWritableMapMemoryTest {
@Test
public void simpleMap()
- throws IllegalArgumentException, InvalidPathException, IllegalStateException, UnsupportedOperationException,
- IOException, SecurityException {
- File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
+ throws IllegalArgumentException, InvalidPathException, IllegalStateException,
+ UnsupportedOperationException, IOException, SecurityException {
+ File file = getResourceFile("GettysburgAddress.txt");
Memory mem = null;
try (ResourceScope scope = ResourceScope.newConfinedScope()) {
mem = Memory.map(file,scope);
@@ -144,7 +143,7 @@ public class AllocateDirectWritableMapMemoryTest {
public void simpleMap2()
throws IllegalArgumentException, InvalidPathException, IllegalStateException, UnsupportedOperationException,
IOException, SecurityException {
- File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
+ File file = getResourceFile("GettysburgAddress.txt");
assertTrue(file.canRead());
assertFalse(file.canWrite());
WritableMemory wmem = null;
@@ -158,7 +157,7 @@ public class AllocateDirectWritableMapMemoryTest {
public void checkReadException()
throws IllegalArgumentException, InvalidPathException, IllegalStateException, UnsupportedOperationException,
IOException, SecurityException {
- File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
+ File file = getResourceFile("GettysburgAddress.txt");
WritableMemory wmem = null;
try (ResourceScope scope = ResourceScope.newConfinedScope()) {
wmem = WritableMemory.writableMap(file, 0, 1 << 20, scope, ByteOrder.nativeOrder());
diff --git a/datasketches-memory-java8/pom.xml b/datasketches-memory-java8/pom.xml
index 11786da..317a0cb 100644
--- a/datasketches-memory-java8/pom.xml
+++ b/datasketches-memory-java8/pom.xml
@@ -17,14 +17,14 @@
~ 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
- http://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-root</artifactId>
+ <artifactId>datasketches-memory</artifactId>
<version>2.3.0-SNAPSHOT</version>
</parent>
@@ -33,8 +33,7 @@
<packaging>jar</packaging>
<properties>
- <java.version>1.8</java.version>
- <testng.version>7.5</testng.version>
+ <java.version>8</java.version>
<jdk-toolchain.version>8</jdk-toolchain.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
@@ -46,7 +45,6 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -64,6 +62,11 @@
</dependencies>
<build>
+ <resources>
+ <resource>
+ <directory>${project.basedir}/src/main/javadoc</directory>
+ </resource>
+ </resources>
<pluginManagement>
<plugins>
<plugin>
diff --git a/pom.xml b/pom.xml
index 734014d..1beed8c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,20 +20,13 @@ 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 http://maven.apache.org/maven-v4_0_0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache</groupId>
- <artifactId>apache</artifactId>
- <version>23</version>
- </parent>
-
<groupId>org.apache.datasketches</groupId>
- <artifactId>datasketches-memory-root</artifactId>
+ <artifactId>datasketches-memory</artifactId>
<version>2.3.0-SNAPSHOT</version>
- <!-- Required for multi-module project -->
<packaging>pom</packaging>
<name>${project.artifactId}</name>
@@ -66,8 +59,8 @@ under the License.
</scm>
<issueManagement>
- <!-- <system>jira</system>
- <url>https://issues.apache.org/jira/browse/DATASKETCHES</url> -->
+ <!-- <system>jira</system> -->
+ <!-- <url>https://issues.apache.org/jira/browse/DATASKETCHES</url> -->
<system>GitHub</system>
<url>https://github.com/apache/${project.artifactId}/issues</url>
</issueManagement>
@@ -82,27 +75,17 @@ under the License.
</developer>
</developers>
-
- <!-- Note
- The datasketches-memory submodule uses the Maven project-aggregation feature and does not inherit
- from this root module as a parent; so that there is no runtime dependency on the parent project (root module).
- As a result, some properties from this POM (including the version) are duplicated in the datasketches-memory
- module for inclusion in the assembled artifacts. For more information, see:
- https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Aggregation
- -->
-
<properties>
- <!-- UNIQUE FOR THIS JAVA COMPONENT -->
- <protobuf-java.version>4.0.0-rc-2</protobuf-java.version>
+ <protobuf-java.version>4.0.0-rc-1</protobuf-java.version>
<!-- Used for UTF8 testing -->
- <zero-allocation-hashing.version>0.15</zero-allocation-hashing.version>
+ <zero-allocation-hashing.version>0.16</zero-allocation-hashing.version>
+
<!-- Test -->
- <testng.version>7.5</testng.version>
- <!-- END:UNIQUE FOR THIS JAVA COMPONENT -->
+ <testng.version>7.5.1</testng.version>
<!-- System-wide properties -->
- <maven.version>3.5.0</maven.version>
- <java.version>1.8</java.version>
+ <maven.version>3.6.3</maven.version>
+ <java.version>8</java.version>
<jdk-toolchain.version>8</jdk-toolchain.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
@@ -113,33 +96,34 @@ under the License.
<project.reporting.outputEncoding>${charset.encoding}</project.reporting.outputEncoding>
<!-- org.codehaus plugins -->
- <!-- used for strict profile testing-->
- <plexus-compiler-javac-errorprone.version>2.8.5</plexus-compiler-javac-errorprone.version>
- <versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>
+ <versions-maven-plugin.version>2.16.2</versions-maven-plugin.version>
+ <exec-maven-plugin.version>3.2.0</exec-maven-plugin.version>
<!-- Maven Plugins -->
- <maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version> <!-- overrides parent -->
- <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version> <!-- overrides parent -->
- <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version> <!-- overrides parent -->
- <maven-enforcer-plugin.version>3.0.0</maven-enforcer-plugin.version> <!-- overrides parent -->
- <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version> <!-- overrides parent -->
- <maven-javadoc-plugin.version>3.3.1</maven-javadoc-plugin.version> <!-- overrides parent -->
- <maven-release-plugin.version>3.0.0-M4</maven-release-plugin.version> <!-- overrides parent -->
- <maven-remote-resources-plugin.version>1.7.0</maven-remote-resources-plugin.version> <!-- overrides parent -->
- <maven-source-plugin.version>3.2.1</maven-source-plugin.version> <!-- overrides parent -->
- <maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version> <!-- overrides parent -->
- <maven-toolchains-plugin.version>3.0.0</maven-toolchains-plugin.version>
+ <maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
+ <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
+ <maven-deploy-plugin.version>3.1.2</maven-deploy-plugin.version>
+ <maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version>
+ <maven-gpg-plugin.version>3.2.3</maven-gpg-plugin.version>
+ <maven-jar-plugin.version>3.4.1</maven-jar-plugin.version>
+ <maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
+ <maven-release-plugin.version>3.0.1</maven-release-plugin.version>
+ <maven-remote-resources-plugin.version>3.2.0</maven-remote-resources-plugin.version>
+ <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
+ <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version> <!-- for surefire, failsafe and surefire-report -->
+ <maven-toolchains-plugin.version>3.2.0</maven-toolchains-plugin.version>
<maven-install-plugin.version>3.0.0-M1</maven-install-plugin.version>
- <maven-exec-plugin.version>3.0.0</maven-exec-plugin.version>
<!-- Apache Plugins -->
- <apache-rat-plugin.version>0.13</apache-rat-plugin.version> <!-- overrides parent -->
+ <apache-rat-plugin.version>0.16.1</apache-rat-plugin.version>
<!-- org.jacoco Maven Plugins -->
- <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
+ <jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
<!-- org.eluder Maven Plugins -->
<coveralls-repo-token></coveralls-repo-token>
<coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
<!-- other -->
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
+ <git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
+ <exec-maven-plugin.version>3.3.0</exec-maven-plugin.version>
<maven.deploy.skip>true</maven.deploy.skip>
<maven.install.skip>true</maven.install.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
@@ -172,6 +156,12 @@ under the License.
<dependencyManagement>
<dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testng.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<!-- Used for UTF8 testing -->
<groupId>com.google.protobuf</groupId>
@@ -208,14 +198,12 @@ under the License.
</plugin>
<plugin>
- <!-- Apache Parent pom, pluginManagement-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
</plugin>
<plugin>
- <!-- Extends Apache Parent pom, pluginManagement-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
@@ -238,7 +226,6 @@ under the License.
</plugin>
<plugin>
- <!-- Extends Apache Parent pom, apache-release profile -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
@@ -274,7 +261,7 @@ under the License.
<configuration>
<rules>
<requireJavaVersion>
- <version>[1.8,1.9),[8],[11,14),[17,18)</version>
+ <version>[8,9),[11,12)</version>
</requireJavaVersion>
<requireMavenVersion>
<version>[${maven.version},)</version>
@@ -293,7 +280,6 @@ under the License.
</plugin>
<plugin>
- <!-- Apache Parent pom, pluginManagement-->
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>${apache-rat-plugin.version}</version>
@@ -312,7 +298,8 @@ under the License.
<excludes>
<exclude>**/*.yaml</exclude>
<exclude>**/*.yml</exclude>
- <exclude>**/.*/**/*</exclude>
+ <exclude>**/toolchains.xml</exclude>
+ <exclude>**/.*</exclude>
<exclude>**/.clover/**/*</exclude>
<exclude>**/test/resources/**/*.txt</exclude>
<exclude>**/test-output/**/*</exclude>
@@ -326,7 +313,6 @@ under the License.
</plugin>
<plugin>
- <!-- Extends Apache Parent pom, apache-release profile -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
@@ -349,7 +335,6 @@ under the License.
</plugin>
<plugin>
- <!-- Apache Parent pom, pluginManagement-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
@@ -371,13 +356,15 @@ under the License.
<configuration>
<toolchains>
<jdk>
- <version>[1.8,1.9),[8],[11,14),[17,18)</version>
+ <version>[8,9),[11,12)</version>
</jdk>
</toolchains>
</configuration>
<executions>
<execution>
- <goals><goal>toolchain</goal></goals>
+ <goals>
+ <goal>toolchain</goal>
+ </goals>
</execution>
</executions>
</plugin>
@@ -424,7 +411,7 @@ under the License.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>${maven-exec-plugin.version}</version>
+ <version>${exec-maven-plugin.version}</version>
</plugin>
</plugins>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org
(datasketches-memory) 01/04: Change method of accessing Resource file GettysburgAddress.txt
Posted by le...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch integrateJava17_v3
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
commit 1a8c9a7ed3dde6b8e9f9f4b51a1d43e9300c7f04
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Sun Oct 1 12:17:06 2023 -0700
Change method of accessing Resource file GettysburgAddress.txt
---
.../AllocateDirectWritableMapMemoryTest.java | 7 ++--
.../internal/AllocateDirectMapMemoryTest.java | 16 ++++-----
.../AllocateDirectWritableMapMemoryTest.java | 9 ++---
.../datasketches/memory/internal/TestUtil.java | 40 ++++++++++++++++++++++
4 files changed, 57 insertions(+), 15 deletions(-)
diff --git a/datasketches-memory-java17/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java b/datasketches-memory-java17/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
index 1f33854..500ee42 100644
--- a/datasketches-memory-java17/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
+++ b/datasketches-memory-java17/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
@@ -24,6 +24,7 @@
package org.apache.datasketches.memory.internal;
import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.apache.datasketches.memory.internal.TestUtil.gettysPath;
import static org.apache.datasketches.memory.internal.Util.getResourceFile;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
@@ -59,7 +60,7 @@ public class AllocateDirectWritableMapMemoryTest {
public void simpleMap()
throws IllegalArgumentException, InvalidPathException, IllegalStateException, UnsupportedOperationException,
IOException, SecurityException {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
Memory mem = null;
try (ResourceScope scope = ResourceScope.newConfinedScope()) {
mem = Memory.map(file,scope);
@@ -143,7 +144,7 @@ public class AllocateDirectWritableMapMemoryTest {
public void simpleMap2()
throws IllegalArgumentException, InvalidPathException, IllegalStateException, UnsupportedOperationException,
IOException, SecurityException {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
assertTrue(file.canRead());
assertFalse(file.canWrite());
WritableMemory wmem = null;
@@ -157,7 +158,7 @@ public class AllocateDirectWritableMapMemoryTest {
public void checkReadException()
throws IllegalArgumentException, InvalidPathException, IllegalStateException, UnsupportedOperationException,
IOException, SecurityException {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
WritableMemory wmem = null;
try (ResourceScope scope = ResourceScope.newConfinedScope()) {
wmem = WritableMemory.writableMap(file, 0, 1 << 20, scope, ByteOrder.nativeOrder());
diff --git a/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java b/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java
index 423e59a..6eef570 100644
--- a/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java
+++ b/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectMapMemoryTest.java
@@ -23,7 +23,7 @@
package org.apache.datasketches.memory.internal;
-import static org.apache.datasketches.memory.internal.Util.getResourceFile;
+import static org.apache.datasketches.memory.internal.TestUtil.gettysPath;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
@@ -45,7 +45,7 @@ public class AllocateDirectMapMemoryTest {
@Test(expectedExceptions = IllegalStateException.class)
public void simpleMap() {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
assertTrue(AllocateDirectWritableMap.isFileReadOnly(file));
try (Memory mem = Memory.map(file)) {
mem.close(); //explicit close
@@ -54,7 +54,7 @@ public class AllocateDirectMapMemoryTest {
@Test
public void printGettysbergAddress() {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
try (Memory mem = Memory.map(file))
{
println("Mem Cap: " + mem.getCapacity());
@@ -79,7 +79,7 @@ public class AllocateDirectMapMemoryTest {
@Test
public void testIllegalArguments() {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
try (Memory mem = Memory.map(file, -1, Integer.MAX_VALUE, ByteOrder.nativeOrder())) {
fail("Failed: Position was negative.");
} catch (IllegalArgumentException e) {
@@ -95,7 +95,7 @@ public class AllocateDirectMapMemoryTest {
@Test(expectedExceptions = IllegalStateException.class)
public void testAccessAfterClose() {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
long memCapacity = file.length();
try (Memory mem = Memory.map(file, 0, memCapacity, ByteOrder.nativeOrder())) {
assertEquals(memCapacity, mem.getCapacity());
@@ -107,7 +107,7 @@ public class AllocateDirectMapMemoryTest {
@Test(expectedExceptions = IllegalStateException.class)
public void testReadFailAfterClose() {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
long memCapacity = file.length();
Memory mem = Memory.map(file, 0, memCapacity, ByteOrder.nativeOrder());
mem.close();
@@ -116,7 +116,7 @@ public class AllocateDirectMapMemoryTest {
@Test
public void testLoad() {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
long memCapacity = file.length();
try (Memory mem = Memory.map(file, 0, memCapacity, ByteOrder.nativeOrder())) {
mem.load();
@@ -139,7 +139,7 @@ public class AllocateDirectMapMemoryTest {
*/
static void print(final Object o) {
if (o != null) {
- //System.out.print(o.toString()); //disable here
+ System.out.print(o.toString()); //disable here
}
}
diff --git a/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java b/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
index 98d3c2a..865157b 100644
--- a/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
+++ b/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
@@ -24,7 +24,7 @@
package org.apache.datasketches.memory.internal;
import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.apache.datasketches.memory.internal.Util.getResourceFile;
+import static org.apache.datasketches.memory.internal.TestUtil.gettysPath;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
@@ -42,6 +42,7 @@ import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
+@SuppressWarnings("javadoc")
public class AllocateDirectWritableMapMemoryTest {
private static final String LS = System.getProperty("line.separator");
@@ -52,7 +53,7 @@ public class AllocateDirectWritableMapMemoryTest {
@Test
public void simpleMap() throws Exception {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
try (Memory mem = Memory.map(file)) {
byte[] bytes = new byte[(int)mem.getCapacity()];
mem.getByteArray(0, bytes, 0, bytes.length);
@@ -133,7 +134,7 @@ public class AllocateDirectWritableMapMemoryTest {
@Test(expectedExceptions = ReadOnlyException.class)
public void simpleMap2() throws IOException {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
assertTrue(file.canRead() && !file.canWrite());
try (WritableMemory wmem = WritableMemory.writableMap(file)) { //throws
//
@@ -142,7 +143,7 @@ public class AllocateDirectWritableMapMemoryTest {
@Test(expectedExceptions = ReadOnlyException.class)
public void checkOverLength() throws Exception {
- File file = getResourceFile("GettysburgAddress.txt");
+ File file = gettysPath.resolve("GettysburgAddress.txt").toFile();
WritableMemory.writableMap(file, 0, 1 << 20, ByteOrder.nativeOrder());
}
diff --git a/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/TestUtil.java b/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/TestUtil.java
new file mode 100644
index 0000000..4fc3162
--- /dev/null
+++ b/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/TestUtil.java
@@ -0,0 +1,40 @@
+/*
+ * 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.internal;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+/**
+ * Utilities for Test
+ */
+public class TestUtil {
+ private static String userDir = System.getProperty("user.dir");
+
+ public static Path gettysPath = createPath("src/test/resources");
+
+ private static Path createPath(final String projectLocalDir) {
+ try {
+ return Files.createDirectories(Paths.get(userDir, projectLocalDir));
+ } catch (IOException e) { throw new IllegalArgumentException(e.getCause().toString()); }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org
(datasketches-memory) 02/04: Remove SuppressWarnings("javadoc")
Posted by le...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch integrateJava17_v3
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
commit 74bccd3cc630885589058a25c3ce4ae1efb93cb0
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Sun Oct 1 12:18:35 2023 -0700
Remove SuppressWarnings("javadoc")
---
.../memory/internal/AllocateDirectWritableMapMemoryTest.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java b/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
index 865157b..29cc0b5 100644
--- a/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
+++ b/datasketches-memory-java8/src/test/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMapMemoryTest.java
@@ -42,7 +42,6 @@ import org.apache.datasketches.memory.WritableMemory;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
-@SuppressWarnings("javadoc")
public class AllocateDirectWritableMapMemoryTest {
private static final String LS = System.getProperty("line.separator");
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org
(datasketches-memory) 03/04: Temporary commit
Posted by le...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch integrateJava17_v3
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
commit 66600b4693641ff7c1ca7f3390b80c89752d5de9
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Wed Feb 14 11:53:03 2024 -0800
Temporary commit
---
.github/workflows/.toolchains.xml | 26 +++++++++++++++++++---
.github/workflows/auto-jdk-matrix.yml | 15 ++++++++-----
.../apache/datasketches/memory/internal/Util.java | 2 +-
pom.xml | 2 +-
4 files changed, 35 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/.toolchains.xml b/.github/workflows/.toolchains.xml
index 5f40493..a2adc14 100644
--- a/.github/workflows/.toolchains.xml
+++ b/.github/workflows/.toolchains.xml
@@ -4,7 +4,7 @@
<type>jdk</type>
<provides>
<version>1.8</version>
- <vendor>openjdk</vendor>
+ <vendor>Azul Systems, Inc.</vendor>
</provides>
<configuration>
<jdkHome>${env.JAVA8_HOME}</jdkHome>
@@ -14,7 +14,7 @@
<type>jdk</type>
<provides>
<version>8</version>
- <vendor>openjdk</vendor>
+ <vendor>Azul Systems, Inc.</vendor>
</provides>
<configuration>
<jdkHome>${env.JAVA8_HOME}</jdkHome>
@@ -24,10 +24,30 @@
<type>jdk</type>
<provides>
<version>11</version>
- <vendor>openjdk</vendor>
+ <vendor>Eclipse Adoptium</vendor>
</provides>
<configuration>
<jdkHome>${env.JAVA11_HOME}</jdkHome>
</configuration>
</toolchain>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>17</version>
+ <vendor>Eclipse Adoptium</vendor>
+ </provides>
+ <configuration>
+ <jdkHome>${env.JAVA17_HOME}</jdkHome>
+ </configuration>
+ </toolchain>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>21</version>
+ <vendor>Oracle</vendor>
+ </provides>
+ <configuration>
+ <jdkHome>${env.JAVA21_HOME}</jdkHome>
+ </configuration>
+ </toolchain>
</toolchains>
\ No newline at end of file
diff --git a/.github/workflows/auto-jdk-matrix.yml b/.github/workflows/auto-jdk-matrix.yml
index c0ec959..ed8668b 100644
--- a/.github/workflows/auto-jdk-matrix.yml
+++ b/.github/workflows/auto-jdk-matrix.yml
@@ -12,26 +12,29 @@ env:
jobs:
build:
name: Build, Test, Install
- runs-on: macOS-latest
-
+ runs-on: ubuntu-latest
strategy:
fail-fast: false
+ matrix:
+ jdk: [ 8,11 ]
+ env:
+ JDK_VERSION: ${{ matrix.jdk }}
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
- uses: actions/checkout@v3.3.0
+ uses: actions/checkout@v4.1
with:
persist-credentials: false
- name: Cache local Maven repository
- uses: actions/cache@v3.2.3
+ uses: actions/cache@v3.3.2
with:
path: ~/.m2/repository
key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: build-${{ runner.os }}-maven-
- name: Install Matrix JDK
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v3.13.0
with:
java-version: |
8
@@ -39,6 +42,8 @@ jobs:
distribution: 'temurin'
java-package: jdk
architecture: x64
+# Architecture options: x86, x64, armv7, aarch64, ppc64le
+# setup-java@v3 has a "with cache" option
- name: Echo Java Version
run: >
diff --git a/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/Util.java b/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/Util.java
index d60a67d..8c93c76 100644
--- a/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/Util.java
+++ b/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/Util.java
@@ -316,7 +316,7 @@ public final class Util {
* @return the absolute path of the given resource file's shortName.
*/
public static String getResourcePath(final String shortFileName) {
- Objects.requireNonNull(shortFileName, "input parameter " + shortFileName + " cannot be null.");
+ Objects.requireNonNull(shortFileName, "input parameter 'String shortFileName' cannot be null.");
try {
final URL url = Util.class.getClassLoader().getResource(shortFileName);
Objects.requireNonNull(url, "resource " + shortFileName + " could not be acquired.");
diff --git a/pom.xml b/pom.xml
index d64b46a..734014d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,7 +127,7 @@ under the License.
<maven-release-plugin.version>3.0.0-M4</maven-release-plugin.version> <!-- overrides parent -->
<maven-remote-resources-plugin.version>1.7.0</maven-remote-resources-plugin.version> <!-- overrides parent -->
<maven-source-plugin.version>3.2.1</maven-source-plugin.version> <!-- overrides parent -->
- <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version> <!-- overrides parent -->
+ <maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version> <!-- overrides parent -->
<maven-toolchains-plugin.version>3.0.0</maven-toolchains-plugin.version>
<maven-install-plugin.version>3.0.0-M1</maven-install-plugin.version>
<maven-exec-plugin.version>3.0.0</maven-exec-plugin.version>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org