@Override public CorePropertiesSchema convert() { Map<String, Object> result = mapSupplier.get(); result.put(CorePropertiesSchema.FLOW_CONTROLLER_SHUTDOWN_PERIOD_KEY, flowControllerGracefulShutdownPeriod); result.put(CorePropertiesSchema.FLOW_SERVICE_WRITE_DELAY_INTERVAL_KEY, flowServiceWriteDelayInterval); result.put(CorePropertiesSchema.ADMINISTRATIVE_YIELD_DURATION_KEY, administrativeYieldDuration); result.put(CorePropertiesSchema.BORED_YIELD_DURATION_KEY, boredYieldDuration); result.put(MAX_CONCURRENT_THREADS_KEY, maxConcurrentThreads); return new CorePropertiesSchema(result); }
public CorePropertiesSchema(Map map) { flowControllerGracefulShutdownPeriod = getOptionalKeyAsType(map, FLOW_CONTROLLER_SHUTDOWN_PERIOD_KEY, String.class, CORE_PROPS_KEY, DEFAULT_FLOW_CONTROLLER_GRACEFUL_SHUTDOWN_PERIOD); flowServiceWriteDelayInterval = getOptionalKeyAsType(map, FLOW_SERVICE_WRITE_DELAY_INTERVAL_KEY, String.class, CORE_PROPS_KEY, DEFAULT_FLOW_SERVICE_WRITE_DELAY_INTERVAL); administrativeYieldDuration = getOptionalKeyAsType(map, ADMINISTRATIVE_YIELD_DURATION_KEY, String.class, CORE_PROPS_KEY, DEFAULT_ADMINISTRATIVE_YIELD_DURATION); boredYieldDuration = getOptionalKeyAsType(map, BORED_YIELD_DURATION_KEY, String.class, CORE_PROPS_KEY, DEFAULT_BORED_YIELD_DURATION); maxConcurrentThreads = getOptionalKeyAsType(map, MAX_CONCURRENT_THREADS_KEY, Number.class, CORE_PROPS_KEY, DEFAULT_MAX_CONCURRENT_THREADS); variableRegistryProperties = getOptionalKeyAsType(map, VARIABLE_REGISTRY_PROPERTIES_KEY, String.class, CORE_PROPS_KEY, DEFAULT_VARIABLE_REGISTRY_PROPERTIES); }
orderedProperties.setProperty("nifi.flow.configuration.archive.dir", "./conf/archive/"); orderedProperties.setProperty("nifi.flowcontroller.autoResumeState", "true"); orderedProperties.setProperty("nifi.flowcontroller.graceful.shutdown.period", coreProperties.getFlowControllerGracefulShutdownPeriod()); orderedProperties.setProperty("nifi.flowservice.writedelay.interval", coreProperties.getFlowServiceWriteDelayInterval()); orderedProperties.setProperty("nifi.administrative.yield.duration", coreProperties.getAdministrativeYieldDuration()); orderedProperties.setProperty("nifi.variable.registry.properties", coreProperties.getVariableRegistryProperties()); orderedProperties.setProperty("nifi.bored.yield.duration", coreProperties.getBoredYieldDuration(), "# If a component has no work to do (is \"bored\"), how long should we wait before checking again for work?");
doc.appendChild(rootNode); CorePropertiesSchema coreProperties = configSchema.getCoreProperties(); addTextElement(rootNode, "maxTimerDrivenThreadCount", String.valueOf(coreProperties.getMaxConcurrentThreads())); addTextElement(rootNode, "maxEventDrivenThreadCount", String.valueOf(coreProperties.getMaxConcurrentThreads()));