[
https://issues.apache.org/jira/browse/MINIFI-226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16013399#comment-16013399
]
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_r116894602
--- 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 --
I realize this occurs in Java land but was wondering about its
applicability to MiNiFi in general. Understand the need to handle the enabling
process as there can be dependencies that require a certain sequence to occur,
especially in the event that CS A depends on CS B. Perhaps less for this PR
but just a thought in general, should we tie the unscheduling/disabling of
services into agent shutdown to allow appropriate cleanup without the process
exiting abruptly?
> 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)