You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ad...@apache.org on 2021/10/26 09:57:47 UTC

[nifi-minifi-cpp] branch main updated (f999498 -> 6f2f0b5)

This is an automated email from the ASF dual-hosted git repository.

adebreceni pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git.


    from f999498  MINIFICPP-1566 - Annotate maximum allowed threads for processors
     new a024b77  MINIFICPP-1671 Load the extensions earlier
     new 6f2f0b5  MINIFICPP-1670 - Move RESTReceiver to civet extension

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 controller/Controller.h                                       | 3 +++
 docker/test/integration/features/core_functionality.feature   | 7 +++++++
 extensions/civetweb/CMakeLists.txt                            | 2 +-
 extensions/{http-curl => civetweb}/protocols/RESTReceiver.cpp | 0
 extensions/{http-curl => civetweb}/protocols/RESTReceiver.h   | 0
 extensions/http-curl/CMakeLists.txt                           | 1 -
 libminifi/src/core/FlowConfiguration.cpp                      | 5 ++---
 main/MiNiFiMain.cpp                                           | 4 ++--
 8 files changed, 15 insertions(+), 7 deletions(-)
 rename extensions/{http-curl => civetweb}/protocols/RESTReceiver.cpp (100%)
 rename extensions/{http-curl => civetweb}/protocols/RESTReceiver.h (100%)

[nifi-minifi-cpp] 01/02: MINIFICPP-1671 Load the extensions earlier

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adebreceni pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit a024b778f59f78bf9efd2b7e35f73b8320292041
Author: Ferenc Gerlits <fg...@gmail.com>
AuthorDate: Tue Oct 26 11:54:48 2021 +0200

    MINIFICPP-1671 Load the extensions earlier
    
    Signed-off-by: Adam Debreceni <ad...@apache.org>
    
    This closes #1206
---
 controller/Controller.h                                     | 3 +++
 docker/test/integration/features/core_functionality.feature | 7 +++++++
 libminifi/src/core/FlowConfiguration.cpp                    | 5 ++---
 main/MiNiFiMain.cpp                                         | 4 ++--
 4 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/controller/Controller.h b/controller/Controller.h
index 3bb5b85..5d8a39a 100644
--- a/controller/Controller.h
+++ b/controller/Controller.h
@@ -20,6 +20,7 @@
 
 #include "core/RepositoryFactory.h"
 #include "core/ConfigurationFactory.h"
+#include "core/extension/ExtensionManager.h"
 #include "io/ClientSocket.h"
 #include "c2/ControllerSocketProtocol.h"
 #include "utils/gsl.h"
@@ -238,6 +239,8 @@ std::shared_ptr<core::controller::ControllerService> getControllerService(const
   std::string nifi_configuration_class_name = "yamlconfiguration";
   std::string content_repo_class = "filesystemrepository";
 
+  minifi::core::extension::ExtensionManager::get().initialize(configuration);
+
   configuration->get(minifi::Configure::nifi_provenance_repository_class_name, prov_repo_class);
   // Create repos for flow record and provenance
   std::shared_ptr<core::Repository> prov_repo = core::createRepository(prov_repo_class, true, "provenance");
diff --git a/docker/test/integration/features/core_functionality.feature b/docker/test/integration/features/core_functionality.feature
index 0a98d8f..b29a537 100644
--- a/docker/test/integration/features/core_functionality.feature
+++ b/docker/test/integration/features/core_functionality.feature
@@ -22,3 +22,10 @@ Feature: Core flow functionalities
 
     Then at least one flowfile with the content "first_custom_text" is placed in the monitored directory in less than 20 seconds
     And at least one flowfile with the content "second_custom_text" is placed in the monitored directory in less than 20 seconds
+
+
+  Scenario: The default configuration uses RocksDB for both the flow file and content repositories
+    Given a GenerateFlowFile processor with the "Data Format" property set to "Text"
+    When the MiNiFi instance starts up
+    Then the Minifi logs contain the following message: "Using plaintext FlowFileRepository" in less than 5 seconds
+    And the Minifi logs contain the following message: "Using plaintext DatabaseContentRepository" in less than 1 second
diff --git a/libminifi/src/core/FlowConfiguration.cpp b/libminifi/src/core/FlowConfiguration.cpp
index c097f80..d6ebd1b 100644
--- a/libminifi/src/core/FlowConfiguration.cpp
+++ b/libminifi/src/core/FlowConfiguration.cpp
@@ -17,13 +17,14 @@
  */
 
 #include "core/FlowConfiguration.h"
+
 #include <memory>
 #include <vector>
 #include <string>
+
 #include "core/ClassLoader.h"
 #include "utils/StringUtils.h"
 #include "processors/ProcessorUtils.h"
-#include "core/extension/ExtensionManager.h"
 
 namespace org {
 namespace apache {
@@ -60,8 +61,6 @@ FlowConfiguration::FlowConfiguration(
     }
     checksum_calculator_.setFileLocation(*config_path_);
   }
-
-  extension::ExtensionManager::get().initialize(configuration_);
 }
 
 static_initializers &get_static_functions() {
diff --git a/main/MiNiFiMain.cpp b/main/MiNiFiMain.cpp
index 4e1414a..c0228f6 100644
--- a/main/MiNiFiMain.cpp
+++ b/main/MiNiFiMain.cpp
@@ -218,14 +218,14 @@ int main(int argc, char **argv) {
   configure->setHome(minifiHome);
   configure->loadConfigureFile(DEFAULT_NIFI_PROPERTIES_FILE);
 
+  minifi::core::extension::ExtensionManager::get().initialize(configure);
+
   if (argc >= 3 && std::string("docs") == argv[1]) {
     if (utils::file::FileUtils::create_dir(argv[2]) != 0) {
       std::cerr << "Working directory doesn't exist and cannot be created: " << argv[2] << std::endl;
       exit(1);
     }
 
-    minifi::core::extension::ExtensionManager::get().initialize(configure);
-
     std::cerr << "Dumping docs to " << argv[2] << std::endl;
     if (argc == 4) {
       std::string filepath, filename;

[nifi-minifi-cpp] 02/02: MINIFICPP-1670 - Move RESTReceiver to civet extension

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adebreceni pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 6f2f0b5d3ad69b32572bf0a4fa082525e5bc7e3a
Author: Adam Debreceni <ad...@apache.org>
AuthorDate: Tue Oct 26 11:56:27 2021 +0200

    MINIFICPP-1670 - Move RESTReceiver to civet extension
    
    Signed-off-by: Adam Debreceni <ad...@apache.org>
    
    This closes #1204
---
 extensions/civetweb/CMakeLists.txt                            | 2 +-
 extensions/{http-curl => civetweb}/protocols/RESTReceiver.cpp | 0
 extensions/{http-curl => civetweb}/protocols/RESTReceiver.h   | 0
 extensions/http-curl/CMakeLists.txt                           | 1 -
 4 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/extensions/civetweb/CMakeLists.txt b/extensions/civetweb/CMakeLists.txt
index c5a2dca..873297b 100644
--- a/extensions/civetweb/CMakeLists.txt
+++ b/extensions/civetweb/CMakeLists.txt
@@ -24,7 +24,7 @@ include_directories(${CMAKE_SOURCE_DIR}/libminifi/include
                     ${CMAKE_SOURCE_DIR}/thirdparty/
                     ./include)
 
-file(GLOB SOURCES  "processors/*.cpp")
+file(GLOB SOURCES  "processors/*.cpp" "protocols/*.cpp")
 
 add_library(minifi-civet-extensions SHARED ${SOURCES})
 target_link_libraries(minifi-civet-extensions ${LIBMINIFI} Threads::Threads)
diff --git a/extensions/http-curl/protocols/RESTReceiver.cpp b/extensions/civetweb/protocols/RESTReceiver.cpp
similarity index 100%
rename from extensions/http-curl/protocols/RESTReceiver.cpp
rename to extensions/civetweb/protocols/RESTReceiver.cpp
diff --git a/extensions/http-curl/protocols/RESTReceiver.h b/extensions/civetweb/protocols/RESTReceiver.h
similarity index 100%
rename from extensions/http-curl/protocols/RESTReceiver.h
rename to extensions/civetweb/protocols/RESTReceiver.h
diff --git a/extensions/http-curl/CMakeLists.txt b/extensions/http-curl/CMakeLists.txt
index ec1cf83..faae933 100644
--- a/extensions/http-curl/CMakeLists.txt
+++ b/extensions/http-curl/CMakeLists.txt
@@ -26,7 +26,6 @@ add_library(minifi-http-curl SHARED ${SOURCES})
 
 target_link_libraries(minifi-http-curl ${LIBMINIFI} Threads::Threads)
 target_link_libraries(minifi-http-curl CURL::libcurl RapidJSON)
-target_link_libraries(minifi-http-curl minifi-civet-extensions)
 
 SET (HTTP-CURL minifi-http-curl PARENT_SCOPE)
 register_extension(minifi-http-curl)