exceptionfactory commented on code in PR #8251: URL: https://github.com/apache/nifi/pull/8251#discussion_r1453657239
########## nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java: ########## @@ -6117,27 +6123,53 @@ protected Collection<AbstractMetricsRegistry> populateFlowMetrics() { // Get Connection Status Analytics (predictions, e.g.) Set<Connection> connections = controllerFacade.getFlowManager().findAllConnections(); - for (Connection c : connections) { - // If a ResourceNotFoundException is thrown, analytics hasn't been enabled + Collection<Map<String, Long>> predictions = Collections.synchronizedList(new ArrayList<>()); + + final boolean analyticsEnabled = Boolean.parseBoolean(properties.getProperty(NiFiProperties.ANALYTICS_PREDICTION_ENABLED, Boolean.FALSE.toString())); + + if (analyticsEnabled) { + if (parallelProcessingThreadPool == null) { + parallelProcessingThreadPool = createParallelProcessingThreadPool(); Review Comment: See same note on the pull request for the main branch. In this case as well, the thread pool should be created when the ServiceFacade class is initialized. -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org