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


##########
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:
   This won't backport to 1.x because `var` wasn't introduced until Java 10 and 
we still have to support Java 8 on 1.x for now.



-- 
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: issues-unsubscr...@nifi.apache.org

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

Reply via email to