You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by phrocker <gi...@git.apache.org> on 2017/04/26 02:15:34 UTC

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

GitHub user phrocker opened a pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83

    MINIFI-226: Add controller services capabilities along with unit tests

    MINIFI-253 : Add basic Process Loader capability
    
    Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced
         in the commit message?
    
    - [ ] Does your PR title start with MINIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
    - [ ] If applicable, have you updated the LICENSE file?
    - [ ] If applicable, have you updated the NOTICE file?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/phrocker/nifi-minifi-cpp MINIFI-226

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi-minifi-cpp/pull/83.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #83
    
----
commit 0e41308dbb8f9aa603ea8dac5ee0125903493cb5
Author: Marc Parisi <ph...@apache.org>
Date:   2017-04-01T12:20:42Z

    MINIFI-226: Add controller services capabilities along with unit tests
    
    MINIFI-253 : Add basic Process Loader capability

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp issue #83: MINIFI-226: Add controller services capabilities ...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/83
  
    @phrocker Thanks for all the updates.  Build, docs, tests and license stuff looks good to go.  Did some testing of flows and verified associated functionality.  Will get this merged.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116892947
  
    --- Diff: libminifi/test/resources/cn.ckey.pem ---
    @@ -0,0 +1,31 @@
    +Bag Attributes
    --- End diff --
    
    Was this something you generated?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by phrocker <gi...@git.apache.org>.
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968835
  
    --- Diff: libminifi/include/processors/ListenHTTP.h ---
    @@ -115,6 +114,9 @@ class ListenHTTP : public core::Processor {
       std::unique_ptr<Handler> _handler;
     };
     
    +
    +REGISTER_RESOURCE(ListenHTTP);
    --- End diff --
    
    yes I thought about this morning that the readme needs some love. I'll do that. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968270
  
    --- Diff: libminifi/test/resources/cn.crt.pem ---
    @@ -0,0 +1,25 @@
    +Bag Attributes
    --- End diff --
    
    yes


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116893614
  
    --- Diff: libminifi/test/Test.cpp ---
    @@ -1,6 +1,4 @@
     /**
    - * @file MiNiFiMain.cpp 
    --- End diff --
    
    Should this file just be nixed?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp issue #83: MINIFI-226: Add controller services capabilities ...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/83
  
    reviewing


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116895225
  
    --- Diff: libminifi/include/processors/TailFile.h ---
    @@ -73,8 +74,7 @@ class TailFile : public core::Processor {
       std::string _stateFile;
       // State related to the tailed file
       std::string _currentTailFileName;
    -  uint64_t _currentTailFilePosition;
    -  bool _stateRecovered;
    +  uint64_t _currentTailFilePosition;bool _stateRecovered;
    --- End diff --
    
    minor and nitpicky, but could we split these to separate lines


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116892700
  
    --- Diff: libminifi/test/unit/ClassLoaderTests.cpp ---
    @@ -0,0 +1,48 @@
    +/**
    + *
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +#include "../../include/core/ClassLoader.h"
    +#include "../TestBase.h"
    +#include "io/ClientSocket.h"
    +#include "core/Processor.h"
    +#include "core/ClassLoader.h"
    +#include "processors/AppendHostInfo.h"
    +#include "core/logging/LogAppenders.h"
    +
    +using namespace org::apache::nifi::minifi::io;
    +TEST_CASE("TestLoader", "[TestLoader]") {
    +  
    +REQUIRE ( nullptr != core::ClassLoader::getDefaultClassLoader().instantiate("AppendHostInfo","hosty"));
    +REQUIRE ( nullptr != core::ClassLoader::getDefaultClassLoader().instantiate("ListenHTTP","hosty2"));
    +REQUIRE ( nullptr == core::ClassLoader::getDefaultClassLoader().instantiate("Don'tExist","hosty3"));
    +REQUIRE ( nullptr == core::ClassLoader::getDefaultClassLoader().instantiate("","EmptyEmpty"));
    +/*
    --- End diff --
    
    can we remove this block of commented out stuff?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116894473
  
    --- Diff: libminifi/src/core/ClassLoader.cpp ---
    @@ -0,0 +1,70 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +#include "core/ClassLoader.h"
    +#include <sys/mman.h>
    +#include <memory>
    +#include <string>
    +
    +namespace org {
    +namespace apache {
    +namespace nifi {
    +namespace minifi {
    +namespace core {
    +
    +ClassLoader &ClassLoader::getDefaultClassLoader() {
    --- End diff --
    
    Awesomeness


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968301
  
    --- Diff: libminifi/test/unit/ClassLoaderTests.cpp ---
    @@ -0,0 +1,48 @@
    +/**
    + *
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +#include "../../include/core/ClassLoader.h"
    +#include "../TestBase.h"
    +#include "io/ClientSocket.h"
    +#include "core/Processor.h"
    +#include "core/ClassLoader.h"
    +#include "processors/AppendHostInfo.h"
    +#include "core/logging/LogAppenders.h"
    +
    +using namespace org::apache::nifi::minifi::io;
    +TEST_CASE("TestLoader", "[TestLoader]") {
    +  
    +REQUIRE ( nullptr != core::ClassLoader::getDefaultClassLoader().instantiate("AppendHostInfo","hosty"));
    +REQUIRE ( nullptr != core::ClassLoader::getDefaultClassLoader().instantiate("ListenHTTP","hosty2"));
    +REQUIRE ( nullptr == core::ClassLoader::getDefaultClassLoader().instantiate("Don'tExist","hosty3"));
    +REQUIRE ( nullptr == core::ClassLoader::getDefaultClassLoader().instantiate("","EmptyEmpty"));
    +/*
    --- End diff --
    
    doh!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116892423
  
    --- Diff: libminifi/test/unit/MockClasses.h ---
    @@ -0,0 +1,139 @@
    +/**
    + *
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +#ifndef LIBMINIFI_TEST_UNIT_MOCKCLASSES_H_
    +#define LIBMINIFI_TEST_UNIT_MOCKCLASSES_H_
    +
    +#include "core/controller/ControllerService.h"
    +#include "core/Processor.h"
    +#include "core/ProcessContext.h"
    +#include "core/ProcessSession.h"
    +
    +std::atomic<bool> disabled;
    +
    +class MockControllerService : public core::controller::ControllerService {
    + public:
    +  explicit MockControllerService(const std::string &name, const std::string &id)
    +      : ControllerService(name, id) {
    +
    +  }
    +
    +  explicit MockControllerService(const std::string &name, uuid_t uuid)
    +      : ControllerService(name, uuid) {
    +
    +  }
    +
    +  explicit MockControllerService(const std::string &name)
    +      : ControllerService(name, 0) {
    +
    +  }
    +  MockControllerService() {
    +
    +  }
    +
    +  ~MockControllerService() {
    +
    +  }
    +
    +  virtual void initialize() {
    +    core::controller::ControllerService::initialize();
    +    enable();
    +  }
    +
    +  std::string doSomething() {
    +    return str;
    +  }
    +
    +  virtual void enable() {
    +    str = "pushitrealgood";
    --- End diff --
    
    Glad Salt-N-Pepa made themselves present.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116982739
  
    --- Diff: libminifi/test/resources/cn.ckey.pem ---
    @@ -0,0 +1,31 @@
    +Bag Attributes
    --- End diff --
    
    Might not be a bad idea, but not necessary.  At some point we can look into getting the Apache RAT running against our source and list as exclusions.  Actually, perhaps even just enumerating such resources on the wiki until we get a more formal check in place would be sufficient.  I had started the following https://cwiki.apache.org/confluence/display/MINIFI/Licensing+Information (and clearly forgot about updating it) a little while ago.  Maybe we can just highlight such files here after merge?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968718
  
    --- Diff: libminifi/test/resources/cn.ckey.pem ---
    @@ -0,0 +1,31 @@
    +Bag Attributes
    --- End diff --
    
    yes. i just used the toolkit to generate them. Should I provide that info somewhere in the readme?
    Owner: CN=test, OU=NIFI
    Issuer: CN=localhost, OU=NIFI
    Serial number: 15a6753696100000000
    Valid from: Wed Feb 22 14:36:44 EST 2017 until: Sat Feb 22 14:36:44 EST 2020


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116892776
  
    --- Diff: libminifi/test/resources/nifi-cert.pem ---
    @@ -0,0 +1,20 @@
    +-----BEGIN CERTIFICATE-----
    --- End diff --
    
    Was this something you generated?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp issue #83: MINIFI-226: Add controller services capabilities ...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/83
  
    Realized SSLContextService didn't have the updated commit. Will add that


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116895119
  
    --- Diff: libminifi/include/processors/TailFile.h ---
    @@ -89,6 +89,8 @@ class TailFile : public core::Processor {
     
     };
     
    +REGISTER_RESOURCE (TailFile);
    --- End diff --
    
    Awesome


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r117070877
  
    --- Diff: libminifi/test/resources/cn.ckey.pem ---
    @@ -0,0 +1,31 @@
    +Bag Attributes
    --- End diff --
    
    Added a reference to that wiki entry in the ReadMe. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi-minifi-cpp/pull/83


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116893221
  
    --- Diff: libminifi/test/resources/TestControllerServices.yml ---
    @@ -0,0 +1,62 @@
    +Flow Controller:
    --- End diff --
    
    Can't leave comments on binary items so I am annotating on the nearest neighbor.  Noticed that libminifi/test/libminifi.a seems to have crept its way into the commit.  Could we update .gitignore to cover the new structure as well?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968249
  
    --- Diff: libminifi/test/resources/TestControllerServices.yml ---
    @@ -0,0 +1,62 @@
    +Flow Controller:
    --- End diff --
    
    Yah. that was a last minute copy when I rebased. I'll get rid of that and add a .gitignore. thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116895271
  
    --- Diff: libminifi/include/processors/ListenHTTP.h ---
    @@ -115,6 +114,9 @@ class ListenHTTP : public core::Processor {
       std::unique_ptr<Handler> _handler;
     };
     
    +
    +REGISTER_RESOURCE(ListenHTTP);
    --- End diff --
    
    While I am thinking of it, need to capture some of these details in docs for people that would like to contribute and give some indication of how the classloader functions.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116968276
  
    --- Diff: libminifi/test/resources/nifi-cert.pem ---
    @@ -0,0 +1,20 @@
    +-----BEGIN CERTIFICATE-----
    --- End diff --
    
    yes


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116892828
  
    --- Diff: libminifi/test/resources/cn.crt.pem ---
    @@ -0,0 +1,25 @@
    +Bag Attributes
    --- End diff --
    
    Was this something you generated?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116895039
  
    --- Diff: libminifi/include/utils/StringUtils.h ---
    @@ -18,6 +18,7 @@
     #define LIBMINIFI_INCLUDE_IO_STRINGUTILS_H_
     
     #include <algorithm>
    +#include <memory>
    --- End diff --
    
    unused?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #83: MINIFI-226: Add controller services capabi...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r116983866
  
    --- Diff: libminifi/test/Test.cpp ---
    @@ -1,6 +1,4 @@
     /**
    - * @file MiNiFiMain.cpp 
    --- End diff --
    
    Ah yeah this one is per another PR I have. I'll remove it here since the other PR would need to be rebased, anyway. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---