Marton Greber has submitted this change and it was merged. ( 
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
Reviewed-on: http://gerrit.cloudera.org:8080/23510
Tested-by: Marton Greber <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
---
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, 296 insertions(+), 15 deletions(-)

Approvals:
  Marton Greber: Verified
  Alexey Serbin: Looks good to me, approved

--
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: merged
Gerrit-Change-Id: I7f45295d4dfa32e28f9a6369612bb5bc25a2a038
Gerrit-Change-Number: 23510
Gerrit-PatchSet: 4
Gerrit-Owner: Marton Greber <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>

Reply via email to