Merge pull request #1571 from nosqlbench/jshook/buildon-jdk21

Jshook/buildon jdk21
This commit is contained in:
Jonathan Shook 2023-09-28 12:01:39 -05:00 committed by GitHub
commit 602fbfb15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 71 additions and 62 deletions

View File

@ -23,10 +23,10 @@ jobs:
name: setup java
with:
node-version: '16'
java-version: '17'
java-version: '21'
java-package: jdk
architecture: x64
distribution: 'temurin'
distribution: 'oracle'
- name: Cache Maven packages
uses: actions/cache@v1

View File

@ -44,8 +44,8 @@ jobs:
steps:
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
distribution: 'oracle'
java-version: '21'
- name: Checkout repository
uses: actions/checkout@v3

View File

@ -27,8 +27,8 @@ jobs:
- name: setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
distribution: 'oracle'
java-version: '21'
java-package: jdk
architecture: x64

View File

@ -24,8 +24,8 @@ jobs:
- name: setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
distribution: 'oracle'
java-version: '21'
java-package: jdk
architecture: x64

View File

@ -38,7 +38,7 @@ public class GrafanaClientConfig {
private URI baseUrl;
@JsonProperty("timeoutms" )
private int timeoutms;
private int timeoutms = 20000;
private final List<Authenticator> authenticators = new ArrayList<>();
private final List<Supplier<Map<String, String>>> headerSources = new ArrayList<>();

View File

@ -58,7 +58,7 @@ public class ScenarioController implements NBLabeledElement {
ActivitiesExceptionHandler exceptionHandler = new ActivitiesExceptionHandler(this);
IndexedThreadFactory indexedThreadFactory = new IndexedThreadFactory("ACTIVITY", exceptionHandler);
this.activitiesExecutor = Executors.newCachedThreadPool(indexedThreadFactory);
this.activitiesExecutor = Executors.newVirtualThreadPerTaskExecutor();
}
/**

View File

@ -32,12 +32,6 @@
<name>${project.artifactId}</name>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>

View File

@ -26,7 +26,7 @@
<properties>
<revision>5.17.4-SNAPSHOT</revision>
<revision>5.21.1-SNAPSHOT</revision>
<!-- Set this level to override the logging level for tests during build -->
<project.testlevel>INFO</project.testlevel>
<!-- Set this level to override the logging level for tests logging configuration during build -->
@ -36,9 +36,8 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<javadoc.name>nosqlbench</javadoc.name>
<jacoco.version>0.8.8</jacoco.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<PROG>nb5</PROG>
<maven.plugin.validation>VERBOSE</maven.plugin.validation>
@ -523,9 +522,9 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<debug>true</debug>
<target>17</target>
<source>17</source>
<release>17</release>
<target>21</target>
<source>21</source>
<release>21</release>
<compilerArgs>
<!-- <compilerArg>-Xdoclint:all</compilerArg>-->
<!-- <compilerArg>-Xlint:all</compilerArg>-->
@ -638,7 +637,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<release>17</release>
<release>21</release>
<doctitle>${javadoc.name}</doctitle>
<windowtitle>${javadoc.name}</windowtitle>
<isOffline>false</isOffline>
@ -732,7 +731,7 @@
<configuration>
<rules>
<requireJavaVersion>
<version>[17,)</version>
<version>[21,)</version>
</requireJavaVersion>
</rules>
</configuration>
@ -818,7 +817,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<version>0.8.10</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2022 nosqlbench
# Copyright (c) 2022-2023 nosqlbench
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -41,11 +41,11 @@ fi
if [ "$1" = "-DN" ]
then
shift
exec $DIR/jre/bin/java -Dnashorn.args="--no-deprecation-warning" ${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar $DIR/nb5.jar "$@"
exec $DIR/jre/bin/java --enable-preview -XX:+UseZGC -XX:+ZGenerational ${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar $DIR/nb5.jar "$@"
elif [ "$1" = "-DY" ]
then
shift
exec $DIR/jre/bin/java -Dnashorn.args="--no-deprecation-warning" ${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 -jar $DIR/nb5.jar "$@"
exec $DIR/jre/bin/java --enable-preview -XX:+UseZGC -XX:+ZGenerational ${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 -jar $DIR/nb5.jar "$@"
else
exec $DIR/jre/bin/java -Dnashorn.args="--no-deprecation-warning" ${JAVA_OPTS} -jar $DIR/nb5.jar "$@"
exec $DIR/jre/bin/java --enable-preview -XX:+UseZGC -XX:+ZGenerational ${JAVA_OPTS} -jar $DIR/nb5.jar "$@"
fi

View File

@ -22,7 +22,7 @@ set -x
APPDIR=target/NB.AppDir
JAR_NAME="nb5.jar"
BIN_NAME="nb5"
JAVA_VERSION="17"
JAVA_VERSION="21"
mkdir -p ${APPDIR}
@ -38,20 +38,21 @@ rsync -av appimage/skel/ "${APPDIR}/"
cp target/${JAR_NAME} "${APPDIR}/usr/bin/${JAR_NAME}"
mkdir -p "${APPDIR}/usr/bin/jre"
if [ "$JAVA_VERSION" == "17" ]
jdkname="jdk${JAVA_VERSION}"
if [ "${jdkname}" == "jdk21" ]
then
if [ ! -d "cache/jdk17" ] ; then
printf "getting jdk17 once into cache/jdk17\n";
if [ ! -d "cache/${jdkname}" ] ; then
printf "getting ${jdkname} once into cache/${jdkname}\n";
filename='openjdk-21_linux-x64_bin.tar.gz'
mkdir -p cache
(cd cache && (
wget -c https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
tar -xf OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
mv jdk-17.0.1+12 jdk17
rm OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
curl -O https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/${filename}
tar -xf ${filename}
mv jdk-21 jdk21
rm ${filename}
))
fi
rsync -av cache/jdk17/ "${APPDIR}/usr/bin/jre/"
rsync -av cache/jdk21/ "${APPDIR}/usr/bin/jre/"
else
printf "Unknown java version indicated in $0"
exit 2

View File

@ -1,4 +1,20 @@
#!/bin/bash
#
# Copyright (c) 2023 nosqlbench
#
# Licensed 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.
#
#set -x
DIR="$(dirname "$(readlink -f "$0")")"
if [ "$1" = "--wrapper-help" ]
@ -25,11 +41,11 @@ fi
if [ "$1" = "-DN" ]
then
shift
exec $DIR/jre/bin/java -Dnashorn.args="--no-deprecation-warning" ${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar $DIR/nbr.jar "$@"
exec $DIR/jre/bin/java --enable-preview -XX:+UseZGC -XX:+ZGenerational ${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar $DIR/nbr.jar "$@"
elif [ "$1" = "-DY" ]
then
shift
exec $DIR/jre/bin/java -Dnashorn.args="--no-deprecation-warning" ${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 -jar $DIR/nbr.jar "$@"
exec $DIR/jre/bin/java --enable-preview -XX:+UseZGC -XX:+ZGenerational ${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 -jar $DIR/nbr.jar "$@"
else
exec $DIR/jre/bin/java -Dnashorn.args="--no-deprecation-warning" ${JAVA_OPTS} -jar $DIR/nbr.jar "$@"
exec $DIR/jre/bin/java --enable-preview -XX:+UseZGC -XX:+ZGenerational ${JAVA_OPTS} -jar $DIR/nbr.jar "$@"
fi

View File

@ -22,7 +22,7 @@ set -x
APPDIR=target/NB.AppDir
JAR_NAME="nbr.jar"
BIN_NAME="nbr"
JAVA_VERSION="17"
JAVA_VERSION="21"
mkdir -p ${APPDIR}
@ -38,20 +38,21 @@ rsync -av appimage/skel/ "${APPDIR}/"
cp target/${JAR_NAME} "${APPDIR}/usr/bin/${JAR_NAME}"
mkdir -p "${APPDIR}/usr/bin/jre"
if [ "$JAVA_VERSION" == "17" ]
jdkname="jdk${JAVA_VERSION}"
if [ "${jdkname}" == "jdk21" ]
then
if [ ! -d "cache/jdk17" ] ; then
printf "getting jdk17 once into cache/jdk17\n";
if [ ! -d "cache/${jdkname}" ] ; then
printf "getting ${jdkname} once into cache/${jdkname}\n";
filename='openjdk-21_linux-x64_bin.tar.gz'
mkdir -p cache
(cd cache && (
wget -c https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
tar -xf OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
mv jdk-17.0.1+12 jdk17
rm OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz
curl -O https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/${filename}
tar -xf ${filename}
mv jdk-21 jdk21
rm ${filename}
))
fi
rsync -av cache/jdk17/ "${APPDIR}/usr/bin/jre/"
rsync -av cache/jdk21/ "${APPDIR}/usr/bin/jre/"
else
printf "Unknown java version indicated in $0"
exit 2

View File

@ -76,7 +76,7 @@ class ExitStatusIntegrationTests {
void testExitStatusOnActivityOpException() {
ProcessInvoker invoker = new ProcessInvoker();
invoker.setLogDir("logs/test");
ProcessResult result = invoker.run("exitstatus_asyncstoprequest", 30,
ProcessResult result = invoker.run("exitstatus_asyncstoprequest", 60,
"java", "-jar", JARNAME, "--logs-dir", "logs/test/asyncstop", "--logs-level", "debug", "run",
"driver=diag", "threads=2", "cyclerate=10", "op=erroroncycle:erroroncycle=10", "cycles=50", "-vvv"
);

View File

@ -73,13 +73,13 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.1.1</version>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.1.1</version>
<version>5.4.0</version>
<scope>test</scope>
</dependency>

View File

@ -16,19 +16,17 @@
package io.nosqlbench.virtdata.library.basics.shared.vectors.primitive;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import static org.assertj.core.api.Assertions.assertThat;
public class HashedDoubleVectorsTest {
private final static Logger logger = LogManager.getLogger(HashedDoubleVectorsTest.class);
@Test
public void testHashedDoubleVectors() {
HashedDoubleVectors hdv1 = new HashedDoubleVectors(10000);
double[] doubles = hdv1.apply(1L);
System.out.println(Arrays.toString(doubles));
logger.info("created " + doubles.length + " double vectors.");
}
}