public LockedInodePath lockInodePath(AlluxioURI uri, LockPattern lockPattern)
      throws InvalidPathException {
    LockedInodePath inodePath =
        new LockedInodePath(uri, mInodeStore, mInodeLockManager, getRoot(), lockPattern);
    try {
      inodePath.traverse();
    } catch (Throwable t) {
      inodePath.close();
      throw t;
    }
    return inodePath;
  }
public LockedInodePath lockInodePath ( AlluxioURI uri , LockPattern lockPattern ) throws InvalidPathException { LockedInodePath inodePath = new LockedInodePath ( uri , mInodeStore , mInodeLockManager , getRoot ( ) , lockPattern ) ; try { inodePath . traverse ( ) ; } catch ( Throwable t ) { inodePath . close ( ) ; throw t ; } return inodePath ; }
Locks existing inodes on the specified path, in the specified {@link LockPattern}. The target
inode is not required to exist.

@param uri the uri to lock
@param lockPattern the {@link LockPattern} to lock the inodes with
@return the {@link LockedInodePath} representing the locked path of inodes
@throws InvalidPathException if the path is invalid