本文整理汇总了Java中org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo类的典型用法代码示例。如果您正苦于以下问题:Java ContainersInfo类的具体用法?Java ContainersInfo怎么用?Java ContainersInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContainersInfo类属于org.apache.hadoop.yarn.server.webapp.dao包,在下文中一共展示了ContainersInfo类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getContainers
import org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo; //导入依赖的package包/类
public ContainersInfo getContainers(HttpServletRequest req,
HttpServletResponse res, String appId, String appAttemptId) {
ApplicationId aid = parseApplicationId(appId);
ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);
validateIds(aid, aaid, null);
Collection<ContainerReport> containerReports = null;
try {
containerReports = appContext.getContainers(aaid).values();
} catch (IOException e) {
throw new WebApplicationException(e);
}
ContainersInfo containersInfo = new ContainersInfo();
for (ContainerReport containerReport : containerReports) {
ContainerInfo containerInfo = new ContainerInfo(containerReport);
containersInfo.add(containerInfo);
}
return containersInfo;
}
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:19,代码来源:WebServices.java
示例2: getContainers
import org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo; //导入依赖的package包/类
@GET
@Path("/apps/{appid}/appattempts/{appattemptid}/containers")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Override
public ContainersInfo getContainers(@Context HttpServletRequest req,
@Context HttpServletResponse res, @PathParam("appid") String appId,
@PathParam("appattemptid") String appAttemptId) {
init(res);
return super.getContainers(req, res, appId, appAttemptId);
}
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:AHSWebServices.java
示例3: getContainers
import org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo; //导入依赖的package包/类
public ContainersInfo getContainers(HttpServletRequest req,
HttpServletResponse res, String appId, String appAttemptId) {
UserGroupInformation callerUGI = getUser(req);
ApplicationId aid = parseApplicationId(appId);
final ApplicationAttemptId aaid = parseApplicationAttemptId(appAttemptId);
validateIds(aid, aaid, null);
Collection<ContainerReport> containerReports = null;
try {
if (callerUGI == null) {
containerReports = appContext.getContainers(aaid).values();
} else {
containerReports = callerUGI.doAs(
new PrivilegedExceptionAction<Collection<ContainerReport>> () {
@Override
public Collection<ContainerReport> run() throws Exception {
return appContext.getContainers(aaid).values();
}
});
}
} catch (Exception e) {
rewrapAndThrowException(e);
}
ContainersInfo containersInfo = new ContainersInfo();
for (ContainerReport containerReport : containerReports) {
ContainerInfo containerInfo = new ContainerInfo(containerReport);
containersInfo.add(containerInfo);
}
return containersInfo;
}
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:30,代码来源:WebServices.java
注:本文中的org.apache.hadoop.yarn.server.webapp.dao.ContainersInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论