ConverterUtils { @Public @Deprecated public static String toString(ApplicationId appId) { return appId.toString(); }  @Public @Deprecated static Path getPathFromYarnURL(URL url); @Public @Deprecated static URL getYarnUrlFromPath(Path path); @Public @Deprecated static URL getYarnUrlFromURI(URI uri); @Public @Deprecated static String toString(ApplicationId appId); @Public @Deprecated static ApplicationId toApplicationId(RecordFactory recordFactory,
      String applicationIdStr); @Public @Deprecated static String toString(ContainerId cId); @Private @InterfaceStability.Unstable static NodeId toNodeIdWithDefaultPort(String nodeIdStr); @Public @Deprecated static NodeId toNodeId(String nodeIdStr); @Public @Deprecated static ContainerId toContainerId(String containerIdStr); @Public @Deprecated static ApplicationAttemptId toApplicationAttemptId(
      String applicationAttemptIdStr); @Public @Deprecated 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 testContainerId() throws URISyntaxException { ContainerId id = TestContainerId.newContainerId(0, 0, 0, 0); String cid = id.toString(); assertEquals("container_0_0000_00_000000", cid); ContainerId gen = ContainerId.fromString(cid); assertEquals(gen, id); }
@Test public void testContainerIdWithEpoch() throws URISyntaxException { ContainerId id = TestContainerId.newContainerId(0, 0, 0, 25645811); String cid = id.toString(); assertEquals("container_0_0000_00_25645811", cid); ContainerId gen = ContainerId.fromString(cid); assertEquals(gen.toString(), id.toString()); long ts = System.currentTimeMillis(); ContainerId id2 = TestContainerId.newContainerId(36473, 4365472, ts, 4298334883325L); String cid2 = id2.toString(); assertEquals( "container_e03_" + ts + "_36473_4365472_999799999997", cid2); ContainerId gen2 = ContainerId.fromString(cid2); assertEquals(gen2.toString(), id2.toString()); ContainerId id3 = TestContainerId.newContainerId(36473, 4365472, ts, 844424930131965L); String cid3 = id3.toString(); assertEquals( "container_e767_" + ts + "_36473_4365472_1099511627773", cid3); ContainerId gen3 = ContainerId.fromString(cid3); assertEquals(gen3.toString(), id3.toString()); }
@Test @SuppressWarnings("deprecation") public void testContainerIdNull() throws URISyntaxException { assertNull(ConverterUtils.toString((ContainerId)null)); }