diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TextFileBasedIdentityHandler.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TextFileBasedIdentityHandler.java index 523fd31794..6e57d0d294 100644 --- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TextFileBasedIdentityHandler.java +++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/TextFileBasedIdentityHandler.java @@ -29,6 +29,7 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.io.LineIterator; +import org.apache.hadoop.io.IOUtils; import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.COLON; import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.EMPTY_STRING; @@ -189,7 +190,7 @@ private static void loadMap(HashMap cache, String fileLocation, } catch (ArrayIndexOutOfBoundsException e) { LOG.error("Error while parsing mapping file", e); } finally { - LineIterator.closeQuietly(it); + IOUtils.cleanupWithLogger(LOG, it); } } }