reiabreu opened a new pull request, #8591: URL: https://github.com/apache/storm/pull/8591
## What is the purpose of the change This is a backport of #8589 to the `2.x` branch. It fixes a regression where the Kafka spout lag reporting in the Storm UI would fail silently (throwing a `ClassCastException` in logs) when partitions had no committed offsets. ## Brief change log - **KafkaOffsetLagUtil**: Optimized offset retrieval using batch calls and added null-checks to handle partitions without committed offsets (reporting -1 instead of crashing). - **TopologySpoutLag**: Improved JSON parsing logic to safely handle non-JSON error messages from the monitor subprocess, preventing `ClassCastException`. - **Integration Test**: Added `KafkaOffsetLagUtilTest` using Testcontainers to verify the fix. ## Related Issues - Original Issue: [STORM-4041](https://issues.apache.org/jira/browse/STORM-4041) - Original PR: #8589 ## Verifying this change - Added `KafkaOffsetLagUtilTest` which passes locally on the `2.x` branch. - Manually verified compilation of `storm-kafka-monitor`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
