balazsgerner commented on code in PR #8544:
URL: https://github.com/apache/nifi/pull/8544#discussion_r1538866777


##########
nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/PutHDFS.java:
##########
@@ -397,10 +432,28 @@ public void process(InputStream in) throws IOException {
                                     fos = codec.createOutputStream(fos);
                                 }
                                 createdFile = actualCopyFile;
-                                BufferedInputStream bis = new 
BufferedInputStream(in);
-                                StreamUtils.copy(bis, fos);
-                                bis = null;
-                                fos.flush();
+
+                                final String appendMode = 
context.getProperty(APPEND_MODE).getValue();
+                                if (APPEND_RESOLUTION.equals(conflictResponse)
+                                        && AVRO_APPEND_MODE.equals(appendMode)
+                                        && destinationExists) {
+                                    getLogger().info("Appending avro record to 
existing avro file");
+                                    try (final var reader = new 
DataFileStream<>(in, new GenericDatumReader<>());

Review Comment:
   Noted, thank you for the feedback. Fixed in 
[04a1ed7](https://github.com/apache/nifi/pull/8544/commits/04a1ed711198fd0069e74253dacdb44b3346743c).



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to