Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
287c739
HDDS-14816. Add Recon AI Assistant backend foundation with Google Gem…
ArafatKhan2198 Mar 13, 2026
8871b81
Fixed Compilation Issues
ArafatKhan2198 Mar 13, 2026
03c34ff
Made Improvements to prompt and code
ArafatKhan2198 Mar 16, 2026
fbe9140
Refactored code
ArafatKhan2198 Mar 16, 2026
66253a4
Improved the comments and refactored the code a bit
ArafatKhan2198 Mar 16, 2026
908bfb5
Simplify LLM Provider architecture using Composition
ArafatKhan2198 Mar 16, 2026
f3d4185
Fixed review comment changes
ArafatKhan2198 May 11, 2026
45369ee
Added a single provider for LLM request creation and response parsing
ArafatKhan2198 May 11, 2026
2a74402
Made the avaliable models configurable
ArafatKhan2198 May 11, 2026
37ed873
Added security checks for allowed endpoint prefixes
ArafatKhan2198 May 11, 2026
8abd92b
Moved the prompt to separate files
ArafatKhan2198 May 11, 2026
bc3142d
Improve the tool selection prompt
ArafatKhan2198 May 11, 2026
fc45b8b
Made structural changes
ArafatKhan2198 May 11, 2026
7f3407c
Final review comments
ArafatKhan2198 May 11, 2026
de6c2b9
Final changes
ArafatKhan2198 May 11, 2026
11f02ce
Fixed a few bugs
ArafatKhan2198 May 12, 2026
1cec6a4
Removed a few refrences
ArafatKhan2198 May 13, 2026
37102ff
Reusing HTTP connections
ArafatKhan2198 May 19, 2026
50c4daa
Removed redundant documentation, and fixed configuration loading work…
ArafatKhan2198 May 19, 2026
44c7503
Simplified Tool call
ArafatKhan2198 May 19, 2026
ab86e75
Made changes
ArafatKhan2198 May 23, 2026
d65ff1e
Added tests for validation
ArafatKhan2198 May 26, 2026
ec3d1d8
Fixed final review comments
ArafatKhan2198 May 26, 2026
deb80c3
Added more tests
ArafatKhan2198 May 27, 2026
f8a513b
Added tests for list keys
ArafatKhan2198 May 29, 2026
4405d0d
Created a separate Utils class for the chatbot
ArafatKhan2198 May 29, 2026
0cdb4e8
Use langchain4j-bom 0.35.0 and fix dependency/license fallout for Rec…
ArafatKhan2198 May 29, 2026
763b068
Fixed the missing Jars mentions in the report
ArafatKhan2198 May 30, 2026
854c21b
Refactor(recon): Fix PMD static analysis violations in chatbot modules.
ArafatKhan2198 May 30, 2026
5f65bf3
Fixed Findbugs Issues
ArafatKhan2198 May 30, 2026
ecf4664
Fixed checkstyle Issues
ArafatKhan2198 May 30, 2026
23b3652
Improved the context doc
ArafatKhan2198 May 30, 2026
fab5431
Removed commented code used for testing
ArafatKhan2198 Jun 1, 2026
073f79c
Final changes commited for the bugs found in testing
ArafatKhan2198 Jun 1, 2026
7db5606
Fixed Admin filter test failing
ArafatKhan2198 Jun 1, 2026
cfd3a77
Removed the redundant config and improved the log messaging
ArafatKhan2198 Jun 1, 2026
6540262
Fixed depdency Issue
ArafatKhan2198 Jun 2, 2026
2245ed7
Merge branch 'master' into HDDS-14816
ArafatKhan2198 Jun 2, 2026
7430c00
Fixed checkstyle
ArafatKhan2198 Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dev-support/rat/rat-exclusions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ src/test/resources/ssl/*
# hadoop-ozone/recon
**/pnpm-lock.yaml
src/test/resources/prometheus-test-response.txt
src/main/resources/chatbot/*.txt
src/main/resources/chatbot/*.md

# hadoop-ozone/shaded
**/dependency-reduced-pom.xml
Expand Down
18 changes: 17 additions & 1 deletion hadoop-ozone/dist/src/main/compose/ozone/docker-config
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CORE-SITE.XML_hadoop.proxyuser.hadoop.groups=*
OZONE-SITE.XML_ozone.om.address=om
OZONE-SITE.XML_ozone.om.http-address=om:9874
OZONE-SITE.XML_ozone.scm.http-address=scm:9876
OZONE-SITE.XML_ozone.scm.container.size=100MB
OZONE-SITE.XML_ozone.scm.container.size=1GB

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed? We use a small value to reduce chances of disk out of space error in acceptance tests.

OZONE-SITE.XML_ozone.scm.block.size=1MB
OZONE-SITE.XML_ozone.scm.datanode.ratis.volume.free-space.min=10MB
OZONE-SITE.XML_ozone.scm.pipeline.creation.interval=30s
Expand Down Expand Up @@ -79,3 +79,19 @@ OZONE-SITE.XML_ozone.filesystem.snapshot.enabled=true

# Periodic snapshot defrag for smoketest snapshot/snapshot-defrag.robot (HDDS-15181)
OZONE-SITE.XML_ozone.snapshot.defrag.service.interval=30s

# Recon AI Chatbot — DISABLED by default.
#
# WARNING: The plaintext API key approach shown below is for LOCAL DOCKER
# TESTING ONLY. It must NOT be used on production clusters because plaintext
# keys are exposed via 'hadoop conf | grep api.key' and via Recon's /conf HTTP
# endpoint. For production clusters, store the key in a Hadoop JCEKS credential
# store instead (see ozone-site.xml.template for full setup instructions).
#
# To enable the chatbot locally for testing:
# 1. Uncomment the lines below.
# 2. Replace YOUR_GEMINI_API_KEY_HERE with a real key.
# 3. Never commit a real key to git — rotate it immediately if you do.
# OZONE-SITE.XML_ozone.recon.chatbot.enabled=true
# OZONE-SITE.XML_ozone.recon.chatbot.provider=gemini
# OZONE-SITE.XML_ozone.recon.chatbot.gemini.api.key=YOUR_GEMINI_API_KEY_HERE
19 changes: 19 additions & 0 deletions hadoop-ozone/dist/src/main/license/bin/LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,21 @@ CDDL 1.1 + GPLv2 with classpath exception
org.glassfish.jaxb:txw2


Apache License 2.0
=====================
com.squareup.okhttp3:okhttp
com.squareup.okhttp3:okhttp-sse
com.squareup.okio:okio
com.squareup.retrofit2:converter-jackson
com.squareup.retrofit2:retrofit
dev.ai4j:openai4j
dev.langchain4j:langchain4j-anthropic
dev.langchain4j:langchain4j-core
dev.langchain4j:langchain4j-open-ai
org.jetbrains.kotlin:kotlin-stdlib-common
org.jetbrains.kotlin:kotlin-stdlib-jdk7
org.jetbrains.kotlin:kotlin-stdlib-jdk8

Apache License 2.0
=====================
Comment on lines +264 to 280

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't duplicate License sections, add the dependencies in existing sections in alphabetical order.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created HDDS-15469 for this.


Expand Down Expand Up @@ -454,6 +469,10 @@ Apache License 2.0
org.xerial:sqlite-jdbc
org.yaml:snakeyaml

MIT
=====================
com.knuddels:jtokkit

MIT
=====================

Expand Down
59 changes: 36 additions & 23 deletions hadoop-ozone/dist/src/main/license/jar-report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ share/ozone/lib/aircompressor.jar
share/ozone/lib/animal-sniffer-annotations.jar
share/ozone/lib/annotations.jar
share/ozone/lib/annotations.jar
share/ozone/lib/apache-log4j-extras.jar
share/ozone/lib/aopalliance.jar
share/ozone/lib/aopalliance-repackaged.jar
share/ozone/lib/aopalliance.jar
share/ozone/lib/apache-log4j-extras.jar
Comment on lines -5 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't move around lines unnecessarily.

share/ozone/lib/asm-analysis.jar
share/ozone/lib/asm-commons.jar
share/ozone/lib/asm.jar
share/ozone/lib/asm-tree.jar
share/ozone/lib/asm-util.jar
share/ozone/lib/asm.jar
share/ozone/lib/aspectjrt.jar
share/ozone/lib/avro.jar
share/ozone/lib/aws-java-sdk-core.jar
Expand All @@ -30,13 +30,14 @@ share/ozone/lib/commons-compress.jar
share/ozone/lib/commons-configuration2.jar
share/ozone/lib/commons-csv.jar
share/ozone/lib/commons-digester.jar
share/ozone/lib/commons-fileupload.jar
share/ozone/lib/commons-io.jar
share/ozone/lib/commons-lang3.jar
share/ozone/lib/commons-net.jar
share/ozone/lib/commons-pool2.jar
share/ozone/lib/commons-text.jar
share/ozone/lib/commons-validator.jar
share/ozone/lib/commons-fileupload.jar
share/ozone/lib/converter-jackson.jar
share/ozone/lib/curator-client.jar
share/ozone/lib/curator-framework.jar
share/ozone/lib/derby.jar
Expand All @@ -49,16 +50,16 @@ share/ozone/lib/grpc-api.jar
share/ozone/lib/grpc-context.jar
share/ozone/lib/grpc-core.jar
share/ozone/lib/grpc-netty.jar
share/ozone/lib/grpc-protobuf.jar
share/ozone/lib/grpc-protobuf-lite.jar
share/ozone/lib/grpc-protobuf.jar
share/ozone/lib/grpc-stub.jar
share/ozone/lib/grpc-util.jar
share/ozone/lib/gson.jar
share/ozone/lib/guava-jre.jar
share/ozone/lib/guice-assistedinject.jar
share/ozone/lib/guice-bridge.jar
share/ozone/lib/guice.jar
share/ozone/lib/guice-servlet.jar
share/ozone/lib/guice.jar
share/ozone/lib/hadoop-annotations.jar
share/ozone/lib/hadoop-auth.jar
share/ozone/lib/hadoop-common.jar
Expand All @@ -76,8 +77,8 @@ share/ozone/lib/hdds-erasurecode.jar
share/ozone/lib/hdds-interface-admin.jar
share/ozone/lib/hdds-interface-client.jar
share/ozone/lib/hdds-interface-server.jar
share/ozone/lib/hdds-rocks-native.jar
share/ozone/lib/hdds-managed-rocksdb.jar
share/ozone/lib/hdds-rocks-native.jar
share/ozone/lib/hdds-server-framework.jar
share/ozone/lib/hdds-server-scm.jar
share/ozone/lib/hk2-api.jar
Expand All @@ -101,11 +102,11 @@ share/ozone/lib/jackson-datatype-jsr310.jar
share/ozone/lib/jackson-jaxrs-base.jar
share/ozone/lib/jackson-jaxrs-json-provider.jar
share/ozone/lib/jackson-module-jaxb-annotations.jar
share/ozone/lib/jakarta.activation.jar
share/ozone/lib/jakarta.activation-api.jar
share/ozone/lib/jakarta.activation.jar
share/ozone/lib/jakarta.annotation-api.jar
share/ozone/lib/jakarta.inject.jar
share/ozone/lib/jakarta.inject-api.jar
share/ozone/lib/jakarta.inject.jar
share/ozone/lib/jakarta.validation-api.jar
share/ozone/lib/jakarta.ws.rs-api.jar
share/ozone/lib/jakarta.xml.bind-api.jar
Expand Down Expand Up @@ -141,50 +142,57 @@ share/ozone/lib/jetty-util-ajax.jar
share/ozone/lib/jetty-util.jar
share/ozone/lib/jetty-webapp.jar
share/ozone/lib/jetty-xml.jar
share/ozone/lib/jffi.jar
share/ozone/lib/jffi-native.jar
share/ozone/lib/jffi.jar
share/ozone/lib/jgrapht-core.jar
share/ozone/lib/jgrapht-ext.jar
share/ozone/lib/jgraphx.jar
share/ozone/lib/jheaps.jar
share/ozone/lib/jline.jar
share/ozone/lib/jmespath-java.jar
share/ozone/lib/jna.jar
share/ozone/lib/jna-platform.jar
share/ozone/lib/jna.jar
share/ozone/lib/jnr-a64asm.jar
share/ozone/lib/jnr-constants.jar
share/ozone/lib/jnr-ffi.jar
share/ozone/lib/jnr-posix.jar
share/ozone/lib/jnr-x86asm.jar
share/ozone/lib/joda-time.jar
share/ozone/lib/jooq-codegen.jar
share/ozone/lib/jooq.jar
share/ozone/lib/jooq-meta.jar
share/ozone/lib/jooq.jar
share/ozone/lib/jsch.jar
share/ozone/lib/json-simple.jar
share/ozone/lib/jsp-api.jar
share/ozone/lib/jspecify.jar
share/ozone/lib/jsr311-api.jar
share/ozone/lib/jtokkit.jar
share/ozone/lib/kerb-core.jar
share/ozone/lib/kerb-crypto.jar
share/ozone/lib/kerb-util.jar
share/ozone/lib/kerby-asn1.jar
share/ozone/lib/kerby-config.jar
share/ozone/lib/kerby-pkix.jar
share/ozone/lib/kerby-util.jar
share/ozone/lib/kotlin-stdlib-common.jar
share/ozone/lib/kotlin-stdlib-jdk7.jar
share/ozone/lib/kotlin-stdlib-jdk8.jar
share/ozone/lib/kotlin-stdlib.jar
share/ozone/lib/langchain4j-anthropic.jar
share/ozone/lib/langchain4j-core.jar
share/ozone/lib/langchain4j-open-ai.jar
share/ozone/lib/listenablefuture-empty-to-avoid-conflict-with-guava.jar
share/ozone/lib/log4j-api.jar
share/ozone/lib/log4j-core.jar
share/ozone/lib/metrics-core.jar
share/ozone/lib/netty-buffer.Final.jar
share/ozone/lib/netty-codec.Final.jar
share/ozone/lib/netty-codec-http2.Final.jar
share/ozone/lib/netty-codec-http.Final.jar
share/ozone/lib/netty-codec-http2.Final.jar
share/ozone/lib/netty-codec-socks.Final.jar
share/ozone/lib/netty-codec.Final.jar
share/ozone/lib/netty-common.Final.jar
share/ozone/lib/netty-handler.Final.jar
share/ozone/lib/netty-handler-proxy.Final.jar
share/ozone/lib/netty-handler.Final.jar
share/ozone/lib/netty-resolver.Final.jar
share/ozone/lib/netty-tcnative-boringssl-static.Final-linux-aarch_64.jar
share/ozone/lib/netty-tcnative-boringssl-static.Final-linux-x86_64.jar
Expand All @@ -193,14 +201,18 @@ share/ozone/lib/netty-tcnative-boringssl-static.Final-osx-x86_64.jar
share/ozone/lib/netty-tcnative-boringssl-static.Final-windows-x86_64.jar
share/ozone/lib/netty-tcnative-boringssl-static.Final.jar
share/ozone/lib/netty-tcnative-classes.Final.jar
share/ozone/lib/netty-transport.Final.jar
share/ozone/lib/netty-transport-classes-epoll.Final.jar
share/ozone/lib/netty-transport-native-epoll.Final-linux-x86_64.jar
share/ozone/lib/netty-transport-native-epoll.Final.jar
share/ozone/lib/netty-transport-native-unix-common.Final.jar
share/ozone/lib/netty-transport.Final.jar
share/ozone/lib/nimbus-jose-jwt.jar
share/ozone/lib/okhttp-jvm.jar
share/ozone/lib/okhttp-sse.jar
share/ozone/lib/okhttp.jar
share/ozone/lib/okio-jvm.jar
share/ozone/lib/okio.jar
share/ozone/lib/openai4j.jar
share/ozone/lib/opentelemetry-api.jar
share/ozone/lib/opentelemetry-common.jar
share/ozone/lib/opentelemetry-context.jar
Expand All @@ -215,12 +227,12 @@ share/ozone/lib/opentelemetry-sdk-metrics.jar
share/ozone/lib/opentelemetry-sdk-trace.jar
share/ozone/lib/opentelemetry-sdk.jar
share/ozone/lib/osgi-resource-locator.jar
share/ozone/lib/ozone-client.jar
share/ozone/lib/ozone-cli-admin.jar
share/ozone/lib/ozone-cli-debug.jar
share/ozone/lib/ozone-cli-interactive.jar
share/ozone/lib/ozone-cli-repair.jar
share/ozone/lib/ozone-cli-shell.jar
share/ozone/lib/ozone-client.jar
share/ozone/lib/ozone-common.jar
share/ozone/lib/ozone-csi.jar
share/ozone/lib/ozone-datanode.jar
Expand All @@ -236,18 +248,18 @@ share/ozone/lib/ozone-interface-client.jar
share/ozone/lib/ozone-interface-storage.jar
share/ozone/lib/ozone-manager.jar
share/ozone/lib/ozone-multitenancy-ranger.jar
share/ozone/lib/ozone-reconcodegen.jar
share/ozone/lib/ozone-recon.jar
share/ozone/lib/ozone-reconcodegen.jar
share/ozone/lib/ozone-s3-secret-store.jar
share/ozone/lib/ozone-s3gateway.jar
share/ozone/lib/ozone-tools.jar
share/ozone/lib/ozone-vapor.jar
share/ozone/lib/perfmark-api.jar
share/ozone/lib/picocli.jar
share/ozone/lib/picocli-shell-jline3.jar
share/ozone/lib/picocli.jar
share/ozone/lib/proto-google-common-protos.jar
share/ozone/lib/protobuf-java.jar
share/ozone/lib/protobuf-java.jar
share/ozone/lib/proto-google-common-protos.jar
share/ozone/lib/ranger-audit-core.jar
share/ozone/lib/ranger-authz-api.jar
share/ozone/lib/ranger-intg.jar
Expand All @@ -268,12 +280,13 @@ share/ozone/lib/ratis-thirdparty-misc.jar
share/ozone/lib/ratis-tools.jar
share/ozone/lib/re2j.jar
share/ozone/lib/reflections.jar
share/ozone/lib/rocksdb-checkpoint-differ.jar
share/ozone/lib/reload4j.jar
share/ozone/lib/retrofit.jar
share/ozone/lib/rocksdb-checkpoint-differ.jar
share/ozone/lib/rocksdbjni.jar
share/ozone/lib/simpleclient.jar
share/ozone/lib/simpleclient_common.jar
share/ozone/lib/simpleclient_dropwizard.jar
share/ozone/lib/simpleclient.jar
share/ozone/lib/slf4j-api.jar
share/ozone/lib/slf4j-reload4j.jar
share/ozone/lib/snakeyaml.jar
Expand All @@ -289,6 +302,6 @@ share/ozone/lib/ugsync-util.jar
share/ozone/lib/vault-java-driver.jar
share/ozone/lib/weld-servlet-shaded.Final.jar
share/ozone/lib/woodstox-core.jar
share/ozone/lib/zookeeper.jar
share/ozone/lib/zookeeper-jute.jar
share/ozone/lib/zookeeper.jar
share/ozone/lib/zstd-jni.jar
12 changes: 12 additions & 0 deletions hadoop-ozone/recon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-anthropic</artifactId>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you run mvn dependency:tree this dependency of okhttp:4.12.0 will be emitted as a transitive dependency at compile time from this artifact: langchain4j-anthropic and same okhttp-jvm:5.3.2 of different version will be emitted at runtime from opentelemetry-exporter-sender-okhttp artifact from main pom.xml. So adding an exclusion for okhttp-jvm in the recon pom.xml should be done.

@ArafatKhan2198 ArafatKhan2198 May 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out the OkHttp dependency tree. I dug into this, and because okhttp (pulled by LangChain4j) and okhttp-jvm (pulled by OpenTelemetry) have different artifact IDs, Maven doesn't actually treat them as a version conflict. This split happened because OkHttp 5.x moved to Kotlin Multiplatform and shifted its core classes into the new -jvm artifact.

Because they are technically different artifacts, adding an <exclusion> for okhttp-jvm inside the langchain4j-anthropic block won't have any effect, since LangChain4j doesn't pull in okhttp-jvm to begin with (it only pulls okhttp 4.x).

At runtime, both JARs will be present on the classpath. Fortunately, this won't cause a problem because OkHttp 5.x is highly backward-compatible with 4.x. The JVM will simply load the OkHttpClient class from whichever JAR it scans first, and both OpenTelemetry and LangChain4j will function normally.

If we ever want to strictly enforce a single OkHttp version across the entire project to avoid classpath pollution, the safest way would be to manage both okhttp and okhttp-jvm centrally in the root hadoop-ozone/pom.xml's <dependencyManagement> section. For the scope of this PR, though, it is safe to leave as-is since it won't cause any runtime crashes.

cc: @devmadhuu

</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
</dependency>
Comment on lines +69 to +72

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jar files under share/ozone/lib in the build have changed.

Please update:

 * hadoop-ozone/dist/src/main/license/bin/LICENSE.txt
   (add new dependencies with the appropriate license, delete any removed dependencies)

 * hadoop-ozone/dist/src/main/license/jar-report.txt
   (based on the diff shown below)

If you notice unexpected differences (can happen when the check is run in a
fork), please first update your branch from upstream master to get any other
recent dependency changes.

If you are running this locally after build with -DskipShade, please ignore any
ozone-filesystem jars reported to be missing.

Changes detected:

--- /dev/fd/63	2026-05-27 10:02:54.566056827 +0000
+++ /dev/fd/62	2026-05-27 10:02:54.566056827 +0000
@@ -35,6 +35,7 @@
 share/ozone/lib/commons-pool2.jar
 share/ozone/lib/commons-text.jar
 share/ozone/lib/commons-validator.jar
+share/ozone/lib/converter-jackson.jar
 share/ozone/lib/curator-client.jar
 share/ozone/lib/curator-framework.jar
 share/ozone/lib/derby.jar
@@ -158,6 +159,7 @@
 share/ozone/lib/jsp-api.jar
 share/ozone/lib/jspecify.jar
 share/ozone/lib/jsr311-api.jar
+share/ozone/lib/jtokkit.jar
 share/ozone/lib/kerb-core.jar
 share/ozone/lib/kerb-crypto.jar
 share/ozone/lib/kerb-util.jar
@@ -165,7 +167,14 @@
 share/ozone/lib/kerby-config.jar
 share/ozone/lib/kerby-pkix.jar
 share/ozone/lib/kerby-util.jar
+share/ozone/lib/kotlin-stdlib-common.jar
+share/ozone/lib/kotlin-stdlib-jdk7.jar
+share/ozone/lib/kotlin-stdlib-jdk8.jar
 share/ozone/lib/kotlin-stdlib.jar
+share/ozone/lib/langchain4j-anthropic.jar
+share/ozone/lib/langchain4j-core.jar
+share/ozone/lib/langchain4j-google-ai-gemini.jar
+share/ozone/lib/langchain4j-open-ai.jar
 share/ozone/lib/listenablefuture-empty-to-avoid-conflict-with-guava.jar
 share/ozone/lib/log4j-api.jar
 share/ozone/lib/log4j-core.jar
@@ -193,7 +202,11 @@
 share/ozone/lib/netty-transport.Final.jar
 share/ozone/lib/nimbus-jose-jwt.jar
 share/ozone/lib/okhttp-jvm.jar
+share/ozone/lib/okhttp-sse.jar
+share/ozone/lib/okhttp.jar
 share/ozone/lib/okio-jvm.jar
+share/ozone/lib/okio.jar
+share/ozone/lib/openai4j.jar
 share/ozone/lib/opentelemetry-api.jar
 share/ozone/lib/opentelemetry-common.jar
 share/ozone/lib/opentelemetry-context.jar
@@ -259,6 +272,7 @@
 share/ozone/lib/re2j.jar
 share/ozone/lib/reflections.jar
 share/ozone/lib/reload4j.jar
+share/ozone/lib/retrofit.jar
 share/ozone/lib/rocksdb-checkpoint-differ.jar
 share/ozone/lib/rocksdbjni.jar
 share/ozone/lib/simpleclient.jar

https://github.com/ArafatKhan2198/ozone/actions/runs/26503992485/job/78053259617#step:13:18

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I've updated both jar-report.txt and LICENSE.txt to include the new transitive dependencies introduced by LangChain4j (such as jtokkit, okhttp, retrofit, and kotlin-stdlib).

<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-open-ai</artifactId>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
import org.apache.hadoop.ozone.om.protocolPB.OmTransportFactory;
import org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB;
import org.apache.hadoop.ozone.recon.api.ExportJobManager;
import org.apache.hadoop.ozone.recon.chatbot.ChatbotConfigKeys;
import org.apache.hadoop.ozone.recon.chatbot.ChatbotModule;
import org.apache.hadoop.ozone.recon.heatmap.HeatMapServiceImpl;
import org.apache.hadoop.ozone.recon.persistence.ContainerHealthSchemaManager;
import org.apache.hadoop.ozone.recon.persistence.DataSourceConfiguration;
Expand Down Expand Up @@ -131,6 +133,12 @@ protected void configure() {
install(new ReconOmTaskBindingModule());
install(new ReconDaoBindingModule());
bind(ReconTaskStatusUpdaterManager.class).in(Singleton.class);
// Only install chatbot bindings when the feature is explicitly enabled.
// This prevents startup-time failures (e.g. bad credential provider paths)
// from breaking Recon when the chatbot is intentionally disabled.
if (ChatbotConfigKeys.isChatbotEnabled(reconServer.getConf())) {
install(new ChatbotModule());
}

bind(ReconTaskController.class)
.to(ReconTaskControllerImpl.class).in(Singleton.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
import java.util.Set;
import javax.ws.rs.core.UriBuilder;
import org.apache.hadoop.hdds.conf.ConfigurationSource;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.ozone.OzoneSecurityUtil;
import org.apache.hadoop.ozone.recon.api.AdminOnly;
import org.apache.hadoop.ozone.recon.api.filters.ReconAdminFilter;
import org.apache.hadoop.ozone.recon.api.filters.ReconAuthFilter;
import org.apache.hadoop.ozone.recon.chatbot.ChatbotConfigKeys;
import org.glassfish.hk2.api.ServiceLocator;
import org.glassfish.jersey.internal.inject.InjectionManager;
import org.glassfish.jersey.server.ResourceConfig;
Expand All @@ -54,6 +56,8 @@ public class ReconRestServletModule extends ServletModule {
"v1").build().toString();
public static final String API_PACKAGE = "org.apache.hadoop.ozone.recon.api";

public static final String CHATBOT_API_PACKAGE = "org.apache.hadoop.ozone.recon.chatbot.api";

private static final Logger LOG =
LoggerFactory.getLogger(ReconRestServletModule.class);

Expand All @@ -65,7 +69,12 @@ public ReconRestServletModule(ConfigurationSource conf) {

@Override
protected void configureServlets() {
configureApi(BASE_API_PATH, API_PACKAGE);
if (conf instanceof OzoneConfiguration
&& ChatbotConfigKeys.isChatbotEnabled((OzoneConfiguration) conf)) {
configureApi(BASE_API_PATH, API_PACKAGE, CHATBOT_API_PACKAGE);
} else {
configureApi(BASE_API_PATH, API_PACKAGE);
}
}

private void configureApi(String baseApiPath, String... packages) {
Expand Down Expand Up @@ -117,7 +126,7 @@ private void addFilters(String basePath, Set<String> adminSubPaths) {

boolean authorizationEnabled = OzoneSecurityUtil.isAuthorizationEnabled(conf);
if (authorizationEnabled) {
for (String path: adminSubPaths) {
for (String path : adminSubPaths) {
String adminPath =
UriBuilder.fromPath(basePath).path(path + "*").build().toString();
filter(adminPath).through(ReconAdminFilter.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ public class ReconServer extends GenericCli implements Callable<Void> {

private volatile boolean isStarted = false;

public OzoneConfiguration getConf() {
return configuration;
}

public static void main(String[] args) {
OzoneNetUtils.disableJvmNetworkAddressCacheIfRequired(
new OzoneConfiguration());
Expand Down
Loading