ContainerLaunchContext ctx = Utils.createTaskExecutorContext(flinkConf, yarnConf, env, tmParams, taskManagerConf, workingDirectory, taskManagerMainClass, LOG); assertEquals("file", ctx.getLocalResources().get("flink.jar").getResource().getScheme());
private static String toString(org.apache.hadoop.yarn.api.records.URL url) { StringBuffer b = new StringBuffer(); b.append(url.getScheme()).append("://").append(url.getHost()); if(url.getPort() >= 0) { b.append(":").append(url.getPort()); } b.append(url.getFile()); return b.toString(); }
private static String toString(org.apache.hadoop.yarn.api.records.URL url) { StringBuffer b = new StringBuffer(); b.append(url.getScheme()).append("://").append(url.getHost()); if(url.getPort() >= 0) { b.append(":").append(url.getPort()); } b.append(url.getFile()); return b.toString(); }
private static String toString(org.apache.hadoop.yarn.api.records.URL url) { StringBuffer b = new StringBuffer(); b.append(url.getScheme()).append("://").append(url.getHost()); if(url.getPort() >= 0) { b.append(":").append(url.getPort()); } b.append(url.getFile()); return b.toString(); }
/** * Convert a YARN URL into a string value of a normal URL * @param url URL * @return string representatin */ public static String stringify(org.apache.hadoop.yarn.api.records.URL url) { StringBuilder builder = new StringBuilder(); builder.append(url.getScheme()).append("://"); if (url.getHost() != null) { builder.append(url.getHost()).append(":").append(url.getPort()); } builder.append(url.getFile()); return builder.toString(); }
/** * Convert a YARN URL into a string value of a normal URL * @param url URL * @return string representatin */ public static String stringify(org.apache.hadoop.yarn.api.records.URL url) { StringBuilder builder = new StringBuilder(); builder.append(url.getScheme()).append("://"); if (url.getHost() != null) { builder.append(url.getHost()).append(":").append(url.getPort()); } builder.append(url.getFile()); return builder.toString(); }
@Public @Stable public Path toPath() throws URISyntaxException { return new Path(new URI(getScheme(), getUserInfo(), getHost(), getPort(), getFile(), null, null)); }
@Public @Stable public Path toPath() throws URISyntaxException { return new Path(new URI(getScheme(), getUserInfo(), getHost(), getPort(), getFile(), null, null)); }
/** * return a hadoop path from a given url * * @param url * url to convert * @return path from {@link URL} * @throws URISyntaxException */ public static Path getPathFromYarnURL(URL url) throws URISyntaxException { String scheme = url.getScheme() == null ? "" : url.getScheme(); String authority = ""; if (url.getHost() != null) { authority = url.getHost(); if (url.getUserInfo() != null) { authority = url.getUserInfo() + "@" + authority; } if (url.getPort() > 0) { authority += ":" + url.getPort(); } } return new Path( (new URI(scheme, authority, url.getFile(), null, null)).normalize()); }
/** * return a hadoop path from a given url * * @param url * url to convert * @return path from {@link URL} * @throws URISyntaxException */ public static Path getPathFromYarnURL(URL url) throws URISyntaxException { String scheme = url.getScheme() == null ? "" : url.getScheme(); String authority = ""; if (url.getHost() != null) { authority = url.getHost(); if (url.getUserInfo() != null) { authority = url.getUserInfo() + "@" + authority; } if (url.getPort() > 0) { authority += ":" + url.getPort(); } } return new Path( (new URI(scheme, authority, url.getFile(), null, null)).normalize()); }
/** * return a {@link URI} from a given url * * @param url * url to convert * @return path from {@link URL} * @throws URISyntaxException */ @Private public static URI getURIFromYarnURL(URL url) throws URISyntaxException { String scheme = url.getScheme() == null ? "" : url.getScheme(); String authority = ""; if (url.getHost() != null) { authority = url.getHost(); if (url.getUserInfo() != null) { authority = url.getUserInfo() + "@" + authority; } if (url.getPort() > 0) { authority += ":" + url.getPort(); } } return new URI(scheme, authority, url.getFile(), null, null).normalize(); }