|
13 | 13 | import io.kafbat.ui.model.InternalLogDirStats; |
14 | 14 | import io.kafbat.ui.model.InternalPartition; |
15 | 15 | import io.kafbat.ui.model.InternalPartitionsOffsets; |
| 16 | +import io.kafbat.ui.model.InternalPartitionsOffsets.Offsets; |
16 | 17 | import io.kafbat.ui.model.InternalReplica; |
17 | 18 | import io.kafbat.ui.model.InternalTopic; |
18 | 19 | import io.kafbat.ui.model.InternalTopicConfig; |
@@ -143,14 +144,12 @@ private Mono<InternalPartitionsOffsets> getPartitionOffsets(Map<String, TopicDes |
143 | 144 | var descriptions = descriptionsMap.values(); |
144 | 145 | return ac.listOffsets(descriptions, OffsetSpec.earliest()) |
145 | 146 | .zipWith(ac.listOffsets(descriptions, OffsetSpec.latest()), |
146 | | - (earliest, latest) -> |
147 | | - Sets.intersection(earliest.keySet(), latest.keySet()) |
148 | | - .stream() |
149 | | - .map(tp -> |
150 | | - Map.entry(tp, |
151 | | - new InternalPartitionsOffsets.Offsets( |
152 | | - earliest.get(tp), latest.get(tp)))) |
153 | | - .collect(toMap(Map.Entry::getKey, Map.Entry::getValue))) |
| 147 | + (earliest, latest) -> (Map<TopicPartition, Offsets>) Sets.intersection(earliest.keySet(), latest.keySet()) |
| 148 | + .stream() |
| 149 | + .map(tp -> Map.entry(tp, |
| 150 | + new InternalPartitionsOffsets.Offsets( |
| 151 | + earliest.get(tp), latest.get(tp)))) |
| 152 | + .collect(toMap(Map.Entry::getKey, Map.Entry::getValue))) |
154 | 153 | .map(InternalPartitionsOffsets::new); |
155 | 154 | } |
156 | 155 |
|
|
0 commit comments