mirror of https://github.com/apache/nifi.git
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:
parent
99f3717f13
commit
e46c7db1ec
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue