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

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

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

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r117021448
  
    --- 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 --
    
    The FlowController is an implementation of a controller service provider. 
It will start the controller services and disable them at shutdown to allow for 
cleanup. There's still some questions in my mind if that is adequate (i.e. 
we're using a timer in some spots ), but that is a separate issue and  captured 
in a ticket.


> 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