-
Notifications
You must be signed in to change notification settings - Fork 91
java: use GCS mirror for Maven, other small changes #992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| ``` |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!-- | ||||
| SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. | ||||
| SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||||
| SPDX-License-Identifier: Apache-2.0 | ||||
| --> | ||||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||||
|
|
@@ -28,6 +28,60 @@ SPDX-License-Identifier: Apache-2.0 | |||
| <cmake.version>4.0.3-b1</cmake.version> | ||||
| </properties> | ||||
|
|
||||
| <repositories> | ||||
| <!-- Prefer Google Cloud mirror, which has higher rate limits --> | ||||
| <repository> | ||||
| <id>gcs-maven-central-mirror</id> | ||||
| <name>GCS Maven Central mirror</name> | ||||
| <url>https://maven-central.storage-download.googleapis.com/maven2/</url> | ||||
| <releases> | ||||
| <enabled>true</enabled> | ||||
| </releases> | ||||
| <snapshots> | ||||
| <enabled>false</enabled> | ||||
| </snapshots> | ||||
| </repository> | ||||
| <!-- Fall back to Maven upstream for packages not found in GCS mirror --> | ||||
| <repository> | ||||
| <id>central</id> | ||||
| <name>Maven Central</name> | ||||
| <url>https://repo.maven.apache.org/maven2</url> | ||||
| <releases> | ||||
| <enabled>true</enabled> | ||||
| </releases> | ||||
| <snapshots> | ||||
| <enabled>false</enabled> | ||||
| </snapshots> | ||||
| </repository> | ||||
| </repositories> | ||||
|
|
||||
| <pluginRepositories> | ||||
| <!-- Prefer Google Cloud mirror, which has higher rate limits --> | ||||
| <pluginRepository> | ||||
| <id>gcs-maven-central-mirror</id> | ||||
| <name>GCS Maven Central mirror</name> | ||||
| <url>https://maven-central.storage-download.googleapis.com/maven2/</url> | ||||
| <releases> | ||||
| <enabled>true</enabled> | ||||
| </releases> | ||||
| <snapshots> | ||||
| <enabled>false</enabled> | ||||
| </snapshots> | ||||
| </pluginRepository> | ||||
| <!-- Fall back to Maven upstream for packages not found in GCS mirror --> | ||||
| <pluginRepository> | ||||
| <id>central</id> | ||||
| <name>Maven Plugin Repository</name> | ||||
| <url>https://repo.maven.apache.org/maven2</url> | ||||
| <releases> | ||||
| <enabled>true</enabled> | ||||
| </releases> | ||||
| <snapshots> | ||||
| <enabled>false</enabled> | ||||
| </snapshots> | ||||
| </pluginRepository> | ||||
| </pluginRepositories> | ||||
|
|
||||
| <dependencies> | ||||
| <dependency> | ||||
| <groupId>org.jcuda</groupId> | ||||
|
|
@@ -58,16 +112,9 @@ SPDX-License-Identifier: Apache-2.0 | |||
| <build> | ||||
| <pluginManagement> | ||||
| <plugins> | ||||
| <plugin> | ||||
| <artifactId>maven-exec-plugin</artifactId> | ||||
| <version>1.6.0</version> | ||||
| </plugin> | ||||
| <plugin> | ||||
| <artifactId>maven-clean-plugin</artifactId> | ||||
| <version>3.1.0</version> | ||||
| <configuration> | ||||
| <createDirs>true</createDirs> | ||||
| </configuration> | ||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
| </plugin> | ||||
| <plugin> | ||||
| <artifactId>maven-compiler-plugin</artifactId> | ||||
|
|
@@ -88,7 +135,7 @@ SPDX-License-Identifier: Apache-2.0 | |||
| <dependency> | ||||
| <groupId>org.junit.jupiter</groupId> | ||||
| <artifactId>junit-jupiter-engine</artifactId> | ||||
| <version>5.4.2</version> | ||||
| <version>${junit.version}</version> | ||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This version is stored a few lines up: Line 26 in 37790a1
Reusing that value reduces the risk of inconsistencies. |
||||
| </dependency> | ||||
| </dependencies> | ||||
| </plugin> | ||||
|
|
@@ -104,14 +151,6 @@ SPDX-License-Identifier: Apache-2.0 | |||
| <artifactId>maven-deploy-plugin</artifactId> | ||||
| <version>2.8.2</version> | ||||
| </plugin> | ||||
| <plugin> | ||||
| <artifactId>maven-site-plugin</artifactId> | ||||
| <version>3.7.1</version> | ||||
| </plugin> | ||||
| <plugin> | ||||
| <artifactId>maven-project-info-reports-plugin</artifactId> | ||||
| <version>3.0.0</version> | ||||
| </plugin> | ||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These don't have entries in |
||||
| </plugins> | ||||
| </pluginManagement> | ||||
| <plugins> | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See NVIDIA/cuvs#2253 (comment) for an explanation of these flags.
I believe comments are not allowed in this file because its contents are passed literally to
mvn.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it's worth a CI re-run, but one option (maybe) would be to document the options in a
READMEinside the.mvndirectory. But that shouldn't block this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah fair. I went back and forth on that and settled on not doing it because I thought the git blame pointing back to this PR + the mostly informative names was probably enough to communicate the intent.
I'm gonna treat that "I don't know" and "(maybe)" as you also being unsure about how to handle this 😂
Think I'll just merge it as-is.