This is an automated email from the ASF dual-hosted git repository.
dcromberge pushed a commit to branch multi-module-experimental
in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
The following commit(s) were added to refs/heads/multi-module-experimental by
this push:
new ac3d581 Minor cleanup
ac3d581 is described below
commit ac3d581ef2953cf509dcf3f9fbea9d85d16dee95
Author: David Cromberge <[email protected]>
AuthorDate: Thu Apr 15 11:45:58 2021 +0100
Minor cleanup
---
datasketches-memory-assembly/pom.xml | 2 +-
.../src/assembly/mrjar.xml | 4 ++--
datasketches-memory-base/pom.xml | 9 ++++----
.../datasketches/memory/AllocateDirectMap.java | 1 +
.../memory/internal/VirtualMachineMemory.java | 26 ++++++++++------------
datasketches-memory-java11/pom.xml | 6 ++---
datasketches-memory-java9-tests/pom.xml | 6 ++---
datasketches-memory-java9/pom.xml | 6 ++---
install.sh | 7 ++++++
9 files changed, 36 insertions(+), 31 deletions(-)
diff --git a/datasketches-memory-assembly/pom.xml
b/datasketches-memory-assembly/pom.xml
index ef4e844..b3e2b53 100644
--- a/datasketches-memory-assembly/pom.xml
+++ b/datasketches-memory-assembly/pom.xml
@@ -60,13 +60,13 @@
<version>${maven-assembly-plugin.version}</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
+
<finalName>datasketches-memory-${project.parent.version}</finalName>
<descriptors>
<descriptor>src/assembly/mrjar.xml</descriptor>
</descriptors>
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
-
<Automatic-Module-Name>org.apache.datasketches.memory</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
diff --git a/datasketches-memory-assembly/src/assembly/mrjar.xml
b/datasketches-memory-assembly/src/assembly/mrjar.xml
index 171f8eb..b9e9100 100644
--- a/datasketches-memory-assembly/src/assembly/mrjar.xml
+++ b/datasketches-memory-assembly/src/assembly/mrjar.xml
@@ -39,7 +39,7 @@
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
-
<include>org.apache.datasketches:datasketches-memory-java-nine</include>
+ <include>org.apache.datasketches:datasketches-memory-java9</include>
</includes>
<binaries>
<outputDirectory>META-INF/versions/9</outputDirectory>
@@ -55,7 +55,7 @@
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
-
<include>org.apache.datasketches:datasketches-memory-java-eleven</include>
+ <include>org.apache.datasketches:datasketches-memory-java11</include>
</includes>
<binaries>
<outputDirectory>META-INF/versions/11</outputDirectory>
diff --git a/datasketches-memory-base/pom.xml b/datasketches-memory-base/pom.xml
index 1ce2a9b..6f27586 100644
--- a/datasketches-memory-base/pom.xml
+++ b/datasketches-memory-base/pom.xml
@@ -17,8 +17,7 @@
~ 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
+<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">
<modelVersion>4.0.0</modelVersion>
@@ -34,8 +33,8 @@
<properties>
<maven.install.skip>true</maven.install.skip>
- <maven.compiler.source>8</maven.compiler.source>
- <maven.compiler.target>8</maven.compiler.target>
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
@@ -65,7 +64,7 @@
<jdkToolchain>
<version>1.8</version>
</jdkToolchain>
- </configuration>
+ </configuration>
<executions>
<execution>
<id>attach-javadocs</id>
diff --git
a/datasketches-memory-base/src/main/java/org/apache/datasketches/memory/AllocateDirectMap.java
b/datasketches-memory-base/src/main/java/org/apache/datasketches/memory/AllocateDirectMap.java
index 668654b..7d65394 100644
---
a/datasketches-memory-base/src/main/java/org/apache/datasketches/memory/AllocateDirectMap.java
+++
b/datasketches-memory-base/src/main/java/org/apache/datasketches/memory/AllocateDirectMap.java
@@ -32,6 +32,7 @@ import java.nio.channels.FileChannel;
import java.util.logging.Logger;
import org.apache.datasketches.memory.internal.MemoryCleaner;
+
import sun.nio.ch.FileChannelImpl;
/**
diff --git
a/datasketches-memory-base/src/main/java/org/apache/datasketches/memory/internal/VirtualMachineMemory.java
b/datasketches-memory-base/src/main/java/org/apache/datasketches/memory/internal/VirtualMachineMemory.java
index b7ffe90..c61a638 100644
---
a/datasketches-memory-base/src/main/java/org/apache/datasketches/memory/internal/VirtualMachineMemory.java
+++
b/datasketches-memory-base/src/main/java/org/apache/datasketches/memory/internal/VirtualMachineMemory.java
@@ -22,13 +22,11 @@ package org.apache.datasketches.memory.internal;
import java.lang.reflect.Method;
/**
- * Extracts a version-dependent reference to the `sun.misc.VM` into
- * a standalone class. The package name for VM has changed in
- * later versions. The appropriate class will be loaded by the class loader
- * depending on the Java version that is used.
- *
- * For more information, see:
- * https://openjdk.java.net/jeps/238
+ * Extracts a version-dependent reference to the `sun.misc.VM` into a
standalone
+ * class. The package name for VM has changed in later versions. The
appropriate
+ * class will be loaded by the class loader depending on the Java version that
+ * is used.
+ * For more information, see: https://openjdk.java.net/jeps/238
*/
public final class VirtualMachineMemory {
@@ -43,21 +41,20 @@ public final class VirtualMachineMemory {
VM_CLASS = Class.forName("sun.misc.VM");
VM_MAX_DIRECT_MEMORY_METHOD =
VM_CLASS.getDeclaredMethod("maxDirectMemory");
VM_MAX_DIRECT_MEMORY_METHOD.setAccessible(true);
- maxDBBMemory = (long) VM_MAX_DIRECT_MEMORY_METHOD.invoke(null);
//static method
+ maxDBBMemory = (long) VM_MAX_DIRECT_MEMORY_METHOD.invoke(null); //
static method
- VM_IS_DIRECT_MEMORY_PAGE_ALIGNED_METHOD =
- VM_CLASS.getDeclaredMethod("isDirectMemoryPageAligned");
+ VM_IS_DIRECT_MEMORY_PAGE_ALIGNED_METHOD =
VM_CLASS.getDeclaredMethod("isDirectMemoryPageAligned");
VM_IS_DIRECT_MEMORY_PAGE_ALIGNED_METHOD.setAccessible(true);
- isPageAligned = (boolean) VM_IS_DIRECT_MEMORY_PAGE_ALIGNED_METHOD
- .invoke(null); //static method
+ isPageAligned = (boolean)
VM_IS_DIRECT_MEMORY_PAGE_ALIGNED_METHOD.invoke(null); // static method
} catch (final Exception e) {
throw new RuntimeException("Could not acquire sun.misc.VM: " +
e.getClass());
}
}
/**
- * Returns the maximum amount of allocatable direct buffer memory.
- * The directMemory variable is initialized during system initialization.
+ * Returns the maximum amount of allocatable direct buffer memory. The
+ * directMemory variable is initialized during system initialization.
+ *
* @return the maximum amount of allocatable direct buffer memory.
*/
public static long getMaxDBBMemory() {
@@ -66,6 +63,7 @@ public final class VirtualMachineMemory {
/**
* Returns true if the direct buffers should be page aligned.
+ *
* @return flag that determines whether direct buffers should be page
aligned.
*/
public static boolean getIsPageAligned() {
diff --git a/datasketches-memory-java11/pom.xml
b/datasketches-memory-java11/pom.xml
index 09dbccb..90a9771 100644
--- a/datasketches-memory-java11/pom.xml
+++ b/datasketches-memory-java11/pom.xml
@@ -17,9 +17,7 @@
~ 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
+<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">
<modelVersion>4.0.0</modelVersion>
@@ -35,6 +33,8 @@
<properties>
<maven.install.skip>true</maven.install.skip>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
diff --git a/datasketches-memory-java9-tests/pom.xml
b/datasketches-memory-java9-tests/pom.xml
index 0ef0803..509d0bc 100644
--- a/datasketches-memory-java9-tests/pom.xml
+++ b/datasketches-memory-java9-tests/pom.xml
@@ -17,9 +17,7 @@
~ 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
+<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">
<modelVersion>4.0.0</modelVersion>
@@ -35,6 +33,8 @@
<properties>
<maven.install.skip>true</maven.install.skip>
+ <maven.compiler.source>9</maven.compiler.source>
+ <maven.compiler.target>9</maven.compiler.target>
</properties>
<dependencies>
diff --git a/datasketches-memory-java9/pom.xml
b/datasketches-memory-java9/pom.xml
index 017b5b3..5e533bd 100644
--- a/datasketches-memory-java9/pom.xml
+++ b/datasketches-memory-java9/pom.xml
@@ -17,9 +17,7 @@
~ 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
+<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">
<modelVersion>4.0.0</modelVersion>
@@ -35,6 +33,8 @@
<properties>
<maven.install.skip>true</maven.install.skip>
+ <maven.compiler.source>9</maven.compiler.source>
+ <maven.compiler.target>9</maven.compiler.target>
</properties>
<dependencies>
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..ed01ac1
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -e
+
+mvn install:install-file \
+
-Dfile=datasketches-memory-assembly/target/datasketches-memory-1.4.0-SNAPSHOT.jar
\
+ -DgroupId=org.apache.datasketches \
+ -DartifactId=datasketches-memory
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]