(nifi) branch support/nifi-1.x updated: NIFI-12784 Set Path Not Found as a Dependent Property in EvaluateJsonPath

2024-02-20 Thread exceptionfactory
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 85f2af438b NIFI-12784 Set Path Not Found as a Dependent Property in 
EvaluateJsonPath
85f2af438b is described below

commit 85f2af438b559c19f2339a2b9fdbe5e31ab44181
Author: dan-s1 
AuthorDate: Fri Feb 16 19:28:18 2024 +

NIFI-12784 Set Path Not Found as a Dependent Property in EvaluateJsonPath

This closes #8420

Signed-off-by: David Handermann 
(cherry picked from commit 0a2ba317c0dc0db3a45a904d88802dde1a68304e)
---
 .../main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
index b72a8718db..47185b82e3 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
@@ -125,6 +125,7 @@ public class EvaluateJsonPath extends 
AbstractJsonPathProcessor {
 .required(true)
 .allowableValues(PATH_NOT_FOUND_WARN, PATH_NOT_FOUND_IGNORE, 
PATH_NOT_FOUND_SKIP)
 .defaultValue(PATH_NOT_FOUND_IGNORE)
+.dependsOn(DESTINATION, DESTINATION_ATTRIBUTE)
 .build();
 
 public static final Relationship REL_MATCH = new Relationship.Builder()



(nifi) branch main updated: NIFI-12784 Set Path Not Found as a Dependent Property in EvaluateJsonPath

2024-02-20 Thread exceptionfactory
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


The following commit(s) were added to refs/heads/main by this push:
 new 0a2ba317c0 NIFI-12784 Set Path Not Found as a Dependent Property in 
EvaluateJsonPath
0a2ba317c0 is described below

commit 0a2ba317c0dc0db3a45a904d88802dde1a68304e
Author: dan-s1 
AuthorDate: Fri Feb 16 19:28:18 2024 +

NIFI-12784 Set Path Not Found as a Dependent Property in EvaluateJsonPath

This closes #8420

Signed-off-by: David Handermann 
---
 .../main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
index bc5871a72d..11b466eda2 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateJsonPath.java
@@ -123,6 +123,7 @@ public class EvaluateJsonPath extends 
AbstractJsonPathProcessor {
 .required(true)
 .allowableValues(PATH_NOT_FOUND_WARN, PATH_NOT_FOUND_IGNORE, 
PATH_NOT_FOUND_SKIP)
 .defaultValue(PATH_NOT_FOUND_IGNORE)
+.dependsOn(DESTINATION, DESTINATION_ATTRIBUTE)
 .build();
 
 public static final Relationship REL_MATCH = new Relationship.Builder()



(nifi) branch main updated: NIFI-12633 Avoid resetting state in GetSolr on restart

2024-02-20 Thread exceptionfactory
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


The following commit(s) were added to refs/heads/main by this push:
 new 043e2dd3ff NIFI-12633 Avoid resetting state in GetSolr on restart
043e2dd3ff is described below

commit 043e2dd3fff51605f210ada9a5ffab655eafc30a
Author: Robert 
AuthorDate: Thu Jan 18 20:32:32 2024 +0100

NIFI-12633 Avoid resetting state in GetSolr on restart

This closes #8267

Signed-off-by: David Handermann 
---
 .../src/main/java/org/apache/nifi/processors/solr/GetSolr.java   | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/GetSolr.java
 
b/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/GetSolr.java
index ce88e2d53e..22252ad380 100644
--- 
a/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/GetSolr.java
+++ 
b/nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/GetSolr.java
@@ -41,6 +41,7 @@ import org.apache.nifi.annotation.behavior.Stateful;
 import org.apache.nifi.annotation.configuration.DefaultSchedule;
 import org.apache.nifi.annotation.documentation.CapabilityDescription;
 import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnConfigurationRestored;
 import org.apache.nifi.annotation.lifecycle.OnScheduled;
 import org.apache.nifi.components.AllowableValue;
 import org.apache.nifi.components.PropertyDescriptor;
@@ -154,6 +155,7 @@ public class GetSolr extends SolrProcessor {
 
 private static final DateTimeFormatter DATE_TIME_FORMATTER = 
DateTimeFormatter.ofPattern("-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US);
 
+private final AtomicBoolean configurationRestored = new 
AtomicBoolean(false);
 private final AtomicBoolean clearState = new AtomicBoolean(false);
 private final AtomicBoolean dateFieldNotInSpecifiedFieldsList = new 
AtomicBoolean(false);
 private volatile String id_field = null;
@@ -211,10 +213,15 @@ public class GetSolr extends SolrProcessor {
 
 @Override
 public void onPropertyModified(PropertyDescriptor descriptor, String 
oldValue, String newValue) {
-if 
(propertyNamesForActivatingClearState.contains(descriptor.getName()))
+if (configurationRestored.get() && 
propertyNamesForActivatingClearState.contains(descriptor.getName()))
 clearState.set(true);
 }
 
+@OnConfigurationRestored
+public void onConfigurationRestored() {
+configurationRestored.set(true);
+}
+
 @OnScheduled
 public void clearState(final ProcessContext context) throws IOException {
 if (clearState.getAndSet(false))



(nifi) branch support/nifi-1.x updated: NIFI-12827 Upgraded PostgreSQL JDBC test driver from 42.6.0 to 42.7.2

2024-02-20 Thread exceptionfactory
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 e2d029dd18 NIFI-12827 Upgraded PostgreSQL JDBC test driver from 42.6.0 
to 42.7.2
e2d029dd18 is described below

commit e2d029dd18fad2a03188eac94bee8354554be5c8
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Wed Feb 21 00:06:24 2024 +

NIFI-12827 Upgraded PostgreSQL JDBC test driver from 42.6.0 to 42.7.2

This closes #8436

Signed-off-by: David Handermann 
(cherry picked from commit a95f327b3110af4cf5e438fc55aab2d34b055e28)
---
 nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml 
b/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml
index 592569effb..6ec11abf44 100644
--- a/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml
+++ b/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml
@@ -64,7 +64,7 @@
 
 org.postgresql
 postgresql
-42.6.0
+42.7.2
 
 
 



(nifi) branch dependabot/maven/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/org.postgresql-postgresql-42.7.2 deleted (was 69655bfa59)

2024-02-20 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/maven/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/org.postgresql-postgresql-42.7.2
in repository https://gitbox.apache.org/repos/asf/nifi.git


 was 69655bfa59 Bump org.postgresql:postgresql

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) branch dependabot/maven/nifi-registry/nifi-registry-core/nifi-registry-test/org.postgresql-postgresql-42.7.2 deleted (was f10ce9f06d)

2024-02-20 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/maven/nifi-registry/nifi-registry-core/nifi-registry-test/org.postgresql-postgresql-42.7.2
in repository https://gitbox.apache.org/repos/asf/nifi.git


 was f10ce9f06d Bump org.postgresql:postgresql

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) branch main updated (3f2f5a02e0 -> a95f327b31)

2024-02-20 Thread exceptionfactory
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 3f2f5a02e0 NIFI-12768 Removed unstable assertions from TestListFile
 new 47290eb39f NIFI-12827 Upgraded PostgreSQL JDBC test driver from 42.7.1 
to 42.7.2
 new a95f327b31 NIFI-12827 Upgraded PostgreSQL JDBC test driver from 42.6.0 
to 42.7.2

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:
 nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml | 2 +-
 nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



(nifi) 01/02: NIFI-12827 Upgraded PostgreSQL JDBC test driver from 42.7.1 to 42.7.2

2024-02-20 Thread exceptionfactory
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 47290eb39fa91fdba3b37f13d91eaa0e82911727
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Wed Feb 21 00:09:39 2024 +

NIFI-12827 Upgraded PostgreSQL JDBC test driver from 42.7.1 to 42.7.2

This closes #8437

Signed-off-by: David Handermann 
---
 nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
index 0d7a1f20fb..a4a33633b2 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
@@ -515,7 +515,7 @@
 
 org.postgresql
 postgresql
-42.7.1
+42.7.2
 test
 
 



(nifi) 02/02: NIFI-12827 Upgraded PostgreSQL JDBC test driver from 42.6.0 to 42.7.2

2024-02-20 Thread exceptionfactory
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 a95f327b3110af4cf5e438fc55aab2d34b055e28
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Wed Feb 21 00:06:24 2024 +

NIFI-12827 Upgraded PostgreSQL JDBC test driver from 42.6.0 to 42.7.2

This closes #8436

Signed-off-by: David Handermann 
---
 nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml 
b/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml
index 510e3b2f22..c40fd174bb 100644
--- a/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml
+++ b/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml
@@ -64,7 +64,7 @@
 
 org.postgresql
 postgresql
-42.6.0
+42.7.2
 
 
 



(nifi) branch main updated: NIFI-12768 Removed unstable assertions from TestListFile

2024-02-20 Thread exceptionfactory
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


The following commit(s) were added to refs/heads/main by this push:
 new 3f2f5a02e0 NIFI-12768 Removed unstable assertions from TestListFile
3f2f5a02e0 is described below

commit 3f2f5a02e05dbb2bd706613e648b9c562a34785a
Author: Joseph Witt 
AuthorDate: Tue Feb 20 17:15:16 2024 -0700

NIFI-12768 Removed unstable assertions from TestListFile

Additional assertion removals which assumed ordering that isn't guaranteed 
or enforced by the tests

This closes #8438

Signed-off-by: David Handermann 
---
 .../test/java/org/apache/nifi/processors/standard/TestListFile.java   | 4 
 1 file changed, 4 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListFile.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListFile.java
index 2f5a9a8c09..dc5fd1d958 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListFile.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListFile.java
@@ -306,8 +306,6 @@ public class TestListFile {
 runner.assertAllFlowFilesTransferred(ListFile.REL_SUCCESS);
 final List successFiles2 = 
runner.getFlowFilesForRelationship(ListFile.REL_SUCCESS);
 assertEquals(2, successFiles2.size());
-assertEquals(file2.getName(), 
successFiles2.get(0).getAttribute("filename"));
-assertEquals(file1.getName(), 
successFiles2.get(1).getAttribute("filename"));
 assertVerificationOutcome(Outcome.SUCCESSFUL, "Successfully listed .* 
Found 3 objects.  Of those, 2 match the filter.");
 
 // exclude newest
@@ -317,8 +315,6 @@ public class TestListFile {
 runner.assertAllFlowFilesTransferred(ListFile.REL_SUCCESS);
 final List successFiles3 = 
runner.getFlowFilesForRelationship(ListFile.REL_SUCCESS);
 assertEquals(2, successFiles3.size());
-assertEquals(file3.getName(), 
successFiles3.get(0).getAttribute("filename"));
-assertEquals(file2.getName(), 
successFiles3.get(1).getAttribute("filename"));
 assertVerificationOutcome(Outcome.SUCCESSFUL, "Successfully listed .* 
Found 3 objects.  Of those, 2 match the filter.");
 
 // exclude oldest and newest



(nifi) branch dependabot/maven/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/org.postgresql-postgresql-42.7.2 created (now 69655bfa59)

2024-02-20 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/maven/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/org.postgresql-postgresql-42.7.2
in repository https://gitbox.apache.org/repos/asf/nifi.git


  at 69655bfa59 Bump org.postgresql:postgresql

No new revisions were added by this update.



(nifi) branch dependabot/maven/nifi-registry/nifi-registry-core/nifi-registry-test/org.postgresql-postgresql-42.7.2 created (now f10ce9f06d)

2024-02-20 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/maven/nifi-registry/nifi-registry-core/nifi-registry-test/org.postgresql-postgresql-42.7.2
in repository https://gitbox.apache.org/repos/asf/nifi.git


  at f10ce9f06d Bump org.postgresql:postgresql

No new revisions were added by this update.



(nifi) branch dependabot/maven/org.apache.commons-commons-compress-1.26.0 deleted (was 1174ae1b89)

2024-02-20 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/maven/org.apache.commons-commons-compress-1.26.0
in repository https://gitbox.apache.org/repos/asf/nifi.git


 was 1174ae1b89 Bump org.apache.commons:commons-compress from 1.25.0 to 
1.26.0

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) branch dependabot/maven/org.apache.commons-commons-compress-1.26.0 created (now 1174ae1b89)

2024-02-20 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/maven/org.apache.commons-commons-compress-1.26.0
in repository https://gitbox.apache.org/repos/asf/nifi.git


  at 1174ae1b89 Bump org.apache.commons:commons-compress from 1.25.0 to 
1.26.0

No new revisions were added by this update.



(nifi) branch support/nifi-1.x updated (d5385c298d -> 9ca8bfc752)

2024-02-20 Thread exceptionfactory
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 d5385c298d NIFI-12818 Deprecated ReportLineageToAtlas for Removal This 
closes #8426.
 add 9ca8bfc752 NIFI-12232 Corrected Group Component ID Handling for 
Clustered Flows

No new revisions were added by this update.

Summary of changes:
 .../nifi/connectable/StandardConnection.java   |  2 +-
 .../StandardVersionedComponentSynchronizer.java| 31 +++-
 .../apache/nifi/groups/StandardProcessGroup.java   |  2 +
 .../org/apache/nifi/controller/FlowController.java | 13 ++-
 .../election/CuratorLeaderElectionManager.java |  9 -
 .../org/apache/nifi/web/server/JettyServer.java|  6 +--
 .../system/clustering/FlowSynchronizationIT.java   | 43 ++
 7 files changed, 97 insertions(+), 9 deletions(-)



(nifi) branch main updated: NIFI-12772 Expose REMOTE_POLL_BATCH_SIZE property for ListSFTP

2024-02-20 Thread joewitt
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 89b618cc05 NIFI-12772 Expose REMOTE_POLL_BATCH_SIZE property for 
ListSFTP
89b618cc05 is described below

commit 89b618cc052a19bb4bcdbe8f7067ad996aad614d
Author: Tom Brisland 
AuthorDate: Fri Feb 9 23:13:35 2024 +

NIFI-12772 Expose REMOTE_POLL_BATCH_SIZE property for ListSFTP

This closes #8390.

revert max results optimisation + unnecessary import

Signed-off-by: Joseph Witt 
---
 .../util/file/transfer/ListFileTransfer.java   |  9 +-
 .../apache/nifi/processors/standard/ListSFTP.java  |  3 +-
 .../nifi/processors/standard/TestListSFTP.java | 37 +++---
 3 files changed, 29 insertions(+), 20 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-extension-utils/nifi-file-transfer/src/main/java/org/apache/nifi/processor/util/file/transfer/ListFileTransfer.java
 
b/nifi-nar-bundles/nifi-extension-utils/nifi-file-transfer/src/main/java/org/apache/nifi/processor/util/file/transfer/ListFileTransfer.java
index 1106b27fa3..af10d592d9 100644
--- 
a/nifi-nar-bundles/nifi-extension-utils/nifi-file-transfer/src/main/java/org/apache/nifi/processor/util/file/transfer/ListFileTransfer.java
+++ 
b/nifi-nar-bundles/nifi-extension-utils/nifi-file-transfer/src/main/java/org/apache/nifi/processor/util/file/transfer/ListFileTransfer.java
@@ -31,7 +31,6 @@ import java.time.Instant;
 import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -124,13 +123,7 @@ public abstract class ListFileTransfer extends 
AbstractListProcessor {
 return listing;
 }
 
-final Iterator itr = listing.iterator();
-while (itr.hasNext()) {
-final FileInfo next = itr.next();
-if (next.getLastModifiedTime() < minTimestamp) {
-itr.remove();
-}
-}
+listing.removeIf(file -> file.getLastModifiedTime() < minTimestamp);
 
 return listing;
 }
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListSFTP.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListSFTP.java
index 16a4e8e14e..1d3e498a0c 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListSFTP.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListSFTP.java
@@ -100,6 +100,7 @@ public class ListSFTP extends ListFileTransfer {
 properties.add(SFTPTransfer.FILE_FILTER_REGEX);
 properties.add(SFTPTransfer.PATH_FILTER_REGEX);
 properties.add(SFTPTransfer.IGNORE_DOTTED_FILES);
+properties.add(SFTPTransfer.REMOTE_POLL_BATCH_SIZE);
 properties.add(SFTPTransfer.STRICT_HOST_KEY_CHECKING);
 properties.add(SFTPTransfer.HOST_KEY_FILE);
 properties.add(SFTPTransfer.CONNECTION_TIMEOUT);
@@ -176,7 +177,7 @@ public class ListSFTP extends ListFileTransfer {
 final Long maxAge = 
context.getProperty(ListFile.MAX_AGE).asTimePeriod(TimeUnit.MILLISECONDS);
 
 return (attributes) -> {
-if(attributes.isDirectory()) {
+if (attributes.isDirectory()) {
 return true;
 }
 
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListSFTP.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListSFTP.java
index f2340238c1..2ae2b78335 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListSFTP.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListSFTP.java
@@ -16,16 +16,6 @@
  */
 package org.apache.nifi.processors.standard;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.UncheckedIOException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.Collections;
-import java.util.List;
-import java.util.UUID;
-
 import org.apache.nifi.components.ConfigVerificationResult;
 import org.apache.nifi.components.ConfigVerificationResult.Outcome;
 import org.apache.nifi.distributed.cache.client.DistributedMapCacheClient;
@@ -45,6 +35,16 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
+import java.io.File;
+import 

(nifi) branch main updated: NIFI-12788 Avoid host URI encoding errors for Jetty Server Connector

2024-02-20 Thread exceptionfactory
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


The following commit(s) were added to refs/heads/main by this push:
 new d35247b7b1 NIFI-12788 Avoid host URI encoding errors for Jetty Server 
Connector
d35247b7b1 is described below

commit d35247b7b16b9734012daf9b35a2e4e7323545f7
Author: Bryan Bende 
AuthorDate: Wed Feb 14 11:11:10 2024 -0500

NIFI-12788 Avoid host URI encoding errors for Jetty Server Connector

This closes #8404

Signed-off-by: David Handermann 
---
 .../src/main/java/org/apache/nifi/web/server/JettyServer.java| 9 +++--
 .../main/java/org/apache/nifi/registry/jetty/JettyServer.java| 9 +++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
index 526cc6906c..fe83b16d2b 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
@@ -28,6 +28,7 @@ import java.net.InetAddress;
 import java.net.NetworkInterface;
 import java.net.SocketException;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -153,7 +154,7 @@ public class JettyServer implements NiFiServer, 
ExtensionUiLoader {
 private static final String WAR_EXTENSION = ".war";
 private static final int WEB_APP_MAX_FORM_CONTENT_SIZE = 60;
 
-private static final String APPLICATION_URL_FORMAT = "%s://%s:%d/nifi";
+private static final String APPLICATION_PATH = "/nifi";
 private static final String HTTPS_SCHEME = "https";
 private static final String HTTP_SCHEME = "http";
 private static final String HOST_UNSPECIFIED = "0.0.0.0";
@@ -725,7 +726,11 @@ public class JettyServer implements NiFiServer, 
ExtensionUiLoader {
 final int port = serverConnector.getLocalPort();
 final String connectorHost = serverConnector.getHost();
 final String host = 
StringUtils.defaultIfEmpty(connectorHost, HOST_UNSPECIFIED);
-return URI.create(String.format(APPLICATION_URL_FORMAT, 
scheme, host, port));
+try {
+return new URI(scheme, null, host, port, 
APPLICATION_PATH, null, null);
+} catch (URISyntaxException e) {
+throw new RuntimeException(e);
+}
 })
 .collect(Collectors.toList());
 }
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-jetty/src/main/java/org/apache/nifi/registry/jetty/JettyServer.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-jetty/src/main/java/org/apache/nifi/registry/jetty/JettyServer.java
index 852c1802c5..df03bedc01 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-jetty/src/main/java/org/apache/nifi/registry/jetty/JettyServer.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-jetty/src/main/java/org/apache/nifi/registry/jetty/JettyServer.java
@@ -34,6 +34,7 @@ import java.net.InetAddress;
 import java.net.NetworkInterface;
 import java.net.SocketException;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
@@ -48,7 +49,7 @@ public class JettyServer {
 
 private static final Logger logger = 
LoggerFactory.getLogger(JettyServer.class);
 
-private static final String APPLICATION_URL_FORMAT = 
"%s://%s:%d/nifi-registry";
+private static final String APPLICATION_PATH = "/nifi-registry";
 
 private static final String HTTPS_SCHEME = "https";
 
@@ -142,7 +143,11 @@ public class JettyServer {
 final int port = serverConnector.getLocalPort();
 final String connectorHost = serverConnector.getHost();
 final String host = 
StringUtils.defaultIfEmpty(connectorHost, HOST_UNSPECIFIED);
-return URI.create(String.format(APPLICATION_URL_FORMAT, 
scheme, host, port));
+try {
+return new URI(scheme, null, host, port, 
APPLICATION_PATH, null, null);
+} catch (URISyntaxException e) {
+throw new RuntimeException(e);
+}
 })
 .collect(Collectors.toList());
 }



(nifi) branch dependabot/npm_and_yarn/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/undici-and-angular-devkit/build-angular-6.6.2 deleted (was cf59fcc4

2024-02-20 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/npm_and_yarn/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/undici-and-angular-devkit/build-angular-6.6.2
in repository https://gitbox.apache.org/repos/asf/nifi.git


 was cf59fcc4d2 Bump undici and @angular-devkit/build-angular

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) branch main updated: Bump undici and @angular-devkit/build-angular (#8418)

2024-02-20 Thread mcgilman
This is an automated email from the ASF dual-hosted git repository.

mcgilman 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 154fd87b79 Bump undici and @angular-devkit/build-angular (#8418)
154fd87b79 is described below

commit 154fd87b794fa22871b2fdce6aa4c1da28ec46bf
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Tue Feb 20 13:18:41 2024 -0500

Bump undici and @angular-devkit/build-angular (#8418)

Bumps [undici](https://github.com/nodejs/undici) to 6.6.2 and updates 
ancestor dependency 
[@angular-devkit/build-angular](https://github.com/angular/angular-cli). These 
dependencies need to be updated together.


Updates `undici` from 6.2.1 to 6.6.2
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.2.1...v6.6.2)

Updates `@angular-devkit/build-angular` from 17.1.3 to 17.2.0
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/angular/angular-cli/compare/17.1.3...17.2.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
- dependency-name: "@angular-devkit/build-angular"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
---
 .../src/main/nifi/package-lock.json| 1324 ++--
 .../nifi-web-frontend/src/main/nifi/package.json   |2 +-
 2 files changed, 973 insertions(+), 353 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package-lock.json
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package-lock.json
index 0f2d42f620..178f33516b 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package-lock.json
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/package-lock.json
@@ -36,7 +36,7 @@
 "zone.js": "0.14.4"
 },
 "devDependencies": {
-"@angular-devkit/build-angular": "17.1.3",
+"@angular-devkit/build-angular": "17.2.0",
 "@angular-eslint/builder": "17.2.1",
 "@angular-eslint/eslint-plugin": "17.2.1",
 "@angular-eslint/eslint-plugin-template": "17.2.1",
@@ -65,6 +65,9 @@
 "prettier": "3.1.0",
 "tailwindcss": "^3.3.6",
 "typescript": "5.3.3"
+},
+"engines": {
+"node": ">=21.0.0"
 }
 },
 "node_modules/@aashutoshrathi/word-wrap": {
@@ -117,71 +120,70 @@
 }
 },
 "node_modules/@angular-devkit/build-angular": {
-"version": "17.1.3",
-"resolved": 
"https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-17.1.3.tgz;,
-"integrity": 
"sha512-pusFVSWMnrm2GrF3+Fw19OhA2rNw4WkfTMUruhaKAjW5QIvZ3wHYf+pH//1Ud+tuhFBi9BH7UALP2vnJMu1ehw==",
+"version": "17.2.0",
+"resolved": 
"https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-17.2.0.tgz;,
+"integrity": 
"sha512-zO2YKcRRL3Ck3KZ3Ir/lWlciYIguJd3W9iYICKkeK4whi94y3NhrCy0Iualoo2WP7hE043uKQ0SwtVABft0SgA==",
 "dev": true,
 "dependencies": {
 "@ampproject/remapping": "2.2.1",
-"@angular-devkit/architect": "0.1701.3",
-"@angular-devkit/build-webpack": "0.1701.3",
-"@angular-devkit/core": "17.1.3",
-"@babel/core": "7.23.7",
+"@angular-devkit/architect": "0.1702.0",
+"@angular-devkit/build-webpack": "0.1702.0",
+"@angular-devkit/core": "17.2.0",
+"@babel/core": "7.23.9",
 "@babel/generator": "7.23.6",
 "@babel/helper-annotate-as-pure": "7.22.5",
 "@babel/helper-split-export-declaration": "7.22.6",
-"@babel/plugin-transform-async-generator-functions": "7.23.7",
+"@babel/plugin-transform-async-generator-functions": "7.23.9",
 "@babel/plugin-transform-async-to-generator": "7.23.3",
-"@babel/plugin-transform-runtime": "7.23.7",
-"@babel/preset-env": "7.23.7",
-"@babel/runtime": "7.23.7",
+"@babel/plugin-transform-runtime": "7.23.9",
+"@babel/preset-env": "7.23.9",
+"@babel/runtime": "7.23.9",
 "@discoveryjs/json-ext": 

(nifi) branch main updated: NIFI-12232 Corrected Group Component ID Handling for Clustered Flows

2024-02-20 Thread exceptionfactory
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


The following commit(s) were added to refs/heads/main by this push:
 new a821966a87 NIFI-12232 Corrected Group Component ID Handling for 
Clustered Flows
a821966a87 is described below

commit a821966a870a494bd0a7eb0ae15822e06b8d21c5
Author: Mark Payne 
AuthorDate: Wed Feb 14 12:14:12 2024 -0500

NIFI-12232 Corrected Group Component ID Handling for Clustered Flows

Ensured that if a Process Group doesn't have a Versioned Component ID we 
use the ComponentIdLookup to create one based on its Instance ID in the same 
way that is done when serializing the flow; this ensures matching ID's when we 
synchronize flows across the cluster. Also included some code cleanup around 
failure handling on startup

This closes #8406

Signed-off-by: David Handermann 
---
 .../nifi/connectable/StandardConnection.java   |  2 +-
 .../StandardVersionedComponentSynchronizer.java| 33 --
 .../apache/nifi/groups/StandardProcessGroup.java   |  2 ++
 .../org/apache/nifi/controller/FlowController.java | 13 +--
 .../zookeeper/CuratorLeaderElectionManager.java| 11 --
 .../org/apache/nifi/web/server/JettyServer.java|  4 +--
 .../system/clustering/FlowSynchronizationIT.java   | 40 ++
 7 files changed, 95 insertions(+), 10 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/connectable/StandardConnection.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/connectable/StandardConnection.java
index 9ef3b9fa39..1b971292fa 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/connectable/StandardConnection.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/connectable/StandardConnection.java
@@ -292,7 +292,7 @@ public final class StandardConnection implements Connection 
{
 }
 
 if (previousDestination.isRunning() && !(previousDestination 
instanceof Funnel || previousDestination instanceof LocalPort)) {
-throw new IllegalStateException("Cannot change destination of 
Connection because the current destination is running");
+throw new IllegalStateException("Cannot change destination of 
Connection because the current destination ([%s]) is 
running".formatted(previousDestination));
 }
 
 if (getFlowFileQueue().isUnacknowledgedFlowFile()) {
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
index d687deee3d..74ffd715b3 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java
@@ -244,7 +244,7 @@ public class StandardVersionedComponentSynchronizer 
implements VersionedComponen
 try {
 final Map 
parameterProviderReferences = versionedExternalFlow.getParameterProviders() == 
null
 ? new HashMap<>() : 
versionedExternalFlow.getParameterProviders();
-final ProcessGroup topLevelGroup = 
syncOptions.getTopLevelGroupId() != null ? 
context.getFlowManager().getGroup(syncOptions.getTopLevelGroupId()) : group;
+final ProcessGroup topLevelGroup = 
syncOptions.getTopLevelGroupId() == null ? group : 
context.getFlowManager().getGroup(syncOptions.getTopLevelGroupId());
 synchronize(group, 
versionedExternalFlow.getFlowContents(), 
versionedExternalFlow.getParameterContexts(),
 parameterProviderReferences, topLevelGroup, 
syncOptions.isUpdateSettings());
 } catch (final ProcessorInstantiationException pie) {
@@ -702,6 +702,7 @@ public class StandardVersionedComponentSynchronizer 
implements VersionedComponen
 
connectionsWithTempDestination.add(proposedConnection.getIdentifier());
 }
 
+LOG.debug("Changing destination of Connection {} from {} to {}", 
connection, connection.getDestination(), newDestination);
 connection.setDestination(newDestination);
 }
 
@@ -733,6 +734,7 @@ public class 

(nifi) branch main updated: NIFI-12771 Restored Client-side KMS encryption strategy for S3

2024-02-20 Thread exceptionfactory
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


The following commit(s) were added to refs/heads/main by this push:
 new 0f4defa49a NIFI-12771 Restored Client-side KMS encryption strategy for 
S3
0f4defa49a is described below

commit 0f4defa49affb10966f39ac5536bdf03f0205ac0
Author: Peter Turcsanyi 
AuthorDate: Fri Feb 9 23:25:17 2024 +0100

NIFI-12771 Restored Client-side KMS encryption strategy for S3

This closes #8388

Signed-off-by: David Handermann v
---
 .../encryption/ClientSideCEncryptionStrategy.java  |  4 +-
 .../ClientSideKMSEncryptionStrategy.java   | 62 ++
 .../s3/encryption/StandardS3EncryptionService.java |  1 +
 .../s3/encryption/TestS3EncryptionStrategies.java  | 38 ++---
 4 files changed, 96 insertions(+), 9 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/encryption/ClientSideCEncryptionStrategy.java
 
b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/encryption/ClientSideCEncryptionStrategy.java
index 0e69c87d82..aeaa5d6cc9 100644
--- 
a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/encryption/ClientSideCEncryptionStrategy.java
+++ 
b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/encryption/ClientSideCEncryptionStrategy.java
@@ -60,10 +60,10 @@ public class ClientSideCEncryptionStrategy implements 
S3EncryptionStrategy {
 final StaticEncryptionMaterialsProvider encryptionMaterialsProvider = 
new StaticEncryptionMaterialsProvider(new EncryptionMaterials(symmetricKey));
 
 final CryptoConfigurationV2 cryptoConfig = new CryptoConfigurationV2();
-
cryptoConfig.setAwsKmsRegion(Region.getRegion(Regions.fromName(kmsRegion)));
+// A placeholder KMS Region needs to be set due to bug 
https://github.com/aws/aws-sdk-java/issues/2530
+cryptoConfig.setAwsKmsRegion(Region.getRegion(Regions.DEFAULT_REGION));
 
 final AmazonS3EncryptionClientV2Builder builder = 
AmazonS3EncryptionClientV2.encryptionBuilder()
-.disableChunkedEncoding()
 .withCryptoConfiguration(cryptoConfig)
 .withEncryptionMaterialsProvider(encryptionMaterialsProvider);
 clientBuilder.accept(builder);
diff --git 
a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/encryption/ClientSideKMSEncryptionStrategy.java
 
b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/encryption/ClientSideKMSEncryptionStrategy.java
new file mode 100644
index 00..59187196ff
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/encryption/ClientSideKMSEncryptionStrategy.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+package org.apache.nifi.processors.aws.s3.encryption;
+
+import com.amazonaws.regions.Region;
+import com.amazonaws.regions.Regions;
+import com.amazonaws.services.s3.AmazonS3;
+import com.amazonaws.services.s3.AmazonS3Builder;
+import com.amazonaws.services.s3.AmazonS3EncryptionClientV2;
+import com.amazonaws.services.s3.AmazonS3EncryptionClientV2Builder;
+import com.amazonaws.services.s3.model.CryptoConfigurationV2;
+import com.amazonaws.services.s3.model.KMSEncryptionMaterialsProvider;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.function.Consumer;
+
+/**
+ * This strategy uses KMS key id to perform client-side encryption.  Use this 
strategy when you want the client to perform the encryption,
+ * (thus incurring the cost of processing) and manage the key in a KMS 
instance.
+ *
+ * See 
https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html#client-side-encryption-kms-managed-master-key-intro
+ *
+ */
+public class ClientSideKMSEncryptionStrategy implements S3EncryptionStrategy {
+/**
+ * Create an encryption 

(nifi) branch main updated: NIFI-12697 Allow disabling scientific notation when writing JSON

2024-02-20 Thread exceptionfactory
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


The following commit(s) were added to refs/heads/main by this push:
 new 7681054cf7 NIFI-12697 Allow disabling scientific notation when writing 
JSON
7681054cf7 is described below

commit 7681054cf7ad82b20f0d589957f37b1b5aeff4d1
Author: Mark Payne 
AuthorDate: Tue Jan 30 09:50:32 2024 -0500

NIFI-12697 Allow disabling scientific notation when writing JSON

Use Jackson's internal implementations for parsing big integers and 
floating-point numbers more efficiently

Addressed case where JSON Writer configured to not allow scientific 
notation, but receives a record that already has a SerializedForm using 
scientific notation.

This closes #8319

Signed-off-by: David Handermann 
---
 .../nifi/json/AbstractJsonRowRecordReader.java |  3 +
 .../java/org/apache/nifi/json/WriteJsonResult.java | 79 +-
 .../org/apache/nifi/json/JsonRecordSetWriter.java  | 39 ---
 .../org/apache/nifi/json/TestWriteJsonResult.java  | 79 +-
 4 files changed, 173 insertions(+), 27 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-json-record-utils/src/main/java/org/apache/nifi/json/AbstractJsonRowRecordReader.java
 
b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-json-record-utils/src/main/java/org/apache/nifi/json/AbstractJsonRowRecordReader.java
index 6daf71a491..58a41cdfb8 100644
--- 
a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-json-record-utils/src/main/java/org/apache/nifi/json/AbstractJsonRowRecordReader.java
+++ 
b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-json-record-utils/src/main/java/org/apache/nifi/json/AbstractJsonRowRecordReader.java
@@ -19,6 +19,7 @@ package org.apache.nifi.json;
 
 import com.fasterxml.jackson.core.JsonParseException;
 import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonParser.Feature;
 import com.fasterxml.jackson.core.JsonToken;
 import com.fasterxml.jackson.core.StreamReadConstraints;
 import com.fasterxml.jackson.databind.JsonNode;
@@ -138,6 +139,8 @@ public abstract class AbstractJsonRowRecordReader 
implements RecordReader {
 try {
 final StreamReadConstraints configuredStreamReadConstraints = 
streamReadConstraints == null ? DEFAULT_STREAM_READ_CONSTRAINTS : 
streamReadConstraints;
 jsonParser = tokenParserFactory.getJsonParser(in, 
configuredStreamReadConstraints, allowComments);
+jsonParser.enable(Feature.USE_FAST_DOUBLE_PARSER);
+jsonParser.enable(Feature.USE_FAST_BIG_NUMBER_PARSER);
 
 if (strategy == StartingFieldStrategy.NESTED_FIELD) {
 while (jsonParser.nextToken() != null) {
diff --git 
a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-json-record-utils/src/main/java/org/apache/nifi/json/WriteJsonResult.java
 
b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-json-record-utils/src/main/java/org/apache/nifi/json/WriteJsonResult.java
index 065c43823e..11408f237f 100644
--- 
a/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-json-record-utils/src/main/java/org/apache/nifi/json/WriteJsonResult.java
+++ 
b/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-json-record-utils/src/main/java/org/apache/nifi/json/WriteJsonResult.java
@@ -19,6 +19,7 @@ package org.apache.nifi.json;
 
 import com.fasterxml.jackson.core.JsonFactory;
 import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonGenerator.Feature;
 import com.fasterxml.jackson.core.util.MinimalPrettyPrinter;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.nifi.NullSuppression;
@@ -48,9 +49,11 @@ import java.math.BigInteger;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
+import java.util.regex.Pattern;
 
 public class WriteJsonResult extends AbstractRecordSetWriter implements 
RecordSetWriter, RawRecordWriter {
 private static final FieldConverter STRING_FIELD_CONVERTER 
= StandardFieldConverterRegistry.getRegistry().getFieldConverter(String.class);
+private static final Pattern SCIENTIFIC_NOTATION_PATTERN = 
Pattern.compile("[0-9]([eE][-+]?)[0-9]");
 
 private final ComponentLog logger;
 private final SchemaAccessWriter schemaAccess;
@@ -63,17 +66,18 @@ public class WriteJsonResult extends 
AbstractRecordSetWriter implements RecordSe
 private final String timestampFormat;
 private final String mimeType;
 private final boolean prettyPrint;
+private final boolean allowScientificNotation;
 
 private static final ObjectMapper objectMapper = new ObjectMapper();
 
 public WriteJsonResult(final ComponentLog logger, final RecordSchema 
recordSchema, final SchemaAccessWriter schemaAccess, final OutputStream 

(nifi) branch main updated: NIFI-12796 - PutDatabaseRecord statement type should support u/c/d for Debezium This closes #8412.

2024-02-20 Thread joewitt
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 abc08eb842 NIFI-12796 - PutDatabaseRecord statement type should 
support u/c/d for Debezium This closes #8412.
abc08eb842 is described below

commit abc08eb842afe7a033a20fbeb94a08be264b0512
Author: Pierre Villard 
AuthorDate: Wed Feb 14 23:06:02 2024 -0500

NIFI-12796 - PutDatabaseRecord statement type should support u/c/d for 
Debezium
This closes #8412.

Signed-off-by: Joseph Witt 
---
 .../org/apache/nifi/processors/standard/PutDatabaseRecord.java | 10 +-
 .../apache/nifi/processors/standard/PutDatabaseRecordTest.java |  5 +++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
index b12d2c869f..1f60208f40 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java
@@ -183,7 +183,8 @@ public class PutDatabaseRecord extends AbstractProcessor {
 static final PropertyDescriptor STATEMENT_TYPE_RECORD_PATH = new Builder()
 .name("Statement Type Record Path")
 .displayName("Statement Type Record Path")
-.description("Specifies a RecordPath to evaluate against each Record 
in order to determine the Statement Type. The RecordPath should equate to 
either INSERT, UPDATE, UPSERT, or DELETE.")
+.description("Specifies a RecordPath to evaluate against each Record 
in order to determine the Statement Type. The RecordPath should equate to 
either INSERT, UPDATE, UPSERT, or DELETE. "
++ "(Debezium style operation types are also supported: \"r\" 
and \"c\" for INSERT, \"u\" for UPDATE, and \"d\" for DELETE)")
 .required(true)
 .addValidator(new RecordPathValidator())
 .expressionLanguageSupported(NONE)
@@ -1555,6 +1556,13 @@ public class PutDatabaseRecord extends AbstractProcessor 
{
 case DELETE_TYPE:
 case UPSERT_TYPE:
 return resultValue;
+case "C":
+case "R":
+return INSERT_TYPE;
+case "U":
+return UPDATE_TYPE;
+case "D":
+return DELETE_TYPE;
 }
 
 throw new ProcessException("Evaluated RecordPath " + 
recordPath.getPath() + " against Record to determine Statement Type but found 
invalid value: " + resultValue);
diff --git 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/PutDatabaseRecordTest.java
 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/PutDatabaseRecordTest.java
index 107db3f688..e6483efc7f 100644
--- 
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/PutDatabaseRecordTest.java
+++ 
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/PutDatabaseRecordTest.java
@@ -1311,9 +1311,10 @@ public class PutDatabaseRecordTest {
 // CREATE, CREATE, CREATE, DELETE, UPDATE
 parser.addRecord("INSERT", new MapRecord(dataSchema, createValues(1, 
"John Doe", 55)));
 parser.addRecord("INSERT", new MapRecord(dataSchema, createValues(2, 
"Jane Doe", 44)));
-parser.addRecord("INSERT", new MapRecord(dataSchema, createValues(3, 
"Jim Doe", 2)));
+parser.addRecord("c", new MapRecord(dataSchema, createValues(3, "Jim 
Doe", 2)));
 parser.addRecord("DELETE", new MapRecord(dataSchema, createValues(2, 
"Jane Doe", 44)));
 parser.addRecord("UPDATE", new MapRecord(dataSchema, createValues(1, 
"John Doe", 201)));
+parser.addRecord("u", new MapRecord(dataSchema, createValues(3, "Jim 
Doe", 20)));
 
 runner.setProperty(PutDatabaseRecord.RECORD_READER_FACTORY, "parser");
 runner.setProperty(PutDatabaseRecord.STATEMENT_TYPE, 
PutDatabaseRecord.USE_RECORD_PATH);
@@ -1337,7 +1338,7 @@ public class PutDatabaseRecordTest {
 assertTrue(rs.next());
 assertEquals(3, rs.getInt(1));
 assertEquals("Jim Doe", rs.getString(2));
-assertEquals(2, rs.getInt(3));
+assertEquals(20, rs.getInt(3));
 assertFalse(rs.next());
 
 stmt.close();



(nifi) branch support/nifi-1.x updated: NIFI-12818 Deprecated ReportLineageToAtlas for Removal This closes #8426.

2024-02-20 Thread joewitt
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 d5385c298d NIFI-12818 Deprecated ReportLineageToAtlas for Removal This 
closes #8426.
d5385c298d is described below

commit d5385c298dd79110fd4c8546daa0e3e953a7cd2b
Author: exceptionfactory 
AuthorDate: Mon Feb 19 14:29:02 2024 -0600

NIFI-12818 Deprecated ReportLineageToAtlas for Removal
This closes #8426.

Signed-off-by: Joseph Witt 
---
 .../main/java/org/apache/nifi/atlas/reporting/ReportLineageToAtlas.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/nifi-nar-bundles/nifi-atlas-bundle/nifi-atlas-reporting-task/src/main/java/org/apache/nifi/atlas/reporting/ReportLineageToAtlas.java
 
b/nifi-nar-bundles/nifi-atlas-bundle/nifi-atlas-reporting-task/src/main/java/org/apache/nifi/atlas/reporting/ReportLineageToAtlas.java
index d0359fa1e0..ee3d533b45 100644
--- 
a/nifi-nar-bundles/nifi-atlas-bundle/nifi-atlas-reporting-task/src/main/java/org/apache/nifi/atlas/reporting/ReportLineageToAtlas.java
+++ 
b/nifi-nar-bundles/nifi-atlas-bundle/nifi-atlas-reporting-task/src/main/java/org/apache/nifi/atlas/reporting/ReportLineageToAtlas.java
@@ -30,6 +30,7 @@ import org.apache.nifi.annotation.behavior.DynamicProperty;
 import org.apache.nifi.annotation.behavior.RequiresInstanceClassLoading;
 import org.apache.nifi.annotation.behavior.Stateful;
 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.annotation.lifecycle.OnScheduled;
 import org.apache.nifi.annotation.lifecycle.OnStopped;
@@ -107,6 +108,7 @@ import static org.apache.commons.lang3.StringUtils.isEmpty;
 import static 
org.apache.nifi.reporting.util.provenance.ProvenanceEventConsumer.PROVENANCE_BATCH_SIZE;
 import static 
org.apache.nifi.reporting.util.provenance.ProvenanceEventConsumer.PROVENANCE_START_POSITION;
 
+@DeprecationNotice(reason = "Planned for removal in NiFi 2.0")
 @Tags({"atlas", "lineage"})
 @CapabilityDescription("Report NiFi flow data set level lineage to Apache 
Atlas." +
 " End-to-end lineages across NiFi environments and other systems can 
be reported if those are" +



(nifi) 01/03: NIFI-12820 Upgraded Email Processors to Jakarta Mail 2 This closes #8428.

2024-02-20 Thread joewitt
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

commit ff4c187f860e332640bd1a10d09fd435d286e3f1
Author: exceptionfactory 
AuthorDate: Mon Feb 19 20:18:09 2024 -0600

NIFI-12820 Upgraded Email Processors to Jakarta Mail 2
This closes #8428.

- Upgraded from Java Mail 1.4.7 to Jakarta Mail API 2.1.2
- Upgraded Spring Integration from 5.5.20 to 6.2.1
- Upgraded SubEtha SMTP from 3.1.7 to 7.0.1
- Upgraded Greenmail from 1.6.15 to 2.0.1
- Removed usage of Commons Lang3
- Removed usage of Commons IO

Signed-off-by: Joseph Witt 
---
 .../nifi-email-processors/pom.xml  | 102 ++--
 .../processors/email/AbstractEmailProcessor.java   |  51 ++
 .../apache/nifi/processors/email/ConsumeIMAP.java  |  18 +-
 .../apache/nifi/processors/email/ConsumePOP3.java  |  21 +--
 .../processors/email/ExtractEmailAttachments.java  | 183 ++---
 .../nifi/processors/email/ExtractEmailHeaders.java | 168 +--
 .../processors/email/ExtractTNEFAttachments.java   | 133 +--
 .../apache/nifi/processors/email/ListenSMTP.java   | 142 +---
 .../nifi/processors/email/smtp/SmtpConsumer.java   |  39 ++---
 .../nifi/processors/email/GenerateAttachment.java  | 131 +++
 ...TestConsumeEmail.java => TestConsumeEmail.java} |  36 +---
 .../email/TestExtractEmailAttachments.java |  33 ++--
 .../processors/email/TestExtractEmailHeaders.java  |  72 ++--
 .../nifi/processors/email/TestListenSMTP.java  |  12 +-
 pom.xml|   1 -
 15 files changed, 443 insertions(+), 699 deletions(-)

diff --git a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml 
b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml
index ddb94f1b2b..c6a4930dbb 100644
--- a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/pom.xml
@@ -25,7 +25,7 @@
 nifi-email-processors
 jar
 
-5.5.20
+6.2.1
 5.2.5
 
 
@@ -37,103 +37,95 @@
 
 org.apache.nifi
 nifi-utils
-2.0.0-SNAPSHOT
 
 
 org.apache.nifi
-nifi-security-cert
-2.0.0-SNAPSHOT
+nifi-ssl-context-service-api
 
 
 org.apache.nifi
 nifi-oauth2-provider-api
-2.0.0-SNAPSHOT
-
-
-javax.mail
-mail
-1.4.7
-
-
-org.apache.commons
-commons-email
-1.6.0
-
-
-com.sun.mail
-javax.mail
-
-
-
-
-commons-io
-commons-io
 
 
-org.apache.commons
-commons-lang3
+jakarta.mail
+jakarta.mail-api
+2.1.2
 
 
-com.sun.mail
-javax.mail
-1.6.2
+org.eclipse.angus
+angus-mail
+2.0.2
 
 
-org.subethamail
+com.github.davidmoten
 subethasmtp
-3.1.7
-
-
-com.google.code.findbugs
-jsr305
-
-
-javax.mail
-mail
-
-
-
-
-com.github.stephenc.findbugs
-findbugs-annotations
-1.3.9-1
-
-
-org.apache.nifi
-nifi-ssl-context-service-api
+7.0.1
 
 
 org.springframework.integration
 spring-integration-mail
 ${spring.integration.version}
 
+
 
 org.springframework.retry
 spring-retry
 
+
+org.springframework
+spring-aop
+
+
+org.springframework
+spring-tx
+
+
+org.springframework
+spring-context-support
+
+
+io.projectreactor
+reactor-core
+
+
+io.micrometer
+micrometer-observation
+
 
 
+
 
 org.apache.poi
 poi-scratchpad
 ${poi.version}
+
+
+org.apache.commons
+commons-math3
+
+
+

(nifi) 03/03: NIFI-12817 Moved Hadoop DBCP NAR to Hadoop Build Profile This closes #8425.

2024-02-20 Thread joewitt
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

commit 27f8b98e9a64e544e0158b36700091610389dea5
Author: exceptionfactory 
AuthorDate: Mon Feb 19 13:53:50 2024 -0600

NIFI-12817 Moved Hadoop DBCP NAR to Hadoop Build Profile
This closes #8425.

Signed-off-by: Joseph Witt 
---
 nifi-assembly/pom.xml | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/nifi-assembly/pom.xml b/nifi-assembly/pom.xml
index ec602f141b..5d521e1152 100644
--- a/nifi-assembly/pom.xml
+++ b/nifi-assembly/pom.xml
@@ -368,12 +368,6 @@ language governing permissions and limitations under the 
License. -->
 2.0.0-SNAPSHOT
 nar
 
-
-org.apache.nifi
-nifi-hadoop-dbcp-service-nar
-2.0.0-SNAPSHOT
-nar
-
 
 org.apache.nifi
 nifi-mongodb-client-service-api-nar
@@ -1003,6 +997,12 @@ language governing permissions and limitations under the 
License. -->
 2.0.0-SNAPSHOT
 nar
 
+
+org.apache.nifi
+nifi-hadoop-dbcp-service-nar
+2.0.0-SNAPSHOT
+nar
+
 
 org.apache.nifi
 nifi-parquet-nar



(nifi) 02/03: NIFI-12821 Set docker-maven-plugin version to 0.43.4 This closes #8429.

2024-02-20 Thread joewitt
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

commit 1124728ff73c8fdb2cf6683d3a1f0686ef9b093b
Author: exceptionfactory 
AuthorDate: Mon Feb 19 20:53:04 2024 -0600

NIFI-12821 Set docker-maven-plugin version to 0.43.4
This closes #8429.

- Reduced docker-tests timeout from 120 to 60 minutes

Signed-off-by: Joseph Witt 
---
 .github/workflows/docker-tests.yml | 5 +
 pom.xml| 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/docker-tests.yml 
b/.github/workflows/docker-tests.yml
index 9a2161a75b..fc36cc981b 100644
--- a/.github/workflows/docker-tests.yml
+++ b/.github/workflows/docker-tests.yml
@@ -16,7 +16,6 @@
 name: docker-tests
 
 on:
-  # Run every day at 02:00
   schedule:
 - cron: "0 2 * * *"
   push:
@@ -59,7 +58,6 @@ env:
 -ntp
 -ff
 
-# build assemblies (including binaries) for use in Docker Image builds
   MAVEN_BUILD_ARGUMENTS: >-
 -am
 -D skipTests
@@ -82,7 +80,6 @@ env:
 -pl -nifi-toolkit/nifi-toolkit-encrypt-config
 -pl -minifi/minifi-assembly
 
-# build and test Docker Images
   MAVEN_DOCKER_ARGUMENTS: >-
 verify
 -P docker
@@ -100,7 +97,7 @@ permissions:
 
 jobs:
   build_and_test:
-timeout-minutes: 120
+timeout-minutes: 60
 runs-on: ubuntu-latest
 name: Ubuntu Java 21
 steps:
diff --git a/pom.xml b/pom.xml
index bee1d2ff27..6f0372489e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -884,6 +884,7 @@
 
 io.fabric8
 docker-maven-plugin
+0.43.4
 
 
 org.codehaus.mojo



(nifi) branch main updated (fcbd7c690b -> 27f8b98e9a)

2024-02-20 Thread joewitt
This is an automated email from the ASF dual-hosted git repository.

joewitt pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


from fcbd7c690b NIFI-12644 Exported json flows does not match minifi json 
schema resolved by adding new method transform-nifi to convert Nifi Flow json 
to MiNifi flow json #8393
 new ff4c187f86 NIFI-12820 Upgraded Email Processors to Jakarta Mail 2 This 
closes #8428.
 new 1124728ff7 NIFI-12821 Set docker-maven-plugin version to 0.43.4 This 
closes #8429.
 new 27f8b98e9a NIFI-12817 Moved Hadoop DBCP NAR to Hadoop Build Profile 
This closes #8425.

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:
 .github/workflows/docker-tests.yml |   5 +-
 nifi-assembly/pom.xml  |  12 +-
 .../nifi-email-processors/pom.xml  | 102 ++--
 .../processors/email/AbstractEmailProcessor.java   |  51 ++
 .../apache/nifi/processors/email/ConsumeIMAP.java  |  18 +-
 .../apache/nifi/processors/email/ConsumePOP3.java  |  21 +--
 .../processors/email/ExtractEmailAttachments.java  | 183 ++---
 .../nifi/processors/email/ExtractEmailHeaders.java | 168 +--
 .../processors/email/ExtractTNEFAttachments.java   | 133 +--
 .../apache/nifi/processors/email/ListenSMTP.java   | 142 +---
 .../nifi/processors/email/smtp/SmtpConsumer.java   |  39 ++---
 .../nifi/processors/email/GenerateAttachment.java  | 131 +++
 ...TestConsumeEmail.java => TestConsumeEmail.java} |  36 +---
 .../email/TestExtractEmailAttachments.java |  33 ++--
 .../processors/email/TestExtractEmailHeaders.java  |  72 ++--
 .../nifi/processors/email/TestListenSMTP.java  |  12 +-
 pom.xml|   2 +-
 17 files changed, 451 insertions(+), 709 deletions(-)
 rename 
nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/{ITestConsumeEmail.java
 => TestConsumeEmail.java} (82%)



(nifi) branch main updated: NIFI-12644 Exported json flows does not match minifi json schema resolved by adding new method transform-nifi to convert Nifi Flow json to MiNifi flow json #8393

2024-02-20 Thread briansolo1985
This is an automated email from the ASF dual-hosted git repository.

briansolo1985 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 fcbd7c690b NIFI-12644 Exported json flows does not match minifi json 
schema resolved by adding new method transform-nifi to convert Nifi Flow json 
to MiNifi flow json #8393
fcbd7c690b is described below

commit fcbd7c690b7b30e5749c35abac0583ffd375ccdf
Author: AjayPremarajan 
AuthorDate: Tue Feb 20 09:36:36 2024 +0100

NIFI-12644 Exported json flows does not match minifi json schema resolved 
by adding new method transform-nifi to convert Nifi Flow json to MiNifi flow 
json #8393

Signed-off-by: Ferenc Kis 

This closes #8393.
---
 .../minifi/toolkit/configuration/ConfigMain.java   |  18 +++-
 .../configuration/json/ObjectMapperUtils.java  |  36 
 .../json/TransformNifiCommandFactory.java  | 102 +
 .../json/TransformYamlCommandFactory.java  |  18 +---
 4 files changed, 156 insertions(+), 18 deletions(-)

diff --git 
a/minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
 
b/minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
index 91ad1114ad..4588e181f6 100644
--- 
a/minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
+++ 
b/minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/ConfigMain.java
@@ -18,11 +18,15 @@
 package org.apache.nifi.minifi.toolkit.configuration;
 
 import static 
org.apache.nifi.minifi.toolkit.configuration.json.TransformYamlCommandFactory.TRANSFORM_YML;
+import static 
org.apache.nifi.minifi.toolkit.configuration.json.TransformNifiCommandFactory.TRANSFORM_NIFI;
 
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.util.Map;
+import java.util.TreeMap;
 import java.util.function.Function;
+
+import 
org.apache.nifi.minifi.toolkit.configuration.json.TransformNifiCommandFactory;
 import 
org.apache.nifi.minifi.toolkit.configuration.json.TransformYamlCommandFactory;
 
 public class ConfigMain {
@@ -41,9 +45,7 @@ public class ConfigMain {
 public ConfigMain(PathInputStreamFactory pathInputStreamFactory, 
PathOutputStreamFactory pathOutputStreamFactory) {
 this.pathInputStreamFactory = pathInputStreamFactory;
 this.pathOutputStreamFactory = pathOutputStreamFactory;
-this.commandMap = Map.of(
-TRANSFORM_YML, new 
TransformYamlCommandFactory(pathInputStreamFactory, 
pathOutputStreamFactory).create()
-);
+this.commandMap = createCommandMap();
 }
 
 public static void main(String[] args) {
@@ -65,7 +67,6 @@ public class ConfigMain {
 commandMap.forEach((s, command) -> System.out.println(s + ": " + 
command.description));
 }
 
-
 public static class Command {
 private final Function function;
 private final String description;
@@ -75,4 +76,13 @@ public class ConfigMain {
 this.description = description;
 }
 }
+
+public Map createCommandMap() {
+Map result = new TreeMap<>();
+result.put(TRANSFORM_YML,
+new TransformYamlCommandFactory(pathInputStreamFactory, 
pathOutputStreamFactory).create());
+result.put(TRANSFORM_NIFI,
+new TransformNifiCommandFactory(pathInputStreamFactory, 
pathOutputStreamFactory).create());
+return result;
+}
 }
diff --git 
a/minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/json/ObjectMapperUtils.java
 
b/minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/json/ObjectMapperUtils.java
new file mode 100644
index 00..7d44aa5c64
--- /dev/null
+++ 
b/minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/json/ObjectMapperUtils.java
@@ -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