def getHadoopMaster(topo):
    """ Return one Hadoop master of the topology
    """
    for host in topo.hosts(sort=True):
        if "role" in topo.nodeInfo(host) and topo.nodeInfo(host)["role"] == "master":
            return host
    raise Exception("No Hadoop master found, is it a Hadoop cluster?")