You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/02/15 10:32:46 UTC

[GitHub] [nifi] timeabarna commented on a change in pull request #4815: NIFI-8200: Modifying PutAzureDataLakeStorage to delete temp file if e…

timeabarna commented on a change in pull request #4815:
URL: https://github.com/apache/nifi/pull/4815#discussion_r576091826



##########
File path: nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureDataLakeStorage.java
##########
@@ -126,6 +126,9 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
                 if (length > 0) {
                     try (final InputStream rawIn = session.read(flowFile); final BufferedInputStream bufferedIn = new BufferedInputStream(rawIn)) {
                         uploadContent(fileClient, bufferedIn, length);
+                    } catch (Exception e) {
+                        fileClient.delete();
+                        throw e;

Review comment:
       Thanks for your help, corrected in the next commit




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org