NIFI-1755 Fixed remote process group status counts by only considering connected remote ports

This closes #347
This commit is contained in:
Pierre Villard 2016-04-13 11:31:23 +02:00 committed by Oleg Zhurakousky
parent 87d96c0225
commit b2ce6f1f96
1 changed files with 15 additions and 15 deletions

View File

@ -2472,7 +2472,7 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
// determine if this input port is connected
final boolean isConnected = port.hasIncomingConnection();
// we only want to conside remote ports that we are connected to
// we only want to consider remote ports that we are connected to
if (isConnected) {
if (port.isRunning()) {
activePortCount++;
@ -2481,7 +2481,6 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
}
activeThreadCount += processScheduler.getActiveThreadCount(port);
}
final FlowFileEvent portEvent = statusReport.getReportEntry(port.getIdentifier());
if (portEvent != null) {
@ -2492,12 +2491,13 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
sentContentSize += portEvent.getBytesSent();
}
}
}
for (final Port port : remoteGroup.getOutputPorts()) {
// determine if this output port is connected
final boolean isConnected = !port.getConnections().isEmpty();
// we only want to conside remote ports that we are connected from
// we only want to consider remote ports that we are connected from
if (isConnected) {
if (port.isRunning()) {
activePortCount++;
@ -2506,7 +2506,6 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
}
activeThreadCount += processScheduler.getActiveThreadCount(port);
}
final FlowFileEvent portEvent = statusReport.getReportEntry(port.getIdentifier());
if (portEvent != null) {
@ -2514,6 +2513,7 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
receivedContentSize += portEvent.getBytesReceived();
}
}
}
status.setId(remoteGroup.getIdentifier());
status.setTransmissionStatus(remoteGroup.isTransmitting() ? TransmissionStatus.Transmitting : TransmissionStatus.NotTransmitting);