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

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

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

    https://github.com/apache/nifi/pull/563#discussion_r72559265
  
    --- Diff: 
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-pubsub-processors/pom.xml ---
    @@ -35,6 +35,10 @@
                 <artifactId>nifi-utils</artifactId>
             </dependency>
             <dependency>
    +            <groupId>org.apache.nifi</groupId>
    +            <artifactId>nifi-expression-language</artifactId>
    --- End diff --
    
    I added EL dependency to use StandardPropertyValue class at 
ConsumeKafka.onPropertyModified.
    
    Since ConsumeKafka allows EL for properties that needed to get state from 
Kafka, EL has to be evaluated at onPropertyModified, too. But to do so, we need 
PropertyValue instance, which is not available at onPropertyModified because it 
only receives String representation of oldValue and newValue. An implementation 
class of PropertyValue is not included in nifi-api. So, I needed to add the EL 
dependency.
    
    However, I felt it's a little bit strange to support EL for things like 
'topic' or 'bootstrap_servers', since ConsumeKafka doesn't take input flow 
files, and these properties can not be changed after ConsumerKafka connects to 
Kafka. It keep using the same kafkaResource instance. So, those property values 
are more static, rather than dynamically evaluated. It makes sense to support 
EL for those values for PublishKafka, though.


> State management for processors whose states are managed externally
> -------------------------------------------------------------------
>
>                 Key: NIFI-2078
>                 URL: https://issues.apache.org/jira/browse/NIFI-2078
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>            Reporter: Koji Kawamura
>            Assignee: Koji Kawamura
>             Fix For: 1.0.0
>
>
> Inherently by the nature of a given processor it may involve state managed by 
> itself (using nifi state management), or can be managed by some external 
> service it interacts with (kafka's offset), and theoretically some might have 
> both going on. With the new state management, we're giving users a way to 
> reset state managed by nifi for a given processor. But it doesnt apply to 
> those processors who have external state.
> we should consider offering a way to reset state that allows a processor to 
> call out to whatever external store it impacts



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to