Marton Greber has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23510


Change subject: KUDU-3478 Add Java client examples test script
......................................................................

KUDU-3478 Add Java client examples test script

This patch adds test-java-examples.sh to verify that Java client
examples run correctly against a local Kudu cluster.

The script:
- Publishes locally built Kudu Java artifacts to Maven local repository
- Builds each Maven-based example project
- Starts a local Kudu cluster using shared test-cluster-common.sh
- Runs the example JARs against the test cluster
- Supports testing all examples or individual examples

Examples tested:
- java-example: Basic CRUD operations and table alteration
- insert-loadgen: Random data insertion (auto-creates table)
- collectl: Build verification only (requires socket input at runtime)

The script is integrated into build-and-test.sh to run during CI.

Changes to examples:

- examples/java/java-example/pom.xml:
    Added Maven profile to skip kudu-binary dependency when using
    -DuseLocalKuduBin=true, enabling builds against locally built Kudu
    without downloading the large kudu-binary JAR from Maven Central.

- examples/java/java-example/README.adoc:
    Documented two build modes: client application development (using
    Maven Central artifacts) vs Kudu development (using local build).
    Explained -DuseLocalKuduBin flag and how tests auto-discover
    binaries via PATH.

- examples/java/insert-loadgen/src/main/java/.../InsertLoadgen.java:
    Added createTableIfNotExists() method to auto-create test table if
    it doesn't exist, making the example more self-contained and easier
    to run in testing scenarios.

Change-Id: I7f45295d4dfa32e28f9a6369612bb5bc25a2a038
---
M build-support/jenkins/build-and-test.sh
M 
examples/java/insert-loadgen/src/main/java/org/apache/kudu/examples/InsertLoadgen.java
M examples/java/java-example/README.adoc
M examples/java/java-example/pom.xml
A java/test-java-examples.sh
5 files changed, 289 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/10/23510/1
--
To view, visit http://gerrit.cloudera.org:8080/23510
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f45295d4dfa32e28f9a6369612bb5bc25a2a038
Gerrit-Change-Number: 23510
Gerrit-PatchSet: 1
Gerrit-Owner: Marton Greber <[email protected]>

Reply via email to