HDFS-7333. Improve logging in Storage.tryLock(). Contributed by Konstantin Shvachko.
This commit is contained in:
parent
6e8722e49c
commit
203c63030f
@ -336,6 +336,8 @@ Release 2.7.0 - UNRELEASED
|
||||
HDFS-7335. Redundant checkOperation() in FSN.analyzeFileState().
|
||||
(Milan Desai via shv)
|
||||
|
||||
HDFS-7333. Improve logging in Storage.tryLock(). (shv)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
@ -716,12 +716,13 @@ FileLock tryLock() throws IOException {
|
||||
} catch(OverlappingFileLockException oe) {
|
||||
// Cannot read from the locked file on Windows.
|
||||
String lockingJvmName = Path.WINDOWS ? "" : (" " + file.readLine());
|
||||
LOG.error("It appears that another namenode" + lockingJvmName
|
||||
+ " has already locked the storage directory");
|
||||
LOG.error("It appears that another node " + lockingJvmName
|
||||
+ " has already locked the storage directory: " + root, oe);
|
||||
file.close();
|
||||
return null;
|
||||
} catch(IOException e) {
|
||||
LOG.error("Failed to acquire lock on " + lockF + ". If this storage directory is mounted via NFS, "
|
||||
LOG.error("Failed to acquire lock on " + lockF
|
||||
+ ". If this storage directory is mounted via NFS, "
|
||||
+ "ensure that the appropriate nfs lock services are running.", e);
|
||||
file.close();
|
||||
throw e;
|
||||
|
Loading…
Reference in New Issue
Block a user