[nifi] 01/03: NIFI-12091 Workaround for TestListenTCPRecord to be corrected in NIFI-12098
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch support/nifi-1.x in repository https://gitbox.apache.org/repos/asf/nifi.git commit 152332eba4a51dce63a87c7cad66cff0d4cb88ab Author: Joseph Witt AuthorDate: Wed Sep 20 10:39:34 2023 -0700 NIFI-12091 Workaround for TestListenTCPRecord to be corrected in NIFI-12098 This closes #7765 Signed-off-by: David Handermann (cherry picked from commit 4527e3fe0fc8e02f7a579dc9ab7d2e93a356b640) --- .../org/apache/nifi/processors/standard/TestListenTCPRecord.java | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenTCPRecord.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenTCPRecord.java index 500501e5bf..a28618d0b7 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenTCPRecord.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenTCPRecord.java @@ -222,7 +222,12 @@ public class TestListenTCPRecord { final OutputStream outputStream = socket.getOutputStream(); outputStream.write(DATA.getBytes(StandardCharsets.UTF_8)); outputStream.flush(); -} catch (final IOException e) { +/** + * Once NIFI-12098 is resolved this sleep can be removed. Without the sleep + * on some systems (Windows builds often) the build can fail and lockup indefinitely. + */ +Thread.sleep(3000); +} catch (final IOException | InterruptedException e) { LOGGER.error("Failed Sending Records to Port [{}]", port, e); } });
[nifi] 02/03: NIFI-12096 Upgraded H2 DB from 2.2.222 to 2.2.224
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch support/nifi-1.x in repository https://gitbox.apache.org/repos/asf/nifi.git commit 7a937803e2e20bec4496fc672235d2dc8beb66f2 Author: mr1716 AuthorDate: Wed Sep 20 08:50:33 2023 -0400 NIFI-12096 Upgraded H2 DB from 2.2.222 to 2.2.224 This closes #7763 Signed-off-by: David Handermann (cherry picked from commit fbb635e4c6e01aea276182d2d429b4b92df67163) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 794edaa1c8..4a12becce1 100644 --- a/pom.xml +++ b/pom.xml @@ -147,7 +147,7 @@ 5.3.29 5.8.7 1.6.11 -2.2.222 +2.2.224 3.9.0 2.9.3
[nifi] 03/03: NIFI-12097 Upgraded Snowflake ingest SDK to 2.0.3 and JDBC to 3.14.1
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch support/nifi-1.x in repository https://gitbox.apache.org/repos/asf/nifi.git commit 345ce9ce060bd8c31391c801f736ee47f11e7870 Author: Pierre Villard AuthorDate: Wed Sep 20 15:34:12 2023 +0200 NIFI-12097 Upgraded Snowflake ingest SDK to 2.0.3 and JDBC to 3.14.1 This closes #7764 Signed-off-by: David Handermann (cherry picked from commit 9c19656f5b621aef224ad01924b1859618c070b5) --- nifi-nar-bundles/nifi-snowflake-bundle/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nifi-nar-bundles/nifi-snowflake-bundle/pom.xml b/nifi-nar-bundles/nifi-snowflake-bundle/pom.xml index d0fa75fe9a..8dfd026f71 100644 --- a/nifi-nar-bundles/nifi-snowflake-bundle/pom.xml +++ b/nifi-nar-bundles/nifi-snowflake-bundle/pom.xml @@ -35,12 +35,12 @@ net.snowflake snowflake-ingest-sdk -2.0.2 +2.0.3 net.snowflake snowflake-jdbc -3.14.0 +3.14.1
[nifi] branch support/nifi-1.x updated (237892988a -> 345ce9ce06)
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a change to branch support/nifi-1.x in repository https://gitbox.apache.org/repos/asf/nifi.git from 237892988a NIFI-12086 This closes #7757. Removed unused jgit dependency from framework-core new 152332eba4 NIFI-12091 Workaround for TestListenTCPRecord to be corrected in NIFI-12098 new 7a937803e2 NIFI-12096 Upgraded H2 DB from 2.2.222 to 2.2.224 new 345ce9ce06 NIFI-12097 Upgraded Snowflake ingest SDK to 2.0.3 and JDBC to 3.14.1 The 3 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: nifi-nar-bundles/nifi-snowflake-bundle/pom.xml | 4 ++-- .../org/apache/nifi/processors/standard/TestListenTCPRecord.java | 7 ++- pom.xml| 2 +- 3 files changed, 9 insertions(+), 4 deletions(-)
[nifi] 01/03: NIFI-12091 Workaround for TestListenTCPRecord to be corrected in NIFI-12098
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git commit 4527e3fe0fc8e02f7a579dc9ab7d2e93a356b640 Author: Joseph Witt AuthorDate: Wed Sep 20 10:39:34 2023 -0700 NIFI-12091 Workaround for TestListenTCPRecord to be corrected in NIFI-12098 This closes #7765 Signed-off-by: David Handermann --- .../org/apache/nifi/processors/standard/TestListenTCPRecord.java | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenTCPRecord.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenTCPRecord.java index 500501e5bf..a28618d0b7 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenTCPRecord.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenTCPRecord.java @@ -222,7 +222,12 @@ public class TestListenTCPRecord { final OutputStream outputStream = socket.getOutputStream(); outputStream.write(DATA.getBytes(StandardCharsets.UTF_8)); outputStream.flush(); -} catch (final IOException e) { +/** + * Once NIFI-12098 is resolved this sleep can be removed. Without the sleep + * on some systems (Windows builds often) the build can fail and lockup indefinitely. + */ +Thread.sleep(3000); +} catch (final IOException | InterruptedException e) { LOGGER.error("Failed Sending Records to Port [{}]", port, e); } });
[nifi] 03/03: NIFI-12097 Upgraded Snowflake ingest SDK to 2.0.3 and JDBC to 3.14.1
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git commit 9c19656f5b621aef224ad01924b1859618c070b5 Author: Pierre Villard AuthorDate: Wed Sep 20 15:34:12 2023 +0200 NIFI-12097 Upgraded Snowflake ingest SDK to 2.0.3 and JDBC to 3.14.1 This closes #7764 Signed-off-by: David Handermann --- nifi-nar-bundles/nifi-snowflake-bundle/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nifi-nar-bundles/nifi-snowflake-bundle/pom.xml b/nifi-nar-bundles/nifi-snowflake-bundle/pom.xml index a0de32bfcf..3f1391307a 100644 --- a/nifi-nar-bundles/nifi-snowflake-bundle/pom.xml +++ b/nifi-nar-bundles/nifi-snowflake-bundle/pom.xml @@ -35,12 +35,12 @@ net.snowflake snowflake-ingest-sdk -2.0.2 +2.0.3 net.snowflake snowflake-jdbc -3.14.0 +3.14.1
[nifi] 02/03: NIFI-12096 Upgraded H2 DB from 2.2.222 to 2.2.224
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git commit fbb635e4c6e01aea276182d2d429b4b92df67163 Author: mr1716 AuthorDate: Wed Sep 20 08:50:33 2023 -0400 NIFI-12096 Upgraded H2 DB from 2.2.222 to 2.2.224 This closes #7763 Signed-off-by: David Handermann --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6160ea5613..dd48e2159e 100644 --- a/pom.xml +++ b/pom.xml @@ -146,7 +146,7 @@ 5.3.29 5.8.7 1.6.11 -2.2.222 +2.2.224 3.9.0 3.1.8
[nifi] branch main updated (11d8519914 -> 9c19656f5b)
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git from 11d8519914 NIFI-12086 This closes #7757. Removed unused jgit dependency from framework-core new 4527e3fe0f NIFI-12091 Workaround for TestListenTCPRecord to be corrected in NIFI-12098 new fbb635e4c6 NIFI-12096 Upgraded H2 DB from 2.2.222 to 2.2.224 new 9c19656f5b NIFI-12097 Upgraded Snowflake ingest SDK to 2.0.3 and JDBC to 3.14.1 The 3 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: nifi-nar-bundles/nifi-snowflake-bundle/pom.xml | 4 ++-- .../org/apache/nifi/processors/standard/TestListenTCPRecord.java | 7 ++- pom.xml| 2 +- 3 files changed, 9 insertions(+), 4 deletions(-)
[nifi] branch support/nifi-1.x updated: NIFI-12086 This closes #7757. Removed unused jgit dependency from framework-core
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch support/nifi-1.x in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/support/nifi-1.x by this push: new 237892988a NIFI-12086 This closes #7757. Removed unused jgit dependency from framework-core 237892988a is described below commit 237892988ad30f5437606621a0c3d36c5b1e5896 Author: exceptionfactory AuthorDate: Tue Sep 19 08:28:13 2023 -0500 NIFI-12086 This closes #7757. Removed unused jgit dependency from framework-core Signed-off-by: Joseph Witt --- .../nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml | 5 - nifi-nar-bundles/nifi-framework-bundle/pom.xml | 5 - 2 files changed, 10 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml index 26e2915589..2fba942a4f 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml @@ -235,11 +235,6 @@ 1.24.0-SNAPSHOT test - -org.eclipse.jgit -org.eclipse.jgit -test - org.apache.nifi nifi-authorizer diff --git a/nifi-nar-bundles/nifi-framework-bundle/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/pom.xml index cb19990555..7ee6abe6e7 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/pom.xml @@ -444,11 +444,6 @@ commons-collections4 4.4 - -org.eclipse.jgit -org.eclipse.jgit -4.3.1.201605051710-r - org.apache.curator curator-test
[nifi] branch main updated: NIFI-12086 This closes #7757. Removed unused jgit dependency from framework-core
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/main by this push: new 11d8519914 NIFI-12086 This closes #7757. Removed unused jgit dependency from framework-core 11d8519914 is described below commit 11d8519914dbbb8c5c3ed5bfae21e1681dedb03b Author: exceptionfactory AuthorDate: Tue Sep 19 08:28:13 2023 -0500 NIFI-12086 This closes #7757. Removed unused jgit dependency from framework-core Signed-off-by: Joseph Witt --- .../nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml | 5 - nifi-nar-bundles/nifi-framework-bundle/pom.xml | 5 - 2 files changed, 10 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml index 775f1d3a4f..41ee9b0bcf 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/pom.xml @@ -268,11 +268,6 @@ 2.0.0-SNAPSHOT test - -org.eclipse.jgit -org.eclipse.jgit -test - org.apache.nifi nifi-authorizer diff --git a/nifi-nar-bundles/nifi-framework-bundle/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/pom.xml index 3dbf290fd5..93cf03d92f 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/pom.xml @@ -473,11 +473,6 @@ commons-collections4 4.4 - -org.eclipse.jgit -org.eclipse.jgit -4.3.1.201605051710-r - org.apache.curator curator-test
[nifi] branch support/nifi-1.x updated: NIFI-12093 This closes #7766. Deprecated EncryptContent Processor
This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch support/nifi-1.x in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/support/nifi-1.x by this push: new bc7a20068c NIFI-12093 This closes #7766. Deprecated EncryptContent Processor bc7a20068c is described below commit bc7a20068c1c0f26c9e3929b9736e522113a9cc0 Author: exceptionfactory AuthorDate: Wed Sep 20 13:36:53 2023 -0500 NIFI-12093 This closes #7766. Deprecated EncryptContent Processor Signed-off-by: Joseph Witt --- .../org/apache/nifi/processors/standard/EncryptContent.java | 12 1 file changed, 12 insertions(+) diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java index 7fc901b8ff..184190ed3f 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncryptContent.java @@ -43,6 +43,7 @@ import org.apache.nifi.annotation.behavior.SystemResourceConsideration; import org.apache.nifi.annotation.behavior.WritesAttribute; import org.apache.nifi.annotation.behavior.WritesAttributes; import org.apache.nifi.annotation.documentation.CapabilityDescription; +import org.apache.nifi.annotation.documentation.DeprecationNotice; import org.apache.nifi.annotation.documentation.Tags; import org.apache.nifi.components.AllowableValue; import org.apache.nifi.components.PropertyDescriptor; @@ -99,6 +100,17 @@ import org.bouncycastle.openpgp.PGPEncryptedData; @WritesAttribute(attribute = "encryptcontent.salt_length", description = "The raw salt length in bytes"), @WritesAttribute(attribute = "encryptcontent.timestamp", description = "The timestamp at which the cryptographic operation occurred in '-MM-dd HH:mm:ss.SSS Z' format"), }) +@DeprecationNotice( +classNames = { +"org.apache.nifi.processors.pgp.EncryptContentPGP", +"org.apache.nifi.processors.pgp.DecryptContentPGP", +"org.apache.nifi.processors.cipher.DecryptContent", + "org.apache.nifi.processors.cipher.DecryptContentCompatibility", +"org.apache.nifi.processors.cipher.EncryptContentAge", +"org.apache.nifi.processors.cipher.DecryptContentAge", +}, +reason = "EncryptContentAge or EncryptContentPGP should be used for encrypting new files using standard formatting. DecryptContent supports deciphering historical files." +) public class EncryptContent extends AbstractProcessor { public static final String ENCRYPT_MODE = "Encrypt";
[nifi] branch support/nifi-1.x updated: NIFI-11595 Backported StateMap.getStateVersion() for StateProviders
This is an automated email from the ASF dual-hosted git repository. exceptionfactory pushed a commit to branch support/nifi-1.x in repository https://gitbox.apache.org/repos/asf/nifi.git The following commit(s) were added to refs/heads/support/nifi-1.x by this push: new ca05da490a NIFI-11595 Backported StateMap.getStateVersion() for StateProviders ca05da490a is described below commit ca05da490a54a80e21e10ed2073b4921f39d8809 Author: exceptionfactory AuthorDate: Wed Sep 20 14:17:00 2023 -0500 NIFI-11595 Backported StateMap.getStateVersion() for StateProviders Signed-off-by: David Handermann --- .../java/org/apache/nifi/components/state/StateMap.java | 13 + .../state/providers/zookeeper/ZooKeeperStateProvider.java | 1 + 2 files changed, 14 insertions(+) diff --git a/nifi-api/src/main/java/org/apache/nifi/components/state/StateMap.java b/nifi-api/src/main/java/org/apache/nifi/components/state/StateMap.java index 4d67164fa4..3defe51915 100644 --- a/nifi-api/src/main/java/org/apache/nifi/components/state/StateMap.java +++ b/nifi-api/src/main/java/org/apache/nifi/components/state/StateMap.java @@ -18,6 +18,7 @@ package org.apache.nifi.components.state; import java.util.Map; +import java.util.Optional; /** * Provides a representation of a component's state at some point in time. @@ -31,8 +32,20 @@ public interface StateMap { * * @return the version associated with the state */ +@Deprecated long getVersion(); +/** + * Get state version is not guaranteed to be numeric, but can be used to compare against an expected version. + * The default implementation uses the available version number and considers -1 as indicating an empty version + * + * @return State version or empty when not known + */ +default Optional getStateVersion() { +final long version = getVersion(); +return version == -1 ? Optional.empty() : Optional.of(String.valueOf(version)); +} + /** * Returns the value associated with the given key * diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/state/providers/zookeeper/ZooKeeperStateProvider.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/state/providers/zookeeper/ZooKeeperStateProvider.java index 747aa56ae6..a201abb13d 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/state/providers/zookeeper/ZooKeeperStateProvider.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/state/providers/zookeeper/ZooKeeperStateProvider.java @@ -64,6 +64,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Properties; import java.util.Set; import java.util.concurrent.TimeUnit;
[nifi-minifi-cpp] 04/05: MINIFICPP-2222 Update CONTRIB.md file with new contributor access request process
This is an automated email from the ASF dual-hosted git repository. fgerlits pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git commit d9537edf034b0bbf011771513bdee154fce3bd8b Author: Gabor Gyimesi AuthorDate: Tue Sep 19 17:27:34 2023 +0200 MINIFICPP- Update CONTRIB.md file with new contributor access request process Signed-off-by: Ferenc Gerlits This closes #1662 --- CONTRIB.md => CONTRIBUTING.md | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CONTRIB.md b/CONTRIBUTING.md similarity index 90% rename from CONTRIB.md rename to CONTRIBUTING.md index 482955001..694901a26 100644 --- a/CONTRIB.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ We welcome all contributions to Apache MiNiFi. All new files must include a copy To make development easier, we've included the linter for the Google Style guide. Google provides an Eclipse formatter for their style guide. It is located [here](https://github.com/google/styleguide/blob/gh-pages/eclipse-cpp-google-style.xml). -New contributions are expected to follow the +New contributions are expected to follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html), except for the following points: - Use .cpp extension for implementation files - Use lowerCamelCase for functions, including accessors/mutators @@ -67,13 +67,13 @@ as part of the verification process, that is applied to all new contributions. ## Issues and Pull Requests Issues within MiNiFi C++ are tracked in the official [Apache JIRA](https://issues.apache.org/jira/projects/MINIFICPP/issues). -New users can register freely and ask for contributor access on the -[Developers Mailing List](https://nifi.apache.org/mailing_lists.html). -Unassigned tickets may be assigned to yourself or filed via this JIRA instance. Pull requests can be submitted via our -[Github Mirror](https://github.com/apache/nifi-minifi-cpp) . When doing so please create a JIRA issue for your pull -request. +New users can freely request JIRA access on the +[Self-Service Portal](https://selfserve.apache.org/jira-account.html) for the nifi project. An Apache PMC member will review and +approve the request as prudent. Unassigned tickets may be assigned to yourself or filed via this JIRA instance. As a new user looking to contribute, +any tickets that are tagged as "beginner", "starter", or "newbie" are good places to start. Pull requests can be submitted via our +[Github](https://github.com/apache/nifi-minifi-cpp). If your contribution does not have a corresponding JIRA issue for it then please create one. -Apache NiFi MiNiFi C++ is a review then commit community. As a result, we will review your commits and merge them following +Apache NiFi MiNiFi C++ is a review then commit community. As a result, we will review your commits and merge them following review. We ask that you provide tests and documentation when possible. Typically PRs are merged after they get 2-3 approvals, usually in a week or two. @@ -94,7 +94,7 @@ This will provide output for all source files. Please see [ThirdParties.md](ThirdParties.md) on how MiNiFi builds and uses third party libraries and how you can add new ones. -### Extensions +### Extensions MiNiFi C++ contains a dynamic loading mechanism that loads arbitrary objects. To maintain consistency of development amongst the NiFi ecosystem, it is called a class loader. If you are contributing a custom Processor or Controller Service, the mechanism to register your class into the default class loader is a pragma definition named:
[nifi-minifi-cpp] 01/05: MINIFICPP-2174 Send all cached compressed log files through C2
This is an automated email from the ASF dual-hosted git repository. fgerlits pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git commit a328a01d288d021a19023facd79a76b2a7d2709f Author: Gabor Gyimesi AuthorDate: Wed Aug 9 18:24:24 2023 +0200 MINIFICPP-2174 Send all cached compressed log files through C2 Signed-off-by: Ferenc Gerlits This closes #1631 --- .../include/core/logging/LoggerConfiguration.h | 8 +-- .../core/logging/internal/CompressionManager.h | 7 +- .../core/logging/internal/LogCompressorSink.h | 33 ++--- libminifi/include/utils/StagingQueue.h | 8 +++ libminifi/src/FlowController.cpp | 6 +- .../core/logging/internal/CompressionManager.cpp | 3 +- libminifi/test/unit/LoggerTests.cpp| 78 -- 7 files changed, 104 insertions(+), 39 deletions(-) diff --git a/libminifi/include/core/logging/LoggerConfiguration.h b/libminifi/include/core/logging/LoggerConfiguration.h index 6dfd7effb..c62ee74b4 100644 --- a/libminifi/include/core/logging/LoggerConfiguration.h +++ b/libminifi/include/core/logging/LoggerConfiguration.h @@ -98,15 +98,15 @@ class LoggerConfiguration { */ void initialize(const std::shared_ptr _properties); - static std::unique_ptr getCompressedLog(bool flush = false) { -return getCompressedLog(std::chrono::milliseconds{0}, flush); + static std::vector> getCompressedLogs() { +return getCompressedLogs(std::chrono::milliseconds{0}); } void initializeAlertSinks(core::controller::ControllerServiceProvider* controller, const std::shared_ptr& agent_id); template - static std::unique_ptr getCompressedLog(const std::chrono::duration& time, bool flush = false) { -return getConfiguration().compression_manager_.getCompressedLog(time, flush); + static std::vector> getCompressedLogs(const std::chrono::duration& time) { +return getConfiguration().compression_manager_.getCompressedLogs(time); } /** diff --git a/libminifi/include/core/logging/internal/CompressionManager.h b/libminifi/include/core/logging/internal/CompressionManager.h index b1ea9fac9..b881a5a3f 100644 --- a/libminifi/include/core/logging/internal/CompressionManager.h +++ b/libminifi/include/core/logging/internal/CompressionManager.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "core/logging/Logger.h" #include "LogCompressorSink.h" @@ -50,12 +51,12 @@ class CompressionManager { std::shared_ptr initialize(const std::shared_ptr& properties, const std::shared_ptr& error_logger, const LoggerFactory& logger_factory); template - std::unique_ptr getCompressedLog(const std::chrono::duration& time, bool flush = false) { + std::vector> getCompressedLogs(const std::chrono::duration& time) { std::shared_ptr sink = getSink(); if (sink) { - return sink->getContent(time, flush); + return sink->getContent(time); } -return nullptr; +return {}; } static constexpr const char* compression_cached_log_max_size_ = "compression.cached.log.max.size"; diff --git a/libminifi/include/core/logging/internal/LogCompressorSink.h b/libminifi/include/core/logging/internal/LogCompressorSink.h index fd02521ad..009fc1235 100644 --- a/libminifi/include/core/logging/internal/LogCompressorSink.h +++ b/libminifi/include/core/logging/internal/LogCompressorSink.h @@ -21,6 +21,7 @@ #include #include #include +#include #include "spdlog/common.h" #include "spdlog/details/log_msg.h" @@ -57,26 +58,42 @@ class LogCompressorSink : public spdlog::sinks::base_sink { ~LogCompressorSink() override; template - std::unique_ptr getContent(const std::chrono::duration& time, bool flush = false) { -if (flush) { - cached_logs_.commit(); - compress(true); + std::vector> getContent(const std::chrono::duration& time) { +cached_logs_.commit(); +compress(true); + +std::vector> log_segments; +const auto segment_count = compressed_logs_.itemCount(); +for (size_t i = 0; i < segment_count; ++i) { + LogBuffer compressed; + if (!compressed_logs_.tryDequeue(compressed, time)) { +break; + } + log_segments.push_back(std::move(compressed.buffer_)); } -LogBuffer compressed; -if (!compressed_logs_.tryDequeue(compressed, time) && flush) { - return createEmptyArchive(); + +if (log_segments.empty()) { + log_segments.push_back(createEmptyArchive()); } -return std::move(compressed.buffer_); +return log_segments; } size_t getMaxCacheSize() const { return cached_logs_.getMaxSize(); } + size_t getMaxCacheSegmentSize() const { +return cached_logs_.getMaxItemSize(); + } + size_t getMaxCompressedSize() const { return compressed_logs_.getMaxSize(); } + size_t getMaxCompressedSegmentSize() const { +return compressed_logs_.getMaxItemSize(); + } + private:
[nifi-minifi-cpp] 02/05: MINIFICPP-2209 Small HTTPClient refactor: preconditions and exception safety
This is an automated email from the ASF dual-hosted git repository. fgerlits pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git commit 6ac5cb94d5d2a03a3be45617c5baee115e166ab6 Author: Marton Szasz AuthorDate: Fri Sep 1 01:00:38 2023 +0200 MINIFICPP-2209 Small HTTPClient refactor: preconditions and exception safety Signed-off-by: Ferenc Gerlits This closes #1648 --- extensions/http-curl/client/HTTPClient.cpp | 30 -- extensions/http-curl/client/HTTPClient.h | 6 -- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/extensions/http-curl/client/HTTPClient.cpp b/extensions/http-curl/client/HTTPClient.cpp index 6e8d41100..8d73f62a4 100644 --- a/extensions/http-curl/client/HTTPClient.cpp +++ b/extensions/http-curl/client/HTTPClient.cpp @@ -16,18 +16,15 @@ */ #include "HTTPClient.h" -#include #include #include #include #include #include -#include "Exception.h" #include "utils/gsl.h" #include "utils/StringUtils.h" #include "core/Resource.h" -#include "utils/RegexUtils.h" #include "range/v3/algorithm/all_of.hpp" #include "range/v3/action/transform.hpp" #include "utils/HTTPUtils.h" @@ -328,18 +325,16 @@ void HTTPClient::setRequestHeader(std::string key, std::optional va } namespace { -struct CurlSListFreeAll { - void operator()(struct curl_slist* slist) const { -curl_slist_free_all(slist); - } -}; +using CurlSlistDeleter = decltype([](struct curl_slist* slist) { curl_slist_free_all(slist); }); -std::unique_ptr getCurlSList(const std::unordered_map& request_headers) { - curl_slist* new_list = nullptr; +std::unique_ptr toCurlSlist(const std::unordered_map& request_headers) { + gsl::owner new_list = nullptr; + const auto guard = gsl::finally([_list]() { curl_slist_free_all(new_list); }); for (const auto& [header_key, header_value] : request_headers) -new_list = curl_slist_append(new_list, utils::StringUtils::join_pack(header_key, ": ", header_value).c_str()); +new_list = (utils::optional_from_ptr(curl_slist_append(new_list, utils::StringUtils::join_pack(header_key, ": ", header_value).c_str())) +| utils::orElse([]() { throw std::runtime_error{"curl_slist_append failed"}; })).value(); - return {new_list, {}}; + return {std::exchange(new_list, nullptr), {}}; } } // namespace @@ -366,7 +361,7 @@ bool HTTPClient::submit() { curl_easy_setopt(http_session_.get(), CURLOPT_NOPROGRESS, 1); } - auto headers = getCurlSList(request_headers_); + const auto headers = toCurlSlist(request_headers_); if (headers) { curl_slist_append(headers.get(), "Expect:"); curl_easy_setopt(http_session_.get(), CURLOPT_HTTPHEADER, headers.get()); @@ -452,7 +447,8 @@ void HTTPClient::set_request_method(std::string method) { } int HTTPClient::onProgress(void *clientp, curl_off_t /*dltotal*/, curl_off_t dlnow, curl_off_t /*ultotal*/, curl_off_t ulnow) { - HTTPClient& client = *reinterpret_cast(clientp); + gsl_Expects(clientp); + HTTPClient& client = *static_cast(clientp); auto now = std::chrono::steady_clock::now(); auto elapsed = now - client.progress_.last_transferred_; if (dlnow != client.progress_.downloaded_data_ || ulnow != client.progress_.uploaded_data_) { @@ -522,12 +518,10 @@ std::string HTTPClient::replaceInvalidCharactersInHttpHeaderFieldName(std::strin return "X-MiNiFi-Empty-Attribute-Name"; } - std::string result; - result.reserve(field_name.size()); // RFC822 3.1.2: The field-name must be composed of printable ASCII characters // (i.e., characters that have values between 33. and 126., decimal, except colon). - ranges::actions::transform(field_name, [](char ch) { - return (ch >= 33 && ch <= 126 && ch != ':') ? ch : '-'; + ranges::actions::transform(field_name, [](char ch) { // NOLINT: false positive: Add #include for transform [build/include_what_you_use] [4] +return (ch >= 33 && ch <= 126 && ch != ':') ? ch : '-'; }); return field_name; } diff --git a/extensions/http-curl/client/HTTPClient.h b/extensions/http-curl/client/HTTPClient.h index d6a1894f7..144edb305 100644 --- a/extensions/http-curl/client/HTTPClient.h +++ b/extensions/http-curl/client/HTTPClient.h @@ -207,8 +207,10 @@ class HTTPClient : public utils::BaseHTTPClient, public core::Connectable { protected: static CURLcode configure_ssl_context(CURL* /*curl*/, void *ctx, void *param) { #ifdef OPENSSL_SUPPORT -auto* ssl_context_service = static_cast(param); -if (!ssl_context_service->configure_ssl_context(static_cast(ctx))) { +gsl_Expects(ctx); +gsl_Expects(param); +auto& ssl_context_service = *static_cast(param); +if (!ssl_context_service.configure_ssl_context(static_cast(ctx))) { return CURLE_FAILED_INIT; } return CURLE_OK;
[nifi-minifi-cpp] 03/05: MINIFICPP-2214 Fix extension list inconsistencies in build scripts
This is an automated email from the ASF dual-hosted git repository. fgerlits pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git commit c44ea7c8ffb5013f48e587d1f32aca1afae97084 Author: Marton Szasz AuthorDate: Mon Sep 11 14:49:20 2023 +0200 MINIFICPP-2214 Fix extension list inconsistencies in build scripts Signed-off-by: Ferenc Gerlits This closes #1654 --- CMakeLists.txt | 1 + README.md| 20 ++--- Windows.md | 76 ++ bootstrap.py | 234 --- bootstrap.sh | 16 ++-- win_build_vs.bat | 90 ++--- 6 files changed, 103 insertions(+), 334 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb20647ac..f602449c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -601,6 +601,7 @@ set(EXTENSIONS_ENABLED_BY_DEFAULT ( minifi-gcp minifi-http-curl minifi-archive-extensions +minifi-mqtt-extensions minifi-rdkafka-extensions minifi-pdh minifi-prometheus diff --git a/README.md b/README.md index eeffe9cda..b46bb3452 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ Through JNI extensions you can run NiFi processors using NARs. The JNI extension ## Caveats * We follow semver with regards to API compatibility, but no ABI compatibility is provided. See [semver's website](https://semver.org/) for more information -* Build and usage currently only supports Windows, Linux and OS X environments. MiNiFi C++ can be built and run through the Windows Subsystem for Linux but we provide no support for this platform. +* Build and usage currently only supports Windows, Linux and macOS environments. MiNiFi C++ can be built and run through the Windows Subsystem for Linux but we provide no support for this platform. * Provenance events generation is supported and are persisted using RocksDB. Volatile repositories can be used on systems without persistent storage. * If MiNiFi C++ is built with the OPC-UA extension enabled, it bundles [open62541](https://open62541.org/), which is available under the Mozilla Public License Version 2.0, a Category B license under [ASF 3rd party license policy](https://www.apache.org/legal/resolved.html#category-b). * If MiNiFi C++ packaged on Windows, the resulting MSI may not be publicly redistributed under the Apache license, because it contains Microsoft redistributable DLLs, which fall under Category X of the [ASF 3rd party license policy](https://www.apache.org/legal/resolved.html#category-x). @@ -131,7 +131,7 @@ versions of OpenSSL, cURL, or zlib are used: * automake * libtool -**NOTE** if Expression Language support is enabled, FlexLexer must be in the include path and the version must be compatible with the version of flex used when generating lexer sources. On Mac OS X and FreeBSD, make sure that the system version is overridden with the correct flex version, which may require merging your CPPFLAGS into CFLAGS and CXXFLAGS. Lexer source generation is automatically performed during CMake builds. To re-generate the sources, remove: +**NOTE** if Expression Language support is enabled, FlexLexer must be in the include path and the version must be compatible with the version of flex used when generating lexer sources. On macOS and FreeBSD, make sure that the system version is overridden with the correct flex version, which may require merging your CPPFLAGS into CFLAGS and CXXFLAGS. Lexer source generation is automatically performed during CMake builds. To re-generate the sources, remove: * extensions/expression-language/Parser.cpp * extensions/expression-language/Parser.hpp @@ -267,7 +267,7 @@ apt install libgps-dev apt install libpcap-dev ``` -# OS X Using Homebrew (with XCode Command Line Tools installed) +# macOS Using Homebrew (with XCode Command Line Tools installed) ``` # ~/Development/code/apache/nifi-minifi-cpp on git:master brew install cmake \ @@ -326,31 +326,31 @@ sudo brew install libpcap A. Persistent Repositories .Enabled B. libcurl features Enabled C. libarchive features .Enabled -D. Python Scripting support Disabled +D. Python Scripting support Enabled E. Expression Language support .Enabled F. Kafka support ...Enabled G. PCAP support Disabled H. USB Camera support ..Disabled I. GPS support .Disabled K. Bustache Support Disabled -L. Lua Scripting Support ...Disabled -M. MQTT Support Disabled +L. Lua Scripting Support ...Enabled +M. MQTT Support Enabled N. COAP Support Disabled O. SFTP Support Disabled S. AWS Support .Enabled T. OpenCV Support ..Disabled -U. OPC-UA Support...Disabled +U. OPC-UA
[nifi-minifi-cpp] 05/05: MINIFICPP-2223 Add .asf.yaml file to configure repository labels
This is an automated email from the ASF dual-hosted git repository. fgerlits pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git commit 73ccd5eefea4fce0ff55269ab4150f856f19aa32 Author: Gabor Gyimesi AuthorDate: Tue Sep 19 17:46:57 2023 +0200 MINIFICPP-2223 Add .asf.yaml file to configure repository labels Signed-off-by: Ferenc Gerlits This closes #1663 --- .asf.yaml | 36 1 file changed, 36 insertions(+) diff --git a/.asf.yaml b/.asf.yaml new file mode 100644 index 0..0472044ca --- /dev/null +++ b/.asf.yaml @@ -0,0 +1,36 @@ +# 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. +github: + description: "Apache NiFi - MiNiFi C++" + homepage: https://nifi.apache.org/minifi/ + labels: +- nifi +- minifi +- cpp +- hacktoberfest + features: +wiki: false +issues: false +projects: false + enabled_merge_buttons: +squash: true +merge: true +rebase: true +notifications: +commits: commits@nifi.apache.org +issues: iss...@nifi.apache.org +pullrequests: iss...@nifi.apache.org +jira_options: link label worklog
[nifi-minifi-cpp] branch main updated (7c6464707 -> 73ccd5eef)
This is an automated email from the ASF dual-hosted git repository. fgerlits pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git from 7c6464707 MINIFICPP-2216 Fix failing proxy setup in docker tests new a328a01d2 MINIFICPP-2174 Send all cached compressed log files through C2 new 6ac5cb94d MINIFICPP-2209 Small HTTPClient refactor: preconditions and exception safety new c44ea7c8f MINIFICPP-2214 Fix extension list inconsistencies in build scripts new d9537edf0 MINIFICPP- Update CONTRIB.md file with new contributor access request process new 73ccd5eef MINIFICPP-2223 Add .asf.yaml file to configure repository labels The 5 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: .asf.yaml | 36 CMakeLists.txt | 1 + CONTRIB.md => CONTRIBUTING.md | 16 +- README.md | 20 +- Windows.md | 76 --- bootstrap.py | 234 - bootstrap.sh | 16 +- extensions/http-curl/client/HTTPClient.cpp | 30 ++- extensions/http-curl/client/HTTPClient.h | 6 +- .../include/core/logging/LoggerConfiguration.h | 8 +- .../core/logging/internal/CompressionManager.h | 7 +- .../core/logging/internal/LogCompressorSink.h | 33 ++- libminifi/include/utils/StagingQueue.h | 8 + libminifi/src/FlowController.cpp | 6 +- .../core/logging/internal/CompressionManager.cpp | 3 +- libminifi/test/unit/LoggerTests.cpp| 78 +-- win_build_vs.bat | 90 17 files changed, 267 insertions(+), 401 deletions(-) create mode 100644 .asf.yaml rename CONTRIB.md => CONTRIBUTING.md (90%) delete mode 100755 bootstrap.py
[nifi-minifi-cpp] branch 2212 deleted (was 7c6464707)
This is an automated email from the ASF dual-hosted git repository. martinzink pushed a change to branch 2212 in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git was 7c6464707 MINIFICPP-2216 Fix failing proxy setup in docker tests The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[nifi-minifi-cpp] branch 2212 created (now 7c6464707)
This is an automated email from the ASF dual-hosted git repository. martinzink pushed a change to branch 2212 in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git at 7c6464707 MINIFICPP-2216 Fix failing proxy setup in docker tests No new revisions were added by this update.
[nifi-minifi-cpp] branch MINIFICPP-2204 updated (f2a1f9398 -> fb26b462c)
This is an automated email from the ASF dual-hosted git repository. lordgamez pushed a change to branch MINIFICPP-2204 in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git from f2a1f9398 Review update add fb26b462c Increase timeout and free up disk space for clang No new revisions were added by this update. Summary of changes: .github/workflows/ci.yml | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-)