build-test-cudf-java

Build and test cuDF Java bindings with Maven against nightly or local libcudf builds.

9.7k|1.1k|Updated May 7, 2017
One-click install
npx skills add https://github.com/rapidsai/cudf --skill build-test-cudf-java
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-test-cudf-java
Source: https://github.com/rapidsai/cudf/tree/main/.agents/skills/build-test-cudf-java
Command: npx skills add https://github.com/rapidsai/cudf --skill build-test-cudf-java

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building and testing the cuDF Java bindings (cudf-java) requires correctly configuring JNI against either an installed nightly libcudf package or a local libcudf source build, and misconfiguration causes linker errors, symbol resolution failures, and flaky Maven test runs. This Skill guides the full workflow inside a cuDF devcontainer.

Core Features & Use Cases

  • Prerequisite Setup: Verifies and installs JDK 17+ and Maven across apt, dnf, pacman, and brew based systems.
  • Dual libcudf Providers: Builds JNI against an installed nightly libcudf conda package for Java-only changes, or against a local libcudf source build when native changes are involved.
  • Robust Test Execution: Runs all tests, specific test classes or methods via named Surefire executions, and avoids the known libarrow.a linker race condition by running mvn install before mvn test.
  • Use Case: A developer modifies a JNI class in the cudf repository and needs to compile the native bindings against a matching nightly libcudf, verify symbol resolution with ldd, and run a single failing test class.

Quick Start

Build the cuDF Java bindings and run the full Java test suite in this devcontainer.

Frequently Asked Questions about build-test-cudf-java

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build and test cuDF Java bindings?

Run Maven from the java/ directory with JDK 17+ installed. First execute mvn install with -DskipTests to build the native JNI artifacts, then run mvn test to execute the full test suite through the configured Surefire executions.

How do I run a single Java test class or method in cudf?

Use the named main-tests Surefire execution with the -Dtest flag, for example mvn surefire:test@main-tests -Dtest="ClassName" or -Dtest="ClassName#methodName". This prevents the filter from affecting the separately configured special test executions.

Should I build JNI against a nightly libcudf or a local source build?

Use an installed nightly libcudf package when changes are limited to Java or JNI code. Use a local libcudf source build when changes affect libcudf itself, require unreleased headers or symbols, or no compatible nightly exists.

Why does mvn test fail with a cannot find libarrow.a error?

This happens when the target/cmake-build directory was cleaned and mvn test re-triggers the native build, causing a race where linking libcudfjni.so starts before libarrow.a finishes. Re-run mvn install with -DskipTests to rebuild natively, then retry mvn test.

How do I verify the JNI library resolves against the correct libcudf?

Check target/cmake-build/CMakeCache.txt for CUDF_INSTALL_DIR and related flags, then run ldd -r on libcudfjni.so to confirm every dependency resolves from the intended conda environment. Keep the environment's lib directory on LD_LIBRARY_PATH while testing.