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

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

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

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r117022477
  
    --- Diff: libminifi/src/SchedulingAgent.cpp ---
    @@ -39,6 +40,36 @@ bool 
SchedulingAgent::hasWorkToDo(std::shared_ptr<core::Processor> processor) {
         return false;
     }
     
    +void SchedulingAgent::enableControllerService(
    +    std::shared_ptr<core::controller::ControllerServiceNode> &serviceNode) 
{
    +
    +  logger_->log_trace("Enabling CSN in SchedulingAgent %s",
    +                     serviceNode->getName());
    +  // reference the enable function from serviceNode
    +  std::function<bool()> f_ex = [serviceNode] {
    +    return serviceNode->enable();
    +  };
    +  // create a functor that will be submitted to the thread pool.
    +  utils::Worker<bool> functor(f_ex);
    +  // move the functor into the thread pool. While a future is returned
    +  // we aren't terribly concerned with the result.
    +  component_lifecycle_thread_pool_.execute(std::move(functor));
    +}
    +
    +void SchedulingAgent::disableControllerService(
    --- End diff --
    
    Cool, sounds good.  Probably viewed this PR too much in isolation from the 
rest of the codebase and started thinking about if the agent would ever 
shutdown was there a need for the disable sequence.  This lead to me wondering 
if we could tie it to the shutdown process to allow resources to be freed, 
meanwhile, all of this was already done.  Anyway, all good here, just wanted to 
share my mental journey for some (hopeful) clarification.


> Provide support for controller services
> ---------------------------------------
>
>                 Key: MINIFI-226
>                 URL: https://issues.apache.org/jira/browse/MINIFI-226
>             Project: Apache NiFi MiNiFi
>          Issue Type: New Feature
>          Components: C++, Core Framework
>            Reporter: Aldrin Piri
>            Assignee: marco polo
>
> To facilitate feature parity in the C++ implementation, we should also 
> provided Controller Services to the framework and associated configuration as 
> provided by MINIFI-154 for Java.



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

Reply via email to