Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/275#discussion_r56046482
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/AbstractSchedulingAgent.java
---
@@ -33,6 +42,27 @@
*/
abstract class AbstractSchedulingAgent implements SchedulingAgent {
+ protected final FlowEngine flowEngine;
+
+ protected AbstractSchedulingAgent(FlowEngine flowEngine) {
+ this.flowEngine = flowEngine;
+ }
+
+ @Override
+ public <T> T submit(Callable<T> task) throws InterruptedException,
TimeoutException, ExecutionException {
+ Future<T> f = flowEngine.submit(task);
+ String timeoutString =
NiFiProperties.getInstance().getProperty(NiFiProperties.PROCESSOR_SCHEDULING_TIMEOUT);
+ long onScheduleTimeout = timeoutString == null ? 60000
+ : FormatUtils.getTimeDuration(timeoutString.trim(),
TimeUnit.MILLISECONDS);
--- End diff --
I think we should wrap this in a try/catch and catch
IllegalArgumentException, which could get thrown by FormatUtils.getTimeDuration
if the user makes a typo in the nifi.properties file. If we catch it, we should
log a warning, I think, and use the default value of 60,000.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---