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

ASF GitHub Bot commented on MINIFI-171:
---------------------------------------

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

    https://github.com/apache/nifi-minifi-cpp/pull/37#discussion_r98902210
  
    --- Diff: libminifi/src/Processor.cpp ---
    @@ -206,6 +207,29 @@ bool Processor::getProperty(std::string name, 
std::string &value)
        }
     }
     
    +bool Processor::getDynamicProperty(std::string name, std::string &value)
    +{
    +   if (isRunning())
    +           // Because set property only allowed in non running state, we 
need to obtain lock avoid rack condition
    +           _mtx.lock();
    --- End diff --
    
    Hi, any particular reason you did not use a lock guard ? 
http://en.cppreference.com/w/cpp/thread/lock_guard 
    It's scoped on the stack pop so you don't need to unlock. 


> Dynamic Properties support for processors
> -----------------------------------------
>
>                 Key: MINIFI-171
>                 URL: https://issues.apache.org/jira/browse/MINIFI-171
>             Project: Apache NiFi MiNiFi
>          Issue Type: Improvement
>          Components: C++
>    Affects Versions: cpp-0.1.0
>            Reporter: Jeremy Dyer
>            Assignee: Jeremy Dyer
>             Fix For: cpp-0.2.0
>
>
> Currently any Property read from the config.yml file that is not explicitly 
> defined in the processor's implementation will be ignored by Processor.cpp 
> when reading the configurations. This prevents any dynamic property from 
> being defined in the config.yml and passed to the processor at runtime. 
> Certain processors rely heavily on the concept of dynamic properties that are 
> passed to them at runtime to handle things like setting dynamic properties 
> based on properties that are declared. All of these possibilities cannot be 
> handled upfront so there should be a mechanism, most likely in Processor.cpp, 
> that allows for a list of dynamicProperties that are parsed form the 
> config.yml file to be stored and accessed by the underlying processor 
> implementation at runtime and use them as the processor desires.



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

Reply via email to