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/25 22:55:26 UTC

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

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

 ##########
 File path: hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
 ##########
 @@ -329,7 +327,12 @@ public FSDataInputStream open(Path f, final int bufferSize)
       public FSDataInputStream doCall(final Path p) throws IOException {
         final DFSInputStream dfsis =
             dfs.open(getPathName(p), bufferSize, verifyChecksum);
-        return dfs.createWrappedInputStream(dfsis);
+        try {
+          return dfs.createWrappedInputStream(dfsis);
+        } catch (IOException ex){
 
 Review comment:
   Agree. Here the case for create encrypted file is dfs.open succeeds and return a valid DFSIS, but the createWrappedInputStream throws when user does not have permission to decrypt the EDEK. The fix tries to ensure the file get closed properly in this case. 

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