Java Code Examples for org.apache.nifi.processor.Processor#getIdentifier()
The following examples show how to use
org.apache.nifi.processor.Processor#getIdentifier() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MockProcessSession.java From nifi with Apache License 2.0 | 5 votes |
public MockProcessSession(final SharedSessionState sharedState, final Processor processor, final boolean enforceStreamsClosed) { this.processor = processor; this.enforceStreamsClosed = enforceStreamsClosed; this.sharedState = sharedState; this.processorQueue = sharedState.getFlowFileQueue(); provenanceReporter = new MockProvenanceReporter(this, sharedState, processor.getIdentifier(), processor.getClass().getSimpleName()); }
Example 2
Source File: StatelessProcessSession.java From nifi with Apache License 2.0 | 5 votes |
public StatelessProcessSession(final Queue<StatelessFlowFile> input, final Collection<ProvenanceEventRecord> events, final Processor processor, final Set<Relationship> outputRelationships, final boolean materializeContent, final Runnable nextStep) { this.processor = processor; this.inputQueue = input; this.provenanceReporter = new ProvenanceCollector(this, events, processor.getIdentifier(), processor.getClass().getSimpleName()); this.materializeContent = materializeContent; this.nextStep = nextStep; outputRelationships.forEach(r -> outputMap.put(r, new LinkedList<>())); }
Example 3
Source File: StatelessProcessorWrapper.java From nifi with Apache License 2.0 | 5 votes |
public StatelessProcessorWrapper(final String id, final Processor processor, final StatelessProcessorWrapper parent, final StatelessControllerServiceLookup lookup, final VariableRegistry registry, final boolean materializeContent, final ClassLoader classLoader, final ParameterContext parameterContext) throws InvocationTargetException, IllegalAccessException { this.processor = processor; this.classLoader = classLoader; addParent(parent); this.lookup = lookup; this.materializeContent = materializeContent; this.provenanceEvents = new ArrayList<>(); this.createdSessions = new CopyOnWriteArraySet<>(); this.inputQueue = new LinkedList<>(); this.variableRegistry = registry; this.context = new StatelessProcessContext(processor, lookup, processor.getIdentifier(), new StatelessStateManager(), variableRegistry, parameterContext); this.context.setMaxConcurrentTasks(1); final StatelessProcessorInitializationContext initContext = new StatelessProcessorInitializationContext(id, processor, context); logger = initContext.getLogger(); try (final CloseableNarLoader c = withNarClassLoader()) { processor.initialize(initContext); ReflectionUtils.invokeMethodsWithAnnotation(OnAdded.class, processor); ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnConfigurationRestored.class, processor); } }
Example 4
Source File: MockProcessSession.java From localization_nifi with Apache License 2.0 | 4 votes |
public MockProcessSession(final SharedSessionState sharedState, final Processor processor) { this.processor = processor; this.sharedState = sharedState; this.processorQueue = sharedState.getFlowFileQueue(); provenanceReporter = new MockProvenanceReporter(this, sharedState, processor.getIdentifier(), processor.getClass().getSimpleName()); }