From 689dd7bf17f59da7e41e7aaac433a1ea97e6160a Mon Sep 17 00:00:00 2001 From: sumangala-patki <70206833+sumangala-patki@users.noreply.github.com> Date: Fri, 5 Nov 2021 18:23:51 +0530 Subject: [PATCH] HADOOP-17863. ABFS: Fix compiler deprecation warning in TextFileBasedIdentityHandler (#3332) Closes #3332 Contributed by Sumangala Patki Change-Id: I2abd33bd62bb734a431cccfc50a52bdeb2bf7db6 --- .../hadoop/fs/azurebfs/utils/TextFileBasedIdentityHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 523fd317940..6e57d0d2949 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.slf4j.LoggerFactory; 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 @@ public class TextFileBasedIdentityHandler implements IdentityHandler { } catch (ArrayIndexOutOfBoundsException e) { LOG.error("Error while parsing mapping file", e); } finally { - LineIterator.closeQuietly(it); + IOUtils.cleanupWithLogger(LOG, it); } } }