HDFS-17393. Remove unused FSNamesytemLock cond in FSNamesystem (#6567)

This commit is contained in:
ZanderXu 2024-02-23 15:37:27 +08:00 committed by GitHub
parent 10ab8abccd
commit a897e745f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -176,7 +176,6 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.function.Supplier;
@ -662,7 +661,6 @@ private boolean isFromProxyUser(CallerContext ctx) {
private KeyProviderCryptoExtension provider = null;
private volatile boolean imageLoaded = false;
private final Condition cond;
private final FSImage fsImage;
@ -704,7 +702,6 @@ void setImageLoaded() {
try {
setImageLoaded(true);
dir.markNameCacheInitialized();
cond.signalAll();
} finally {
writeUnlock("setImageLoaded");
}
@ -875,7 +872,6 @@ static FSNamesystem loadFromDisk(Configuration conf) throws IOException {
conf.get(HADOOP_CALLER_CONTEXT_SEPARATOR_KEY,
HADOOP_CALLER_CONTEXT_SEPARATOR_DEFAULT);
fsLock = new FSNamesystemLock(conf, detailedLockHoldTimeMetrics);
cond = fsLock.newWriteLockCondition();
cpLock = new ReentrantLock();
this.fsImage = fsImage;