INodesInPath resolvePath(FSPermissionChecker pc, String src, long fileId) throws UnresolvedLinkException, FileNotFoundException, AccessControlException, ParentNotDirectoryException { // Older clients may not have given us an inode ID to work with. // In this case, we have to try to resolve the path and hope it // hasn't changed or been deleted since the file was opened for write. INodesInPath iip; if (fileId == HdfsConstants.GRANDFATHER_INODE_ID) { iip = resolvePath(pc, src, DirOp.WRITE); } else { INode inode = getInode(fileId); if (inode == null) { iip = INodesInPath.fromComponents(INode.getPathComponents(src)); } else { iip = INodesInPath.fromINode(inode); } } return iip; }
INodesInPath resolvePath(FSPermissionChecker pc, String src, long fileId) throws UnresolvedLinkException, FileNotFoundException, AccessControlException { // Older clients may not have given us an inode ID to work with. // In this case, we have to try to resolve the path and hope it // hasn't changed or been deleted since the file was opened for write. INodesInPath iip; if (fileId == INodeId.GRANDFATHER_INODE_ID) { iip = resolvePath(pc, src); } else { INode inode = getInode(fileId); if (inode == null) { iip = INodesInPath.fromComponents(INode.getPathComponents(src)); } else { iip = INodesInPath.fromINode(inode); } } return iip; }
INodesInPath resolvePath(FSPermissionChecker pc, String src, long fileId) throws UnresolvedLinkException, FileNotFoundException, AccessControlException { // Older clients may not have given us an inode ID to work with. // In this case, we have to try to resolve the path and hope it // hasn't changed or been deleted since the file was opened for write. INodesInPath iip; if (fileId == INodeId.GRANDFATHER_INODE_ID) { iip = resolvePath(pc, src); } else { INode inode = getInode(fileId); if (inode == null) { iip = INodesInPath.fromComponents(INode.getPathComponents(src)); } else { iip = INodesInPath.fromINode(inode); } } return iip; }