clintropolis commented on code in PR #17741:
URL: https://github.com/apache/druid/pull/17741#discussion_r1964833207
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java:
##########
@@ -552,19 +552,26 @@ private void emitSummaryMetrics(final
MSQTaskReportPayload msqTaskReportPayload,
long totalProcessedBytes = 0;
if (msqTaskReportPayload.getCounters() != null) {
- totalProcessedBytes = msqTaskReportPayload.getCounters()
- .copyMap()
- .entrySet()
- .stream()
- .filter(entry -> stagesReport == null ||
stagesToInclude.contains(entry.getKey()))
- .flatMap(counterSnapshotsMap ->
counterSnapshotsMap.getValue().values().stream())
- .flatMap(counterSnapshots ->
counterSnapshots.getMap().entrySet().stream())
- .filter(entry -> entry.getKey().startsWith("input"))
- .mapToLong(entry -> {
- ChannelCounters.Snapshot snapshot = (ChannelCounters.Snapshot)
entry.getValue();
- return snapshot.getBytes() == null ? 0L :
Arrays.stream(snapshot.getBytes()).sum();
- })
- .sum();
+ totalProcessedBytes =
+ msqTaskReportPayload.getCounters()
+ .copyMap()
+ .entrySet()
+ .stream()
+ .filter(entry -> stagesReport == null ||
stagesToInclude.contains(entry.getKey()))
+ .flatMap(counterSnapshotsMap ->
counterSnapshotsMap.getValue()
+
.values()
+
.stream())
+ .flatMap(counterSnapshots ->
counterSnapshots.getMap()
+
.entrySet()
+
.stream())
+ .filter(entry ->
entry.getKey().startsWith("input"))
+ .mapToLong(entry -> {
+ ChannelCounters.Snapshot snapshot =
(ChannelCounters.Snapshot) entry.getValue();
+ return snapshot.getBytes() == null
+ ? 0L
+ :
Arrays.stream(snapshot.getBytes()).sum();
+ })
+ .sum();
Review Comment:
so like I don't normally do the whole file, but when looking through this
one I kept noticing things that were obviously incorrectly formatted and
decided to just run the whole file through because it was so ugly. I can revert
but I'm going to immediately turn around and open another PR to do the same
thing, if you would prefer that I can go to the trouble...
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]