Search in sources :

Example 6 with ReloadComponent

use of org.apache.nifi.controller.ReloadComponent in project nifi by apache.

the class TestStandardControllerServiceProvider method createProcessor.

private ProcessorNode createProcessor(final StandardProcessScheduler scheduler, final ControllerServiceProvider serviceProvider) {
    final ReloadComponent reloadComponent = Mockito.mock(ReloadComponent.class);
    final LoggableComponent<Processor> dummyProcessor = new LoggableComponent<>(new DummyProcessor(), systemBundle.getBundleDetails().getCoordinate(), null);
    final ProcessorNode procNode = new StandardProcessorNode(dummyProcessor, UUID.randomUUID().toString(), new StandardValidationContextFactory(serviceProvider, null), scheduler, serviceProvider, niFiProperties, new StandardComponentVariableRegistry(VariableRegistry.EMPTY_REGISTRY), reloadComponent);
    final ProcessGroup group = new StandardProcessGroup(UUID.randomUUID().toString(), serviceProvider, scheduler, null, null, Mockito.mock(FlowController.class), new MutableVariableRegistry(variableRegistry));
    group.addProcessor(procNode);
    procNode.setProcessGroup(group);
    return procNode;
}
Also used : Processor(org.apache.nifi.processor.Processor) DummyProcessor(org.apache.nifi.controller.service.mock.DummyProcessor) StandardComponentVariableRegistry(org.apache.nifi.registry.variable.StandardComponentVariableRegistry) StandardProcessGroup(org.apache.nifi.groups.StandardProcessGroup) ReloadComponent(org.apache.nifi.controller.ReloadComponent) StandardValidationContextFactory(org.apache.nifi.processor.StandardValidationContextFactory) LoggableComponent(org.apache.nifi.controller.LoggableComponent) ProcessorNode(org.apache.nifi.controller.ProcessorNode) StandardProcessorNode(org.apache.nifi.controller.StandardProcessorNode) ProcessGroup(org.apache.nifi.groups.ProcessGroup) MockProcessGroup(org.apache.nifi.controller.service.mock.MockProcessGroup) StandardProcessGroup(org.apache.nifi.groups.StandardProcessGroup) MutableVariableRegistry(org.apache.nifi.registry.variable.MutableVariableRegistry) FlowController(org.apache.nifi.controller.FlowController) DummyProcessor(org.apache.nifi.controller.service.mock.DummyProcessor) StandardProcessorNode(org.apache.nifi.controller.StandardProcessorNode)

Aggregations

LoggableComponent (org.apache.nifi.controller.LoggableComponent)6 ProcessorNode (org.apache.nifi.controller.ProcessorNode)6 ReloadComponent (org.apache.nifi.controller.ReloadComponent)6 StandardProcessorNode (org.apache.nifi.controller.StandardProcessorNode)6 StandardValidationContextFactory (org.apache.nifi.processor.StandardValidationContextFactory)6 StandardComponentVariableRegistry (org.apache.nifi.registry.variable.StandardComponentVariableRegistry)6 Processor (org.apache.nifi.processor.Processor)5 FailOnScheduledProcessor (org.apache.nifi.controller.scheduling.processors.FailOnScheduledProcessor)4 AbstractProcessor (org.apache.nifi.processor.AbstractProcessor)4 StandardProcessorInitializationContext (org.apache.nifi.processor.StandardProcessorInitializationContext)4 Test (org.junit.Test)4 HashMap (java.util.HashMap)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 FlowController (org.apache.nifi.controller.FlowController)2 MockProcessGroup (org.apache.nifi.controller.service.mock.MockProcessGroup)2 StateManagerProvider (org.apache.nifi.components.state.StateManagerProvider)1 TerminationAwareLogger (org.apache.nifi.controller.TerminationAwareLogger)1 ValidationContextFactory (org.apache.nifi.controller.ValidationContextFactory)1 StandardReportingInitializationContext (org.apache.nifi.controller.reporting.StandardReportingInitializationContext)1 StandardReportingTaskNode (org.apache.nifi.controller.reporting.StandardReportingTaskNode)1