mirror of https://github.com/apache/nifi.git
NIFI-9222 allow ControllerStatusReportingTask to log details even when there are no Counters present on Processors (#5573)
This commit is contained in:
parent
d783e10e68
commit
b0b1a57b98
|
@ -204,6 +204,7 @@ public class ControllerStatusReportingTask extends AbstractReportingTask {
|
|||
for (final ProcessorStatus processorStatus : processorStatuses) {
|
||||
final Map<String, Long> counters = processorStatus.getCounters();
|
||||
|
||||
if (counters != null && !counters.isEmpty()){
|
||||
for (final Map.Entry<String, Long> entry : counters.entrySet()) {
|
||||
final String counterName = entry.getKey();
|
||||
final Long counterValue = entry.getValue() / divisor;
|
||||
|
@ -228,6 +229,7 @@ public class ControllerStatusReportingTask extends AbstractReportingTask {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (final ProcessGroupStatus childGroupStatus : status.getProcessGroupStatus()) {
|
||||
printCounterStatus(childGroupStatus, builder, showDeltas, divisor);
|
||||
|
|
Loading…
Reference in New Issue