NIFI-13657 Fixed Reducer for Processor Load Average in Node Status

This closes #9177

Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
Bryan Bende 2024-08-14 15:14:40 -04:00 committed by exceptionfactory
parent 99f3717f13
commit e46c7db1ec
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public enum NodeStatusDescriptor {
@Override
public Long reduce(final List<StatusSnapshot> values) {
return (long) values.stream()
.map(snapshot -> snapshot.getStatusMetric(HEAP_UTILIZATION.getDescriptor()))
.map(snapshot -> snapshot.getStatusMetric(PROCESSOR_LOAD_AVERAGE.getDescriptor()))
.filter(Objects::nonNull)
.mapToLong(value -> value)
.average()