protected boolean checkFeExistByIpOrFqdn(String ipOrFqdn) throws UnknownHostException {
        Pair<String, String> targetIpAndFqdn = NetUtils.getIpAndFqdnByHost(ipOrFqdn);

        for (Frontend fe : frontends.values()) {
            Pair<String, String> curIpAndFqdn;
            try {
                curIpAndFqdn = NetUtils.getIpAndFqdnByHost(fe.getHost());
            } catch (UnknownHostException e) {
                LOG.warn("failed to get right ip by fqdn {}", fe.getHost(), e);
                if (targetIpAndFqdn.second.equals(fe.getHost())
                        && !Strings.isNullOrEmpty(targetIpAndFqdn.second)) {
                    return true;
                }
                continue;
            }
            // target, cur has same ip
            if (targetIpAndFqdn.first.equals(curIpAndFqdn.first)) {
                return true;
            }
            // target, cur has same fqdn and both of them are not equal ""
            if (targetIpAndFqdn.second.equals(curIpAndFqdn.second)
                    && !Strings.isNullOrEmpty(targetIpAndFqdn.second)) {
                return true;
            }
        }

        return false;
    }
@Test
    public void testCheckFeExistByIpOrFqdn() throws UnknownHostException {
        NodeMgr nodeMgr = new NodeMgr();
        nodeMgr.replayAddFrontend(new Frontend(FrontendNodeType.FOLLOWER, "node1", "localhost", 9010));
        Assert.assertTrue(nodeMgr.checkFeExistByIpOrFqdn("localhost"));
        Assert.assertTrue(nodeMgr.checkFeExistByIpOrFqdn("127.0.0.1"));
    }