You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/02/26 19:08:59 UTC

[GitHub] [hadoop] steveloughran commented on a change in pull request #1859: HADOOP-16885. Encryption zone file copy failure leaks temp file ._COP…

steveloughran commented on a change in pull request #1859: HADOOP-16885. Encryption zone file copy failure leaks temp file ._COP…
URL: https://github.com/apache/hadoop/pull/1859#discussion_r384702790
 
 

 ##########
 File path: hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
 ##########
 @@ -697,6 +700,20 @@ public FSDataOutputStream next(final FileSystem fs, final Path p)
     }.resolve(this, absF);
   }
 
+  // Private helper to ensure the wrapped inner stream is closed safely
+  // upon IOException throw during wrap.
+  // Assuming the caller owns the inner stream which needs to be closed upon
+  // wrap failure.
+  private HdfsDataOutputStream safelyCreateWrappedOutputStream(
+      DFSOutputStream dfsos) throws IOException {
+    try {
+      return dfs.createWrappedOutputStream(dfsos, statistics);
 
 Review comment:
   It does indeed

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org