jojochuang 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_r384118837
##########
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:
we would get an IOException if the dfs client is closed or if it is unable
to reach NameNode for FsServerDefaults.
I think it makes sense for a HDFS client to assume the file is closed if the
open doesn't complete successfully.
----------------------------------------------------------------
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]