You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jo...@apache.org on 2022/04/21 18:24:21 UTC

[nifi] branch support/nifi-1.16 updated (ed7c3de115 -> 958baa0bba)

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

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


    from ed7c3de115 NIFI-9901 fixing version references
     new 99f5f96ed1 NIFI-9883 Updated Ranger assembly exclude property protection modules
     new 958baa0bba NIFI-9941 - fix handling of ReportingTask stop request

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-assembly/src/main/assembly/ranger.xml                     |  2 ++
 .../org/apache/nifi/controller/scheduling/LifecycleState.java  | 10 +++++++++-
 .../org/apache/nifi/controller/tasks/ReportingTaskWrapper.java |  4 +++-
 .../src/test/resources/conf/clustered/node1/nifi.properties    |  2 +-
 .../src/test/resources/conf/clustered/node2/nifi.properties    |  2 +-
 .../src/test/resources/conf/default/nifi.properties            |  2 +-
 6 files changed, 17 insertions(+), 5 deletions(-)


[nifi] 01/02: NIFI-9883 Updated Ranger assembly exclude property protection modules

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

joewitt pushed a commit to branch support/nifi-1.16
in repository https://gitbox.apache.org/repos/asf/nifi.git

commit 99f5f96ed1e519b9fffa0da8eae20866d69f5b9f
Author: Bryan Bende <bb...@gmail.com>
AuthorDate: Thu Apr 21 12:36:07 2022 -0400

    NIFI-9883 Updated Ranger assembly exclude property protection modules
    
    This closes #5987
    
    Signed-off-by: David Handermann <ex...@apache.org>
---
 nifi-assembly/src/main/assembly/ranger.xml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/nifi-assembly/src/main/assembly/ranger.xml b/nifi-assembly/src/main/assembly/ranger.xml
index 9e22688fa3..aaf2ace89d 100644
--- a/nifi-assembly/src/main/assembly/ranger.xml
+++ b/nifi-assembly/src/main/assembly/ranger.xml
@@ -39,6 +39,8 @@
             <excludes>
                 <exclude>nifi-bootstrap-utils</exclude>
                 <exclude>nifi-bootstrap</exclude>
+                <exclude>nifi-property-protection-api</exclude>
+                <exclude>nifi-property-protection-factory</exclude>
                 <exclude>nifi-resources</exclude>
                 <exclude>nifi-docs</exclude>
                 <exclude>org.apache.nifi:nifi-ranger-resources:jar</exclude>


[nifi] 02/02: NIFI-9941 - fix handling of ReportingTask stop request

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

joewitt pushed a commit to branch support/nifi-1.16
in repository https://gitbox.apache.org/repos/asf/nifi.git

commit 958baa0bba657cc9b8b8b58e14c13e5b836e0344
Author: Paul Grey <gr...@yahoo.com>
AuthorDate: Wed Apr 20 15:06:04 2022 -0400

    NIFI-9941 - fix handling of ReportingTask stop request
    
    Signed-off-by: Matthew Burgess <ma...@apache.org>
    
    This closes #5985
---
 .../org/apache/nifi/controller/scheduling/LifecycleState.java  | 10 +++++++++-
 .../org/apache/nifi/controller/tasks/ReportingTaskWrapper.java |  4 +++-
 .../src/test/resources/conf/clustered/node1/nifi.properties    |  2 +-
 .../src/test/resources/conf/clustered/node2/nifi.properties    |  2 +-
 .../src/test/resources/conf/default/nifi.properties            |  2 +-
 5 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/scheduling/LifecycleState.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/scheduling/LifecycleState.java
index c5b78c95fd..7aecae33ca 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/scheduling/LifecycleState.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/scheduling/LifecycleState.java
@@ -40,6 +40,14 @@ public class LifecycleState {
     private volatile boolean terminated = false;
     private final Map<ActiveProcessSessionFactory, Object> activeProcessSessionFactories = new WeakHashMap<>();
 
+    public synchronized boolean tryIncrementActiveThreadCount(final ActiveProcessSessionFactory sessionFactory) {
+        if ((terminated) || (!scheduled.get())) {
+            return false;
+        }
+        incrementActiveThreadCount(sessionFactory);
+        return true;
+    }
+
     public synchronized int incrementActiveThreadCount(final ActiveProcessSessionFactory sessionFactory) {
         if (terminated) {
             throw new TerminatedTaskException();
@@ -80,7 +88,7 @@ public class LifecycleState {
         return scheduled.get();
     }
 
-    public void setScheduled(final boolean scheduled) {
+    public synchronized void setScheduled(final boolean scheduled) {
         this.scheduled.set(scheduled);
         mustCallOnStoppedMethods.set(true);
 
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ReportingTaskWrapper.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ReportingTaskWrapper.java
index 58ce022501..b42a47e546 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ReportingTaskWrapper.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ReportingTaskWrapper.java
@@ -39,7 +39,9 @@ public class ReportingTaskWrapper implements Runnable {
 
     @Override
     public synchronized void run() {
-        lifecycleState.incrementActiveThreadCount(null);
+        if (!lifecycleState.tryIncrementActiveThreadCount(null)) {
+            return;
+        }
         try (final NarCloseable narCloseable = NarCloseable.withComponentNarLoader(extensionManager, taskNode.getReportingTask().getClass(), taskNode.getIdentifier())) {
             taskNode.getReportingTask().onTrigger(taskNode.getReportingContext());
         } catch (final Throwable t) {
diff --git a/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/clustered/node1/nifi.properties b/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/clustered/node1/nifi.properties
index 071f863a0f..4544f2fc3b 100644
--- a/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/clustered/node1/nifi.properties
+++ b/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/clustered/node1/nifi.properties
@@ -84,7 +84,7 @@ nifi.content.viewer.url=../nifi-content-viewer/
 
 # Provenance Repository Properties
 nifi.provenance.repository.implementation=org.apache.nifi.provenance.WriteAheadProvenanceRepository
-nifi.provenance.repository.debug.frequency=1_000_000
+nifi.provenance.repository.debug.frequency=1000000
 
 # Persistent Provenance Repository Properties
 nifi.provenance.repository.directory.default=./provenance_repository
diff --git a/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/clustered/node2/nifi.properties b/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/clustered/node2/nifi.properties
index 4420403e9c..acd5c6707c 100644
--- a/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/clustered/node2/nifi.properties
+++ b/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/clustered/node2/nifi.properties
@@ -84,7 +84,7 @@ nifi.content.viewer.url=../nifi-content-viewer/
 
 # Provenance Repository Properties
 nifi.provenance.repository.implementation=org.apache.nifi.provenance.WriteAheadProvenanceRepository
-nifi.provenance.repository.debug.frequency=1_000_000
+nifi.provenance.repository.debug.frequency=1000000
 
 # Persistent Provenance Repository Properties
 nifi.provenance.repository.directory.default=./provenance_repository
diff --git a/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/default/nifi.properties b/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/default/nifi.properties
index 27ad177583..7b3de1452f 100644
--- a/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/default/nifi.properties
+++ b/nifi-system-tests/nifi-system-test-suite/src/test/resources/conf/default/nifi.properties
@@ -84,7 +84,7 @@ nifi.content.viewer.url=../nifi-content-viewer/
 
 # Provenance Repository Properties
 nifi.provenance.repository.implementation=org.apache.nifi.provenance.WriteAheadProvenanceRepository
-nifi.provenance.repository.debug.frequency=1_000_000
+nifi.provenance.repository.debug.frequency=1000000
 
 # Persistent Provenance Repository Properties
 nifi.provenance.repository.directory.default=./provenance_repository