You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ex...@apache.org on 2022/07/01 00:12:55 UTC

[nifi] branch main updated (943197c18b -> 26a10d772f)

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 943197c18b NIFI-10163 - Corrected StandardProcessSession.exportTo() byte counting - Removed bytesWritten incrementing from exportTo methods
     new 1f18345929 NIFI-10163 Corrected StandardProcessSessionTest after NIFI-10167
     new 26a10d772f NIFI-10186 Corrected PutFTP Remote Path Property EL

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/controller/repository/StandardProcessSessionTest.java   | 9 +++++++--
 .../main/java/org/apache/nifi/processors/standard/PutFTP.java    | 8 +++++++-
 2 files changed, 14 insertions(+), 3 deletions(-)


[nifi] 02/02: NIFI-10186 Corrected PutFTP Remote Path Property EL

Posted by ex...@apache.org.
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 26a10d772f3b552d460a55634107cb3022a490cd
Author: Paul Grey <gr...@yahoo.com>
AuthorDate: Thu Jun 30 15:03:40 2022 -0400

    NIFI-10186 Corrected PutFTP Remote Path Property EL
    
    This closes #6173
    
    Signed-off-by: David Handermann <ex...@apache.org>
---
 .../src/main/java/org/apache/nifi/processors/standard/PutFTP.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFTP.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFTP.java
index 50ae599b6f..e26ec43cf8 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFTP.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFTP.java
@@ -39,6 +39,7 @@ import org.apache.nifi.annotation.lifecycle.OnScheduled;
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.components.ValidationContext;
 import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.expression.ExpressionLanguageScope;
 import org.apache.nifi.flowfile.FlowFile;
 import org.apache.nifi.processor.ProcessContext;
 import org.apache.nifi.processor.ProcessorInitializationContext;
@@ -71,6 +72,11 @@ public class PutFTP extends PutFileTransfer<FTPTransfer> {
 
     private List<PropertyDescriptor> properties;
 
+    // PutFileTransfer.onTrigger() uses FlowFile attributes
+    public static final PropertyDescriptor REMOTE_PATH = new PropertyDescriptor.Builder()
+            .fromPropertyDescriptor(FTPTransfer.REMOTE_PATH)
+            .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES).build();
+
     @Override
     protected void init(final ProcessorInitializationContext context) {
         final List<PropertyDescriptor> properties = new ArrayList<>();
@@ -78,7 +84,7 @@ public class PutFTP extends PutFileTransfer<FTPTransfer> {
         properties.add(FTPTransfer.PORT);
         properties.add(FTPTransfer.USERNAME);
         properties.add(FTPTransfer.PASSWORD);
-        properties.add(FTPTransfer.REMOTE_PATH);
+        properties.add(REMOTE_PATH);
         properties.add(FTPTransfer.CREATE_DIRECTORY);
         properties.add(FTPTransfer.BATCH_SIZE);
         properties.add(FTPTransfer.CONNECTION_TIMEOUT);


[nifi] 01/02: NIFI-10163 Corrected StandardProcessSessionTest after NIFI-10167

Posted by ex...@apache.org.
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 1f18345929bcf60047010b1584366f3981ca8494
Author: exceptionfactory <ex...@apache.org>
AuthorDate: Thu Jun 30 19:10:57 2022 -0500

    NIFI-10163 Corrected StandardProcessSessionTest after NIFI-10167
---
 .../nifi/controller/repository/StandardProcessSessionTest.java   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/controller/repository/StandardProcessSessionTest.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/controller/repository/StandardProcessSessionTest.java
index a7c6b921d3..d700b94111 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/controller/repository/StandardProcessSessionTest.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/java/org/apache/nifi/controller/repository/StandardProcessSessionTest.java
@@ -20,6 +20,7 @@ import org.apache.nifi.connectable.Connectable;
 import org.apache.nifi.controller.lifecycle.TaskTermination;
 import org.apache.nifi.controller.repository.claim.ContentClaim;
 import org.apache.nifi.controller.repository.claim.ContentClaimWriteCache;
+import org.apache.nifi.controller.repository.metrics.PerformanceTracker;
 import org.apache.nifi.flowfile.FlowFile;
 import org.apache.nifi.processor.ProcessSession;
 import org.apache.nifi.provenance.InternalProvenanceReporter;
@@ -43,6 +44,7 @@ import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -91,6 +93,9 @@ class StandardProcessSessionTest {
     @Mock
     ContentRepository contentRepository;
 
+    @Mock
+    PerformanceTracker performanceTracker;
+
     @Captor
     ArgumentCaptor<FlowFileEvent> flowFileEventCaptor;
 
@@ -99,11 +104,11 @@ class StandardProcessSessionTest {
     @BeforeEach
     void setSession() {
         when(repositoryContext.createProvenanceReporter(any(), any())).thenReturn(provenanceReporter);
-        when(repositoryContext.createContentClaimWriteCache()).thenReturn(contentClaimWriteCache);
+        when(repositoryContext.createContentClaimWriteCache(isA(PerformanceTracker.class))).thenReturn(contentClaimWriteCache);
         when(repositoryContext.getConnectable()).thenReturn(connectable);
         when(connectable.getIdentifier()).thenReturn(Connectable.class.getSimpleName());
 
-        session = new StandardProcessSession(repositoryContext, taskTermination);
+        session = new StandardProcessSession(repositoryContext, taskTermination, performanceTracker);
     }
 
     @Test