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 10:00:25 UTC

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

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



##########
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:
       why not use `closeStream(fis)`?

##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/NativePmemMappableBlockLoader.java
##########
@@ -105,7 +105,7 @@ public MappableBlock load(long length, FileInputStream blockIn,
           + ", [cached path={}, address={}, length={}]", key, filePath,
           region.getAddress(), length);
     } finally {
-      IOUtils.closeQuietly(blockChannel);
+      org.apache.hadoop.io.IOUtils.cleanupWithLogger(null, blockChannel);

Review comment:
       any reason not to import?




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