From 6253bf72b68e0ad41e32b2865c8623ca5662f9f8 Mon Sep 17 00:00:00 2001 From: belugabehr <12578579+belugabehr@users.noreply.github.com> Date: Tue, 11 Oct 2022 06:56:32 -0400 Subject: [PATCH] HADOOP-17779: Lock File System Creator Semaphore Uninterruptibly (#3158) Contributed by David Mollitor. --- .../src/main/java/org/apache/hadoop/fs/FileSystem.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java index 61deb1a8de..57eb8f11cd 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java @@ -21,7 +21,6 @@ import java.io.Closeable; import java.io.FileNotFoundException; import java.io.IOException; -import java.io.InterruptedIOException; import java.lang.ref.WeakReference; import java.lang.ref.ReferenceQueue; import java.net.URI; @@ -3657,11 +3656,7 @@ private FileSystem getInternal(URI uri, Configuration conf, Key key) // to construct an instance. try (DurationInfo d = new DurationInfo(LOGGER, false, "Acquiring creator semaphore for %s", uri)) { - creatorPermits.acquire(); - } catch (InterruptedException e) { - // acquisition was interrupted; convert to an IOE. - throw (IOException)new InterruptedIOException(e.toString()) - .initCause(e); + creatorPermits.acquireUninterruptibly(); } FileSystem fsToClose = null; try {