Mihhai commented on code in PR #10353:
URL: https://github.com/apache/nifi/pull/10353#discussion_r2398008061
##########
minifi/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/c2/C2NifiClientService.java:
##########
@@ -427,9 +435,29 @@ private ProcessorStatus
convertProcessorStatus(org.apache.nifi.controller.status
result.setProcessingNanos(processorStatus.getProcessingNanos());
result.setActiveThreadCount(processorStatus.getActiveThreadCount());
result.setTerminatedThreadCount(processorStatus.getTerminatedThreadCount());
+ RunStatus mappedRunStatus =
mapProcessorRunStatus(processorStatus.getRunStatus());
+ if (mappedRunStatus != null) {
+ result.setRunStatus(mappedRunStatus);
+ }
return result;
}
+ private RunStatus
mapProcessorRunStatus(org.apache.nifi.controller.status.RunStatus
controllerRunStatus) {
Review Comment:
i refactor to the one line mapping you suggested and i removed the helper
method.
##########
minifi/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-framework-core/src/main/java/org/apache/nifi/minifi/c2/C2NifiClientService.java:
##########
@@ -427,9 +435,29 @@ private ProcessorStatus
convertProcessorStatus(org.apache.nifi.controller.status
result.setProcessingNanos(processorStatus.getProcessingNanos());
result.setActiveThreadCount(processorStatus.getActiveThreadCount());
result.setTerminatedThreadCount(processorStatus.getTerminatedThreadCount());
+ RunStatus mappedRunStatus =
mapProcessorRunStatus(processorStatus.getRunStatus());
+ if (mappedRunStatus != null) {
+ result.setRunStatus(mappedRunStatus);
+ }
return result;
}
+ private RunStatus
mapProcessorRunStatus(org.apache.nifi.controller.status.RunStatus
controllerRunStatus) {
Review Comment:
i refactored to the one line mapping you suggested and i removed the helper
method.
--
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]