Code review comment: The exception is not clear after change the comparison in the if branch.

Code under review:
public void renamePath(String srcPath, String destPath, Map<String, String> loadProperties) throws UserException {
        WildcardURI srcPathUri = new WildcardURI(srcPath);
        WildcardURI destPathUri = new WildcardURI(destPath);
        if  ((srcPathUri.getAuthority() == null && destPathUri.getAuthority() != null) ||
                (srcPathUri.getAuthority() != null && destPathUri.getAuthority() == null) ||
                    (srcPathUri.getAuthority() != null && destPathUri.getAuthority() != null && 
                        (!srcPathUri.getAuthority().trim().equals(destPathUri.getAuthority().trim())))) {
            throw new UserException(
                    "only allow rename in same file system");
        }
        HdfsFs fileSystem = getFileSystem(srcPath, loadProperties, null);
        Path srcfilePath = new Path(srcPathUri.getPath());
        Path destfilePath = new Path(destPathUri.getPath());
        try {
            boolean isRenameSuccess = fileSystem.getDFSFileSystem().rename(srcfilePath, destfilePath);
            if (!isRenameSuccess) {
                throw new UserException("failed to rename path from " + srcPath + " to " + destPath);
            }
        } catch (IOException e) {
            LOG.error("errors while rename path from " + srcPath + " to " + destPath);
            throw new UserException("errors while rename " + srcPath + "to " + destPath);
        }
    }

Line commented on: HdfsFs fileSystem = getFileSystem(srcPath, loadProperties, null);

Revised code:
public void renamePath(String srcPath, String destPath, Map<String, String> loadProperties) throws UserException {
        WildcardURI srcPathUri = new WildcardURI(srcPath);
        WildcardURI destPathUri = new WildcardURI(destPath);

        boolean srcAuthorityNull = (srcPathUri.getAuthority() == null);
        boolean destAuthorityNull = (destPathUri.getAuthority() == null);
        if (!srcAuthorityNull || !destAuthorityNull) {
            if (!srcAuthorityNull && !destAuthorityNull && 
                    !srcPathUri.getAuthority().trim().equals(destPathUri.getAuthority().trim())) {
                throw new UserException(
                    "only allow rename in same file system");
            } else {
                throw new UserException("Different authority info between srcPath: " + srcPath +
                                        " and destPath: " + destPath);
            }
        }

        HdfsFs fileSystem = getFileSystem(srcPath, loadProperties, null);
        Path srcfilePath = new Path(srcPathUri.getPath());
        Path destfilePath = new Path(destPathUri.getPath());
        try {
            boolean isRenameSuccess = fileSystem.getDFSFileSystem().rename(srcfilePath, destfilePath);
            if (!isRenameSuccess) {
                throw new UserException("failed to rename path from " + srcPath + " to " + destPath);
            }
        } catch (IOException e) {
            LOG.error("errors while rename path from " + srcPath + " to " + destPath);
            throw new UserException("errors while rename " + srcPath + "to " + destPath);
        }
    }