@Deprecated static RenameResult renameToInt( FSDirectory fsd, FSPermissionChecker pc, final String src, final String dst, boolean logRetryCache) throws IOException { if (NameNode.stateChangeLog.isDebugEnabled()) { NameNode.stateChangeLog.debug("DIR* NameSystem.renameTo: " + src + " to " + dst); } // Rename does not operate on link targets // Do not resolveLink when checking permissions of src and dst INodesInPath srcIIP = fsd.resolvePath(pc, src, DirOp.WRITE_LINK); INodesInPath dstIIP = fsd.resolvePath(pc, dst, DirOp.CREATE_LINK); dstIIP = dstForRenameTo(srcIIP, dstIIP); return renameTo(fsd, pc, srcIIP, dstIIP, logRetryCache); }
/** * <br> * Note: This is to be used by {@link FSEditLogLoader} only. * <br> */ @Deprecated static INodesInPath renameForEditLog(FSDirectory fsd, String src, String dst, long timestamp) throws IOException { final INodesInPath srcIIP = fsd.getINodesInPath(src, DirOp.WRITE_LINK); INodesInPath dstIIP = fsd.getINodesInPath(dst, DirOp.WRITE_LINK); // this is wrong but accidentally works. the edit contains the full path // so the following will do nothing, but shouldn't change due to backward // compatibility when maybe full path wasn't logged. dstIIP = dstForRenameTo(srcIIP, dstIIP); return unprotectedRenameTo(fsd, srcIIP, dstIIP, timestamp); }