HADOOP-17779: Lock File System Creator Semaphore Uninterruptibly (#3158)
Contributed by David Mollitor.
This commit is contained in:
parent
0d067f69da
commit
9b2839215b
@ -21,7 +21,6 @@
|
|||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InterruptedIOException;
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.lang.ref.ReferenceQueue;
|
import java.lang.ref.ReferenceQueue;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
@ -3657,11 +3656,7 @@ private FileSystem getInternal(URI uri, Configuration conf, Key key)
|
|||||||
// to construct an instance.
|
// to construct an instance.
|
||||||
try (DurationInfo d = new DurationInfo(LOGGER, false,
|
try (DurationInfo d = new DurationInfo(LOGGER, false,
|
||||||
"Acquiring creator semaphore for %s", uri)) {
|
"Acquiring creator semaphore for %s", uri)) {
|
||||||
creatorPermits.acquire();
|
creatorPermits.acquireUninterruptibly();
|
||||||
} catch (InterruptedException e) {
|
|
||||||
// acquisition was interrupted; convert to an IOE.
|
|
||||||
throw (IOException)new InterruptedIOException(e.toString())
|
|
||||||
.initCause(e);
|
|
||||||
}
|
}
|
||||||
FileSystem fsToClose = null;
|
FileSystem fsToClose = null;
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user