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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]