This is an automated email from the ASF dual-hosted git repository.
rzo1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git
The following commit(s) were added to refs/heads/master by this push:
new 088c0ddf8 STORM-4069 - java.lang.ClassCastException for Trident-based
Topology
088c0ddf8 is described below
commit 088c0ddf800aa10a96c4edec603cb2425d04bf8b
Author: Richard Zowalla <[email protected]>
AuthorDate: Fri Aug 9 19:52:14 2024 +0200
STORM-4069 - java.lang.ClassCastException for Trident-based Topology
---
.../apache/storm/trident/topology/MasterBatchCoordinator.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git
a/storm-client/src/jvm/org/apache/storm/trident/topology/MasterBatchCoordinator.java
b/storm-client/src/jvm/org/apache/storm/trident/topology/MasterBatchCoordinator.java
index 6b595e486..aed1045a9 100644
---
a/storm-client/src/jvm/org/apache/storm/trident/topology/MasterBatchCoordinator.java
+++
b/storm-client/src/jvm/org/apache/storm/trident/topology/MasterBatchCoordinator.java
@@ -232,9 +232,12 @@ public class MasterBatchCoordinator extends BaseRichSpout {
private Long getStoredCurrTransaction() {
Long ret = INIT_TXID;
for (TransactionalState state : states) {
- Long curr = (Long) state.getData(CURRENT_TX);
- if (curr != null && curr.compareTo(ret) > 0) {
- ret = curr;
+ final Object o = state.getData(CURRENT_TX);
+ if (o instanceof Number) {
+ final Long curr = ((Number) o).longValue();
+ if (curr.compareTo(ret) > 0) {
+ ret = curr;
+ }
}
}
return ret;