ZanderXu opened a new pull request, #6571:
URL: https://github.com/apache/hadoop/pull/6571

   ```
   public int getWriteHoldCount() {
     return this.fsLock.getWriteHoldCount(FSNamesystemLockMode.GLOBAL);
   }
   
   @Deprecated // dirLock is obsolete, use namesystem.fsLock instead
   public int getWriteHoldCount() {
     return namesystem.getWriteHoldCount();
   }
   
   // sanity check.
   if (!hadDirReadLock || !hadFsnReadLock || hadDirWriteLock ||
       hadFsnWriteLock || dir.getReadHoldCount() != 1 ||
       fsn.getReadHoldCount() != 1) {
     // cannot relinquish
     return false;
   } 
   ```
   
   `getWriteHoldCount` in FSNamesystem.java and FSDirectory.java is unused.
   `dir.getReadHoldCount()` is useless as it's same as `fsn.getReadHoldCount()`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to