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


##########
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:
   One additional note, use of `var` should be avoided in general, even when 
supported in the main branch.



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