Code example for Splitter

Methods: split

0
  } 
 
  public static String getRMWebAppURL(Configuration conf) {
    String addr = conf.get(RM_WEBAPP_BIND_ADDRESS,
                           DEFAULT_RM_WEBAPP_BIND_ADDRESS);
    Iterator<String> it = ADDR_SPLITTER.split(addr).iterator();
    it.next(); // ignore the bind host
    String port = it.next();
    // Use apps manager address to figure out the host for webapp 
    addr = conf.get(APPSMANAGER_ADDRESS, DEFAULT_APPSMANAGER_BIND_ADDRESS);
    String host = ADDR_SPLITTER.split(addr).iterator().next();
    return JOINER.join("http://", host, ":", port, "/");
  } 
}