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 2021/07/02 11:56:39 UTC

[GitHub] [hadoop] virajjasani commented on a change in pull request #3171: HADOOP-17788. Replace IOUtils#closeQuietly usages by Hadoop's own utility

virajjasani commented on a change in pull request #3171:
URL: https://github.com/apache/hadoop/pull/3171#discussion_r662958213



##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ShortCircuitRegistry.java
##########
@@ -322,7 +322,7 @@ public NewShmInfo createNewMemorySegment(String clientName,
         shm = new RegisteredShm(clientName, shmId, fis, this);
       } finally {
         if (shm == null) {
-          IOUtils.closeQuietly(fis);
+          IOUtils.cleanupWithLogger(null, fis);

Review comment:
       Sounds good, `closeStream()` is also accessible and does the same so it's cleaner than passing null for each. Let me make this change.




-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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