Skip to content

Commit d2f1aed

Browse files
committed
Review update
1 parent ef95765 commit d2f1aed

File tree

8 files changed

+23
-153
lines changed

8 files changed

+23
-153
lines changed

CONTROLLERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ In the list below, the names of required properties appear in bold. Any other pr
8484

8585
| Name | Default Value | Allowable Values | Description |
8686
|-----------------------|---------------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
87-
| **Connection String** | | | The hostnames or ip addresses of the bootstraping nodes and optional parameters. Syntax) couchbase://node1,node2,nodeN?param1=value1&param2=value2&paramN=valueN |
87+
| **Connection String** | | | The hostnames or ip addresses of the bootstraping nodes and optional parameters. Syntax: couchbase://node1,node2,nodeN?param1=value1&param2=value2&paramN=valueN |
8888
| User Name | | | The user name to authenticate MiNiFi as a Couchbase client. |
8989
| User Password | | | The user password to authenticate MiNiFi as a Couchbase client.<br/>**Sensitive Property: true** |
9090

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ This product bundles 'Kubernetes Client Library for C' (kubernetes-client/c), wh
214214
This project bundles a configuration file from 'Kubernetes Metrics Server' (kubernetes-sigs/metrics-server), which is available under an ALv2 license
215215
This project bundles 'OpenSSL' which is available under an ALv2 license
216216
This project bundles 'gRPC' which is available under an ALv2 license
217-
This project bundles 'couchbase-cxx-clien' which is available under an ALv2 license
217+
This project bundles 'couchbase-cxx-client' which is available under an ALv2 license
218218

219219
The Apache NiFi - MiNiFi C++ project contains subcomponents with separate copyright
220220
notices and license terms. Your use of the source code for the these

extensions/couchbase/controllerservices/CouchbaseClusterService.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace org::apache::nifi::minifi::couchbase {
2727

2828
namespace {
2929

30-
constexpr std::array<::couchbase::errc::common, 9> temporary_connection_errors = {
30+
constexpr auto temporary_connection_errors = std::to_array<::couchbase::errc::common>({
3131
::couchbase::errc::common::temporary_failure,
3232
::couchbase::errc::common::request_canceled,
3333
::couchbase::errc::common::internal_server_failure,
@@ -36,7 +36,7 @@ constexpr std::array<::couchbase::errc::common, 9> temporary_connection_errors =
3636
::couchbase::errc::common::unambiguous_timeout,
3737
::couchbase::errc::common::rate_limited,
3838
::couchbase::errc::common::quota_limited
39-
};
39+
});
4040

4141
CouchbaseErrorType getErrorType(const std::error_code& error_code) {
4242
for (const auto& temporary_error : temporary_connection_errors) {
@@ -104,6 +104,7 @@ void CouchbaseClient::close() {
104104
if (cluster_) {
105105
cluster_->close().wait();
106106
}
107+
cluster_ = std::nullopt;
107108
}
108109

109110
nonstd::expected<void, CouchbaseErrorType> CouchbaseClient::establishConnection() {

extensions/couchbase/controllerservices/CouchbaseClusterService.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class CouchbaseClusterService : public core::controller::ControllerService {
104104
EXTENSIONAPI static constexpr const char* Description = "Provides a centralized Couchbase connection and bucket passwords management. Bucket passwords can be specified via dynamic properties.";
105105

106106
EXTENSIONAPI static constexpr auto ConnectionString = core::PropertyDefinitionBuilder<>::createProperty("Connection String")
107-
.withDescription("The hostnames or ip addresses of the bootstraping nodes and optional parameters. Syntax) couchbase://node1,node2,nodeN?param1=value1&param2=value2&paramN=valueN")
107+
.withDescription("The hostnames or ip addresses of the bootstraping nodes and optional parameters. Syntax: couchbase://node1,node2,nodeN?param1=value1&param2=value2&paramN=valueN")
108108
.isRequired(true)
109109
.build();
110110
EXTENSIONAPI static constexpr auto UserName = core::PropertyDefinitionBuilder<>::createProperty("User Name")

extensions/couchbase/processors/PutCouchbaseKey.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class PutCouchbaseKey final : public core::AbstractProcessor<PutCouchbaseKey> {
9393
.withDescription("Collection to use inside the bucket scope. If not specified, the _default collection is used.")
9494
.supportsExpressionLanguage(true)
9595
.build();
96-
EXTENSIONAPI static constexpr auto DocumentType = core::PropertyDefinitionBuilder<3>::createProperty("Document Type")
96+
EXTENSIONAPI static constexpr auto DocumentType = core::PropertyDefinitionBuilder<magic_enum::enum_count<CouchbaseValueType>()>::createProperty("Document Type")
9797
.withDescription("Content type to store data as.")
9898
.isRequired(true)
9999
.withDefaultValue(magic_enum::enum_name(CouchbaseValueType::Json))

libminifi/include/Exception.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,11 @@ enum ExceptionType {
4343
REGEX_EXCEPTION,
4444
REPOSITORY_EXCEPTION,
4545
PARAMETER_EXCEPTION,
46-
CONTROLLER_ENABLE_EXCEPTION,
4746
MAX_EXCEPTION
4847
};
4948

5049
static const char *ExceptionStr[MAX_EXCEPTION] = { "File Operation", "Flow File Operation", "Processor Operation", "Process Session Operation", "Process Schedule Operation", "Site2Site Protocol",
51-
"General Operation", "Regex Operation", "Repository Operation", "Parameter Operation", "Controller Enable Operation" };
50+
"General Operation", "Regex Operation", "Repository Operation", "Parameter Operation" };
5251

5352
inline const char *ExceptionTypeToString(ExceptionType type) {
5453
if (type < MAX_EXCEPTION)
Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,18 @@
1-
fmt library 11.0.2 requires the implementation of the append function aside
2-
from push_back method when formatting the bustache specific container
3-
41
diff --git a/include/bustache/model.hpp b/include/bustache/model.hpp
5-
index 575969a..6df2cff 100644
2+
index 575969a..07bc89d 100644
63
--- a/include/bustache/model.hpp
74
+++ b/include/bustache/model.hpp
8-
@@ -8,7 +8,7 @@
9-
#define BUSTACHE_MODEL_HPP_INCLUDED
10-
11-
#include <bustache/format.hpp>
12-
-#include <version>
13-
+#include <version>
14-
#include <vector>
15-
#include <cstring>
16-
#include <concepts>
17-
@@ -330,6 +330,16 @@ namespace bustache::detail
5+
@@ -330,6 +330,13 @@ namespace bustache::detail
186
buf[count++] = c;
197
}
208

21-
+ template <typename U>
22-
+ void append(const U* begin, const U* end)
9+
+ void append(const char* const begin, const char* const end)
2310
+ {
24-
+ size_t content_count = end - begin;
25-
+ for (size_t i = 0; i < content_count; ++i) {
26-
+ push_back(begin[i]);
11+
+ for (const char* it = begin; it != end; ++it) {
12+
+ push_back(*it);
2713
+ }
28-
+ begin += content_count;
2914
+ }
3015
+
3116
void flush() { os(buf, count); }
3217

3318
std::size_t count = 0;
34-
@@ -592,7 +602,7 @@ namespace bustache
35-
{
36-
static constexpr model kind = model::atom;
37-
};
38-
-
39-
+
40-
template<String T>
41-
struct impl_test<T>
42-
{
Lines changed: 10 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/cmake/ThirdPartyDependencies.cmake b/cmake/ThirdPartyDependencies.cmake
2-
index f02af02..1a51f82 100644
2+
index f02af02..f83c181 100644
33
--- a/cmake/ThirdPartyDependencies.cmake
44
+++ b/cmake/ThirdPartyDependencies.cmake
5-
@@ -15,48 +15,48 @@ function(declare_system_library target)
5+
@@ -15,49 +15,6 @@ function(declare_system_library target)
66
$<TARGET_PROPERTY:${target},INTERFACE_INCLUDE_DIRECTORIES>)
77
endfunction()
88

@@ -48,55 +48,15 @@ index f02af02..1a51f82 100644
4848
- "SPDLOG_BUILD_SHARED OFF"
4949
- "SPDLOG_FMT_EXTERNAL ON")
5050
-endif()
51-
+# if(NOT TARGET fmt::fmt)
52-
+# # https://github.com/fmtlib/fmt/releases
53-
+# cpmaddpackage(
54-
+# NAME
55-
+# fmt
56-
+# GIT_TAG
57-
+# 11.0.1
58-
+# VERSION
59-
+# 11.0.1
60-
+# GITHUB_REPOSITORY
61-
+# "fmtlib/fmt"
62-
+# EXCLUDE_FROM_ALL ON
63-
+# OPTIONS
64-
+# "FMT_INSTALL OFF"
65-
+# # Unicode support for MSVC enabled in CompilerWarnings.cmake
66-
+# "FMT_UNICODE OFF"
67-
+# "FMT_DOC OFF"
68-
+# "BUILD_SHARED_LIBS OFF"
69-
+# "CMAKE_C_VISIBILITY_PRESET hidden"
70-
+# "CMAKE_CXX_VISIBILITY_PRESET hidden"
71-
+# "CMAKE_POSITION_INDEPENDENT_CODE ON")
72-
+# endif()
73-
+
74-
+# if(NOT TARGET spdlog::spdlog)
75-
+# # https://github.com/gabime/spdlog/releases
76-
+# cpmaddpackage(
77-
+# NAME
78-
+# spdlog
79-
+# VERSION
80-
+# 1.14.1
81-
+# GITHUB_REPOSITORY
82-
+# "gabime/spdlog"
83-
+# EXCLUDE_FROM_ALL ON
84-
+# OPTIONS
85-
+# "SPDLOG_INSTALL OFF"
86-
+# "BUILD_SHARED_LIBS OFF"
87-
+# "CMAKE_C_VISIBILITY_PRESET hidden"
88-
+# "CMAKE_CXX_VISIBILITY_PRESET hidden"
89-
+# "CMAKE_POSITION_INDEPENDENT_CODE ON"
90-
+# "SPDLOG_BUILD_SHARED OFF"
91-
+# "SPDLOG_FMT_EXTERNAL ON")
92-
+# endif()
93-
51+
-
9452
if(NOT TARGET Microsoft.GSL::GSL)
9553
# https://github.com/microsoft/GSL/releases
96-
@@ -172,70 +172,70 @@ if(NOT TARGET taocpp::json)
54+
cpmaddpackage(
55+
@@ -171,72 +128,6 @@ if(NOT TARGET taocpp::json)
56+
"TAOCPP_JSON_BUILD_EXAMPLES OFF")
9757
endif()
9858

99-
59+
-
10060
-if(NOT TARGET asio::asio)
10161
- # https://github.com/chriskohlhoff/asio/tags
10262
- cpmaddpackage(
@@ -161,81 +121,15 @@ index f02af02..1a51f82 100644
161121
-
162122
- add_library(asio::asio ALIAS asio)
163123
-endif()
164-
+# if(NOT TARGET asio::asio)
165-
+# # https://github.com/chriskohlhoff/asio/tags
166-
+# cpmaddpackage(
167-
+# NAME
168-
+# asio
169-
+# GIT_TAG
170-
+# asio-1-31-0
171-
+# VERSION
172-
+# 1.31.0
173-
+# GITHUB_REPOSITORY
174-
+# "chriskohlhoff/asio"
175-
+# EXCLUDE_FROM_ALL ON)
176-
+# endif()
177-
+
178-
+# # ASIO doesn't use CMake, we have to configure it manually. Extra notes for using on Windows:
179-
+# #
180-
+# # 1) If _WIN32_WINNT is not set, ASIO assumes _WIN32_WINNT=0x0501, i.e. Windows XP target, which is definitely not the
181-
+# # platform which most users target.
182-
+# #
183-
+# # 2) WIN32_LEAN_AND_MEAN is defined to make Winsock2 work.
184-
+# if(asio_ADDED)
185-
+# add_library(asio STATIC ${asio_SOURCE_DIR}/asio/src/asio.cpp ${asio_SOURCE_DIR}/asio/src/asio_ssl.cpp)
186-
+
187-
+# target_include_directories(asio SYSTEM PUBLIC ${asio_SOURCE_DIR}/asio/include)
188-
+# target_compile_definitions(asio PRIVATE ASIO_STANDALONE=1 ASIO_NO_DEPRECATED=1 ASIO_SEPARATE_COMPILATION=1)
189-
+# target_link_libraries(asio PRIVATE Threads::Threads OpenSSL::SSL OpenSSL::Crypto)
190-
+# set_target_properties(
191-
+# asio
192-
+# PROPERTIES C_VISIBILITY_PRESET hidden
193-
+# CXX_VISIBILITY_PRESET hidden
194-
+# POSITION_INDEPENDENT_CODE TRUE)
195-
+
196-
+# if(WIN32)
197-
+# # macro see @ https://stackoverflow.com/a/40217291/1746503
198-
+# macro(get_win32_winnt version)
199-
+# if(CMAKE_SYSTEM_VERSION)
200-
+# set(ver ${CMAKE_SYSTEM_VERSION})
201-
+# string(REGEX MATCH "^([0-9]+).([0-9])" ver ${ver})
202-
+# string(REGEX MATCH "^([0-9]+)" verMajor ${ver})
203-
+# # Check for Windows 10, b/c we'll need to convert to hex 'A'.
204-
+# if("${verMajor}" MATCHES "10")
205-
+# set(verMajor "A")
206-
+# string(REGEX REPLACE "^([0-9]+)" ${verMajor} ver ${ver})
207-
+# endif("${verMajor}" MATCHES "10")
208-
+# # Remove all remaining '.' characters.
209-
+# string(REPLACE "." "" ver ${ver})
210-
+# # Prepend each digit with a zero.
211-
+# string(REGEX REPLACE "([0-9A-Z])" "0\\1" ver ${ver})
212-
+# set(${version} "0x${ver}")
213-
+# endif()
214-
+# endmacro()
215-
+
216-
+# if(NOT DEFINED _WIN32_WINNT)
217-
+# get_win32_winnt(ver)
218-
+# set(_WIN32_WINNT ${ver})
219-
+# endif()
220-
+
221-
+# message(STATUS "Set _WIN32_WINNT=${_WIN32_WINNT}")
222-
+
223-
+# target_compile_definitions(asio INTERFACE _WIN32_WINNT=${_WIN32_WINNT} WIN32_LEAN_AND_MEAN)
224-
+# endif()
225-
+
226-
+# add_library(asio::asio ALIAS asio)
227-
+# endif()
228-
124+
-
229125
add_library(jsonsl OBJECT ${PROJECT_SOURCE_DIR}/third_party/jsonsl/jsonsl.c)
230126
set_target_properties(jsonsl PROPERTIES C_VISIBILITY_PRESET hidden POSITION_INDEPENDENT_CODE TRUE)
231-
@@ -245,7 +245,7 @@ declare_system_library(snappy)
127+
target_include_directories(jsonsl SYSTEM PUBLIC ${PROJECT_SOURCE_DIR}/third_party/jsonsl)
128+
@@ -245,7 +136,4 @@ declare_system_library(snappy)
232129
declare_system_library(llhttp::llhttp)
233130
declare_system_library(hdr_histogram_static)
234131
declare_system_library(Microsoft.GSL::GSL)
235132
-declare_system_library(spdlog::spdlog)
236133
-declare_system_library(fmt::fmt)
237134
-declare_system_library(asio)
238-
+# declare_system_library(spdlog::spdlog)
239-
+# declare_system_library(fmt::fmt)
240-
+# declare_system_library(asio)
241135
declare_system_library(taocpp::json)

0 commit comments

Comments
 (0)