ConverterUtils { public static NodeId toNodeIdWithDefaultPort(String nodeIdStr) { if (nodeIdStr.indexOf(":") < 0) { return toNodeId(nodeIdStr + ":0"); } return toNodeId(nodeIdStr); }  static Path getPathFromYarnURL(URL url); static Map<String, String> convertToString(
      Map<CharSequence, CharSequence> env); static URL getYarnUrlFromPath(Path path); static URL getYarnUrlFromURI(URI uri); static String toString(ApplicationId appId); static ApplicationId toApplicationId(RecordFactory recordFactory,
      String appIdStr); static String toString(ContainerId cId); static NodeId toNodeIdWithDefaultPort(String nodeIdStr); static NodeId toNodeId(String nodeIdStr); static ContainerId toContainerId(String containerIdStr); static ApplicationAttemptId toApplicationAttemptId(
      String applicationAttmeptIdStr); static ApplicationId toApplicationId(
      String appIdStr); static Token<T> convertFromYarn(
      org.apache.hadoop.yarn.api.records.Token protoToken,
      InetSocketAddress serviceAddr); static Token<T> convertFromYarn(
      org.apache.hadoop.yarn.api.records.Token protoToken,
      Text service); static final String APPLICATION_PREFIX; static final String CONTAINER_PREFIX; static final String APPLICATION_ATTEMPT_PREFIX; }
@Test public void testNodeIdWithDefaultPort() throws URISyntaxException { NodeId nid; nid = ConverterUtils.toNodeIdWithDefaultPort("node:10"); assertEquals(nid.getPort(), 10); assertEquals(nid.getHost(), "node"); nid = ConverterUtils.toNodeIdWithDefaultPort("node"); assertEquals(nid.getPort(), 0); assertEquals(nid.getHost(), "node"); }