org.apache.hadoop.yarn.api.records.URL.getUserInfo()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(78)

本文整理了Java中org.apache.hadoop.yarn.api.records.URL.getUserInfo()方法的一些代码示例,展示了URL.getUserInfo()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URL.getUserInfo()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.api.records.URL
类名称:URL
方法名:getUserInfo

URL.getUserInfo介绍

[英]Get the user info of the URL.
[中]获取URL的用户信息。

代码示例

代码示例来源:origin: io.hops/hadoop-yarn-api

@Public
@Stable
public Path toPath() throws URISyntaxException {
 return new Path(new URI(getScheme(), getUserInfo(),
  getHost(), getPort(), getFile(), null, null));
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-api

@Public
@Stable
public Path toPath() throws URISyntaxException {
 return new Path(new URI(getScheme(), getUserInfo(),
  getHost(), getPort(), getFile(), null, null));
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

/**
 * 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());
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common

/**
 * 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());
}

代码示例来源:origin: org.apache.tez/tez-runtime-internals

/**
 * 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();
}

相关文章