From b55182bb9df2b56be2752e1f2ca6a258790b5627 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 24 Jun 2026 12:15:38 -0500 Subject: [PATCH 1/2] java: use GCS mirror for Maven, other small changes --- .pre-commit-config.yaml | 9 ++--- java/README.md | 22 +++++++++---- java/pom.xml | 73 +++++++++++++++++++++++++++++++---------- 3 files changed, 77 insertions(+), 27 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d776d572f..a7cddbb57b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,11 @@ -# SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: + - id: check-xml - id: trailing-whitespace - id: end-of-file-fixer - repo: https://github.com/PyCQA/isort @@ -74,7 +75,7 @@ repos: ^CHANGELOG.md$ ) - repo: https://github.com/rapidsai/pre-commit-hooks - rev: v1.4.3 + rev: v1.5.1 hooks: - id: verify-copyright args: [--fix, --spdx] @@ -100,7 +101,7 @@ repos: (?x) ^pyproject[.]toml$ - repo: https://github.com/rapidsai/dependency-file-generator - rev: v1.20.0 + rev: v1.21.0 hooks: - id: rapids-dependency-file-generator args: ["--clean", "--warn-all", "--strict"] diff --git a/java/README.md b/java/README.md index 3b2f0d7edd..b3825bf26d 100644 --- a/java/README.md +++ b/java/README.md @@ -1,33 +1,43 @@ # Java KvikIO Bindings ## Summary + These Java KvikIO bindings for GDS currently support only synchronous read and write IO operations using the underlying cuFile API. Support for batch IO and asynchronous operations are not yet supported. ## Dependencies + The Java KvikIO bindings have been developed to work on Linux based systems and require [CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) to be installed and for [GDS](https://docs.nvidia.com/gpudirect-storage/troubleshooting-guide/index.html) to be properly enabled. To compile the shared library it is also necessary to have a JDK installed. To run the included example, it is also necessary to install JCuda as it is used to handle memory allocations and the transfer of data between host and GPU memory. JCuda jar files supporting CUDA 12.x can be found here: -[jcuda-12.0.0.jar](https://repo1.maven.org/maven2/org/jcuda/jcuda/12.0.0/jcuda-12.0.0.jar), -[jcuda-natives-12.0.0.jar](https://repo1.maven.org/maven2/org/jcuda/jcuda-natives/12.0.0/jcuda-natives-12.0.0.jar) + +* [jcuda-12.0.0.jar](https://repo1.maven.org/maven2/org/jcuda/jcuda/12.0.0/jcuda-12.0.0.jar), +* [jcuda-natives-12.0.0.jar](https://repo1.maven.org/maven2/org/jcuda/jcuda-natives/12.0.0/jcuda-natives-12.0.0.jar) For more information on JCuda and potentially more up to date installation instructions or jar files, see here: [JCuda](http://javagl.de/jcuda.org/), [JCuda Usage](https://github.com/jcuda/jcuda-main/blob/master/USAGE.md), [JCuda Maven Repo](https://mvnrepository.com/artifact/org.jcuda) ## Compilation and examples + An example for how to use the Java KvikIO bindings can be found in `src/test/java/ai/rapids/kvikio/cufile/BasicReadWriteTest.java` ##### Note: This example has a dependency on JCuda so ensure that when running the example the JCuda shared library files are on the JVM library path along with the `libCuFileJNI.so` file. ### Setup a test file target + ##### NOTE: the example as written will default to creating a temporary file in your `/tmp` directory. This directory may not be mounted in a compatible manner for use with GDS on your particular system, causing the example to run in compatibility mode. If this is the case, run the following command replacing `/mnt/nvme/` with your mount directory and update `cufile/BasicReadWriteTest.java` to point to the correct file path. touch /mnt/nvme/java_test ### Compile the shared library and Java files with Maven + ##### Note: This wil also run the example code - cd kvikio/java/ - mvn clean install +```shell +cd kvikio/java/ +mvn clean install +``` ### Rerun example code with Maven - cd kvikio/java/ - mvn test +```shell +cd kvikio/java/ +mvn test +``` diff --git a/java/pom.xml b/java/pom.xml index 81fc200f65..111c56b01d 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -1,6 +1,6 @@ 4.0.3-b1 + + + + gcs-maven-central-mirror + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + false + + + + + central + Maven Central + https://repo.maven.apache.org/maven2 + + true + + + false + + + + + + + + gcs-maven-central-mirror + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + false + + + + + central + Maven Plugin Repository + https://repo.maven.apache.org/maven2 + + true + + + false + + + + org.jcuda @@ -58,16 +112,9 @@ SPDX-License-Identifier: Apache-2.0 - - maven-exec-plugin - 1.6.0 - maven-clean-plugin 3.1.0 - - true - maven-compiler-plugin @@ -88,7 +135,7 @@ SPDX-License-Identifier: Apache-2.0 org.junit.jupiter junit-jupiter-engine - 5.4.2 + ${junit.version} @@ -104,14 +151,6 @@ SPDX-License-Identifier: Apache-2.0 maven-deploy-plugin 2.8.2 - - maven-site-plugin - 3.7.1 - - - maven-project-info-reports-plugin - 3.0.0 - From 9073af3c46b79ba02d09a58477ea65e8b2212cb2 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 24 Jun 2026 12:17:00 -0500 Subject: [PATCH 2/2] add maven.config --- java/.mvn/maven.config | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 java/.mvn/maven.config diff --git a/java/.mvn/maven.config b/java/.mvn/maven.config new file mode 100644 index 0000000000..c83cb17ff4 --- /dev/null +++ b/java/.mvn/maven.config @@ -0,0 +1,6 @@ +-e +-B +-Daether.connector.basic.downstreamThreads=1 +-Daether.transport.http.retryHandler.count=5 +-Daether.transport.http.retryHandler.interval=10000 +-Dmaven.wagon.http.retryHandler.count=5