You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by js...@apache.org on 2017/04/27 19:00:02 UTC
[1/2] nifi git commit: NIFI-3553: If IOException is thrown when
completing FTP transfer,
do not update the FlowFile to point to the content that was streamed but
instead leave FlowFile pointing to original version
Repository: nifi
Updated Branches:
refs/heads/0.x cd1cf68c9 -> b69b3b6c6
NIFI-3553: If IOException is thrown when completing FTP transfer, do not update the FlowFile to point to the content that was streamed but instead leave FlowFile pointing to original version
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/c1e65f95
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/c1e65f95
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/c1e65f95
Branch: refs/heads/0.x
Commit: c1e65f95bd9951390215c8ef7e2b25cf95f8b5f1
Parents: cd1cf68
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri Mar 3 13:18:41 2017 -0500
Committer: Joe Skora <js...@apache.org>
Committed: Thu Apr 27 14:56:14 2017 -0400
----------------------------------------------------------------------
.../org/apache/nifi/processors/standard/FetchFileTransfer.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/c1e65f95/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchFileTransfer.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchFileTransfer.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchFileTransfer.java
index a7ae5ef..6182b0a 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchFileTransfer.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchFileTransfer.java
@@ -239,9 +239,9 @@ public abstract class FetchFileTransfer extends AbstractProcessor {
@Override
public void process(final OutputStream out) throws IOException {
StreamUtils.copy(in, out);
+ transfer.flush();
}
});
- transfer.flush();
transferQueue.offer(new FileTransferIdleWrapper(transfer, System.nanoTime()));
} catch (final FileNotFoundException e) {
getLogger().error("Failed to fetch content for {} from filename {} on remote host {} because the file could not be found on the remote system; routing to {}",
@@ -255,14 +255,14 @@ public abstract class FetchFileTransfer extends AbstractProcessor {
session.transfer(session.penalize(flowFile), REL_PERMISSION_DENIED);
session.getProvenanceReporter().route(flowFile, REL_PERMISSION_DENIED);
return;
- } catch (final IOException e) {
+ } catch (final ProcessException | IOException e) {
try {
transfer.close();
} catch (final IOException e1) {
getLogger().warn("Failed to close connection to {}:{} due to {}", new Object[] {host, port, e.toString()}, e);
}
- getLogger().error("Failed to fetch content for {} from filename {} on remote host {}:{} due to {}; routing to failure",
+ getLogger().error("Failed to fetch content for {} from filename {} on remote host {}:{} due to {}; routing to comms.failure",
new Object[] {flowFile, filename, host, port, e.toString()}, e);
session.transfer(session.penalize(flowFile), REL_COMMS_FAILURE);
return;
[2/2] nifi git commit: NIFI-3553 added final keyword for java 7
compatibility
Posted by js...@apache.org.
NIFI-3553 added final keyword for java 7 compatibility
Signed-off-by: Joe Skora <js...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/b69b3b6c
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/b69b3b6c
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/b69b3b6c
Branch: refs/heads/0.x
Commit: b69b3b6c622d27544df70e157f8d8b1531a881c6
Parents: c1e65f9
Author: Mike Moser <mo...@apache.org>
Authored: Fri Apr 21 19:00:53 2017 +0000
Committer: Joe Skora <js...@apache.org>
Committed: Thu Apr 27 14:59:38 2017 -0400
----------------------------------------------------------------------
.../org/apache/nifi/processors/standard/FetchFileTransfer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/b69b3b6c/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchFileTransfer.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchFileTransfer.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchFileTransfer.java
index 6182b0a..92106ae 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchFileTransfer.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/FetchFileTransfer.java
@@ -222,7 +222,7 @@ public abstract class FetchFileTransfer extends AbstractProcessor {
}
// we have a queue of FileTransfer Objects. Get one from the queue or create a new one.
- FileTransfer transfer;
+ final FileTransfer transfer;
FileTransferIdleWrapper transferWrapper = transferQueue.poll();
if (transferWrapper == null) {
transfer = createFileTransfer(context);