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 2020/09/28 20:19:08 UTC

[GitHub] [nifi] MuazmaZ commented on a change in pull request #4556: NIFI-7830: Support large files in PutAzureDataLakeStorage

MuazmaZ commented on a change in pull request #4556:
URL: https://github.com/apache/nifi/pull/4556#discussion_r496208116



##########
File path: nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureDataLakeStorage.java
##########
@@ -120,11 +122,29 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
 
                 final long length = flowFile.getSize();
                 if (length > 0) {
-                    try (final InputStream rawIn = session.read(flowFile); final BufferedInputStream in = new BufferedInputStream(rawIn)) {
-                        fileClient.append(in, 0, length);
+                    long chunkStart = 0;
+                    long chunkSize;
+
+                    try (final InputStream rawIn = session.read(flowFile);
+                         final BufferedInputStream in = new BufferedInputStream(rawIn) {
+                             @Override
+                             public int available() {
+                                 // com.azure.storage.common.Utility.convertStreamToByteBuffer() throws an exception
+                                 // if there are more available bytes in the stream after reading the chunk
+                                 return 0;

Review comment:
       @turcsanyip I am looking into this and I will respond by tomorrow based on the internal team's response.




----------------------------------------------------------------
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