Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
3.3.0
-
None
-
None
Description
BrokerRegistration#toString throws an exception, terminating metadata replay, because the sorted() method is used on an entry set rather than a key set.
Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: class java.util.HashMap$Node cannot be cast to class java.lang.Comparable (java.util.HashMap$Node and java.lan g.Comparable are in module java.base of loader 'bootstrap') at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073) at kafka.server.BrokerServer.startup(BrokerServer.scala:846) ... 147 more Caused by: java.lang.ClassCastException: class java.util.HashMap$Node cannot be cast to class java.lang.Comparable (java.util.HashMap$Node and java.lang.Comparable are in module java.base of loader 'bootstrap') at java.base/java.util.Comparators$NaturalOrderComparator.compare(Comparators.java:47) at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) at java.base/java.util.TimSort.sort(TimSort.java:220) at java.base/java.util.Arrays.sort(Arrays.java:1307) at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:353) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at org.apache.kafka.metadata.BrokerRegistration.toString(BrokerRegistration.java:228) at java.base/java.util.Formatter$FormatSpecifier.printString(Formatter.java:3056) at java.base/java.util.Formatter$FormatSpecifier.print(Formatter.java:2933) at java.base/java.util.Formatter.format(Formatter.java:2689) at java.base/java.util.Formatter.format(Formatter.java:2625) at java.base/java.lang.String.format(String.java:4143) at java.base/java.util.Optional.toString(Optional.java:457) at java.base/java.lang.String.valueOf(String.java:4218) at java.base/java.lang.StringBuilder.append(StringBuilder.java:173) at java.base/java.util.AbstractMap.toString(AbstractMap.java:555) at java.base/java.lang.String.valueOf(String.java:4218) at java.base/java.lang.StringBuilder.append(StringBuilder.java:173) at org.apache.kafka.image.ClusterDelta.toString(ClusterDelta.java:225)
Attachments
Issue Links
- links to