build-test-cudf-java
rapidsai/cudf/.agents/skills/build-test-cudf-java/SKILL.md
Build and test cudf Java bindings (cudf-java) inside a cudf devcontainer. Use when the user asks to build, compile, or test Java code in the cudf repository.
- Installs packages
What's in it
- Build and Test cudf-java
- Prerequisites
- JDK and Maven
- Choose a libcudf provider
- Running Java tests
- All tests
- Discovering tests
- Specific test class
- Specific test method
- Tests with special configuration
--- name: build-test-cudf-java description: Build and test cudf Java bindings (cudf-java) inside a cudf devcontainer. Use when the user asks to build, compile, or test Java code in the cudf repository. --- # Build and Test cudf-java ## Prerequisites ### JDK and Maven Ensure JDK (17+) and Maven are installed: ```bash java -version && mvn --version ``` If either is missing, detect the OS and install using the appropriate package manager. Hints: - **Debian/Ubuntu** (`apt`): `sudo apt-get update -qq && sudo apt-get install -y -qq default-jdk maven` - **Fedora/RHEL** (`dnf`): `sudo dnf install -y java-17-openjdk-devel maven` - **Arch** (`pacman`): `sudo pacman -S --noconfirm jdk17-openjdk maven` - **macOS** (`brew`): `brew install openjdk@17 maven` Detect the OS by checking which package manager is available (e.g. `command -v apt-get`, `command -v dnf`, etc.) and use the matching command. Run all Maven commands below from the `java/` directory. ## Choose a libcudf provider Prefer the installed nightly package when the changes are limited to Java or JNI and the user has not requested a libcudf source rebuild: - [Build JNI against an installed nightly libcudf](references/nightly-libcudf.md), then continue at [Running Java tests](#running-java-tests). Use a local libcudf source build when the changes affect libcudf, require unreleased libcudf headers or symbols, no compatible nightly exists, or the user explicitly requests a source build: - [Build JNI against a local libcudf build](references/local-libcudf.md), then continue at [Running Java tests](#running-java-tests). ## Running Java tests **Always run `mvn install $MVN_COMMON_OPTS -DskipTests` first** before running tests. The `mvn test` goal re-triggers the cmake/native build step. If `target/cmake-build` already contains fully built artifacts from a prior `mvn install`, this is an incremental no-op. But if the cmake-build directory was cleaned or is missing, `mvn test` may hit a race condition where the linker tries to link `libcudfjni.so` before `libarrow.a` is fully built, causing a `cannot find libarrow.a` error. If this happens, re-run `mvn install $MVN_COMMON_OPTS -DskipTests` to rebuild the native code cleanly, then retry `mvn test`. ### All tests ```bash mvn test $MVN_COMMON_OPTS ``` The POM routes tests that need special assertion or fork behavior to dedicated Surefire executions. ### Discovering tests Java test sources are at `src/test/java/ai/rapids/cudf/`. Use `find` or `glob` to discover test classes: ```bash find src/test/java -name "*Test.java" | head -20 ``` ### Specific test class ```bash mvn surefire:test@main-tests $MVN_COMMON_OPTS \ -Dtest="<ClassName>" ``` ### Specific test method ```bash mvn surefire:test@main-tests $MVN_COMMON_OPTS \ -Dtest="<ClassName>#<testName>" ``` Use the named `main-tests` execution for specific ordinary tests so `-Dtest` does not affect the separately configured executions. ### Tests with special configuration Invoke tests that require special configuration through their dedicated executions: ```bash mvn surefire:test@non-empty-null-test $MVN_COMMON_OPTS mvn surefire:test@fatal-cuda-test $MVN_COMMON_OPTS mvn surefire:test@native-deps-loader-test $MVN_COMMON_OPTS ```
More agent context in rapidsai/cudf
9 other files this repository gives its agents.
Skill
- build-test-cudf.agents/skills/build-test-cudf/SKILL.md
- debug-cudf-pandas.agents/skills/debug-cudf-pandas/SKILL.md
- perf-compare-cudf.agents/skills/perf-compare-cudf/SKILL.md
- reproduce-ci.agents/skills/reproduce-ci/SKILL.md
- review-cudf-polars-expressions.agents/skills/review-cudf-polars-expressions/SKILL.md
- review-cudf.agents/skills/review-cudf/SKILL.md
- update-narwhals-testing.agents/skills/update-narwhals-testing/SKILL.md
- accelerated-computing-cudfskills/accelerated-computing-cudf/SKILL.md
- cudf-query-engine-builderskills/cudf-query-engine-builder/SKILL.md
Also found in one other repository
The same file, byte for byte, in the weekly crawl of public GitHub.
- NVIDIA/cudf9.8k
Discussion
Evidence it works
Elsewhere, people who say they tested it. Read them for what they measured.
- Dec 8, 2021 · GitHub · NVIDIA/cudf · move benchmark input generation to GPU for CONTIGUOUS_SPLIT_BENCH
Talked about elsewhere, linking to rapidsai/cudf
- cuDF – GPU DataFrame Library
Hacker News · 107 points · 29 comments · Jun 2, 2024
- GPU processing - cuDF install problem (O/S or hardware issue?)
Stack Overflow · 8 votes · Aug 27, 2020
- cuDF – GPU DataFrame Library (@github.com) Main Link | Discussion
Bluesky · @newsycombinator.bsky.social · 1 likes and reposts · Jun 3, 2024
- Support the __cuda_array_interface__ protocol
GitHub · tensorflow/tensorflow · 50 reactions · 29 comments · May 26, 2019
- CuDF – GPU DataFrame Library
Hacker News · 1 points · Jun 1, 2024
- ERROR: Could not find a version that satisfies the requirement dask-cudf (from versions: none)
Stack Overflow · 4 votes · 2 answers · Oct 28, 2020
- Add `streaming_groupby` for stateful streaming aggregation
GitHub · NVIDIA/cudf · 9 reactions · 16 comments · Mar 25, 2026
- RAPIDS pip installation issue
Stack Overflow · 3 votes · Jun 29, 2023
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

