[ 
https://issues.apache.org/jira/browse/NIFI-3380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15928639#comment-15928639
 ] 

ASF GitHub Bot commented on NIFI-3380:
--------------------------------------

Github user markap14 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1585#discussion_r106502862
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
 ---
    @@ -857,7 +858,13 @@ public Relationship getRelationship(final String 
relationshipName) {
     
         @Override
         public Processor getProcessor() {
    -        return this.processor;
    +        return processorRef.get().getProcessor();
    +    }
    +
    +    @Override
    +    public void setProcessor(final LoggableComponent<Processor> processor) 
{
    +        final ProcessorDetails processorDetails = new 
ProcessorDetails(processor);
    --- End diff --
    
    We should probably have some thread protection here to make sure that the 
Processor is indeed stopped. This would mean that we need to enter a 
synchronized block here, then verify that the processor is not running 
(!isRunning()) and then do the processorRef.set(processorDetails). We would 
also need to ensure that in the start() method that the act of changing the 
scheduledState from STOPPED to STARTED is also synchronized to ensure atomicity.


> Multiple Versions of the Same Component
> ---------------------------------------
>
>                 Key: NIFI-3380
>                 URL: https://issues.apache.org/jira/browse/NIFI-3380
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>             Fix For: 1.2.0
>
>         Attachments: nifi-example-processors-nar-1.0.nar, 
> nifi-example-processors-nar-2.0.nar, nifi-example-service-api-nar-1.0.nar, 
> nifi-example-service-api-nar-2.0.nar, nifi-example-service-nar-1.0.nar, 
> nifi-example-service-nar-1.1.nar, nifi-example-service-nar-2.0.nar
>
>
> This ticket is to track the work for supporting multiple versions of the same 
> component within NiFi. The overall design for this feature is described in 
> detail at the following wiki page:
> https://cwiki.apache.org/confluence/display/NIFI/Multiple+Versions+of+the+Same+Extension
> This ticket will track only the core NiFi work, and a separate ticket will be 
> created to track enhancements for the NAR Maven Plugin.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to