org.apache.hadoop.yarn.webapp.WebApp.name()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(8.9k)|赞(0)|评价(0)|浏览(132)

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

WebApp.name介绍

暂无

代码示例

代码示例来源:origin: Qihoo360/XLearning

try {
 httpServer.start();
 LOG.info("Web app " + webApp.name() + " started at "
   + httpServer.getConnectorAddress(0).getPort());
} catch (IOException e) {

代码示例来源:origin: Qihoo360/XLearning

try {
 httpServer.start();
 LOG.info("Web app " + webApp.name() + " started at "
   + httpServer.getConnectorAddress(0).getPort());
} catch (IOException e) {

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

@Override public void run() {
  LOG.info("WebAppp /{} exiting...", webApp.name());
  webApp.stop();
  System.exit(0); // FINDBUG: this is intended in dev mode
 }
}, 18); // enough time for the last local request to complete

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

@Override public void run() {
  LOG.info("WebAppp /{} exiting...", webApp.name());
  webApp.stop();
  System.exit(0); // FINDBUG: this is intended in dev mode
 }
}, 18); // enough time for the last local request to complete

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

@Override public void run() {
  LOG.info("WebAppp /{} exiting...", webApp.name());
  webApp.stop();
  System.exit(0); // FINDBUG: this is intended in dev mode
 }
}, 18); // enough time for the last local request to complete

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

@GET
@Path("/containers")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public ContainersInfo getNodeContainers(@javax.ws.rs.core.Context
  HttpServletRequest hsr) {
 init();
 ContainersInfo allContainers = new ContainersInfo();
 for (Entry<ContainerId, Container> entry : this.nmContext.getContainers()
   .entrySet()) {
  if (entry.getValue() == null) {
   // just skip it
   continue;
  }
  ContainerInfo info = new ContainerInfo(this.nmContext, entry.getValue(),
    uriInfo.getBaseUri().toString(), webapp.name(), hsr.getRemoteUser());
  allContainers.add(info);
 }
 return allContainers;
}

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

@GET
@Path("/containers")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public ContainersInfo getNodeContainers() {
 init();
 ContainersInfo allContainers = new ContainersInfo();
 for (Entry<ContainerId, Container> entry : this.nmContext.getContainers()
   .entrySet()) {
  if (entry.getValue() == null) {
   // just skip it
   continue;
  }
  ContainerInfo info = new ContainerInfo(this.nmContext, entry.getValue(),
    uriInfo.getBaseUri().toString(), webapp.name());
  allContainers.add(info);
 }
 return allContainers;
}

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

@GET
@Path("/containers")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public ContainersInfo getNodeContainers() {
 init();
 ContainersInfo allContainers = new ContainersInfo();
 for (Entry<ContainerId, Container> entry : this.nmContext.getContainers()
   .entrySet()) {
  if (entry.getValue() == null) {
   // just skip it
   continue;
  }
  ContainerInfo info = new ContainerInfo(this.nmContext, entry.getValue(),
    uriInfo.getBaseUri().toString(), webapp.name());
  allContainers.add(info);
 }
 return allContainers;
}

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

@GET
@Path("/containers/{containerid}")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public ContainerInfo getNodeContainer(@javax.ws.rs.core.Context
  HttpServletRequest hsr, @PathParam("containerid") String id) {
 ContainerId containerId = null;
 init();
 try {
  containerId = ContainerId.fromString(id);
 } catch (Exception e) {
  throw new BadRequestException("invalid container id, " + id);
 }
 Container container = nmContext.getContainers().get(containerId);
 if (container == null) {
  throw new NotFoundException("container with id, " + id + ", not found");
 }
 return new ContainerInfo(this.nmContext, container, uriInfo.getBaseUri()
   .toString(), webapp.name(), hsr.getRemoteUser());
}

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

@GET
@Path("/containers/{containerid}")
@Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
  MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
public ContainerInfo getNodeContainer(@javax.ws.rs.core.Context
  HttpServletRequest hsr, @PathParam("containerid") String id) {
 ContainerId containerId = null;
 init();
 try {
  containerId = ContainerId.fromString(id);
 } catch (Exception e) {
  throw new BadRequestException("invalid container id, " + id);
 }
 Container container = nmContext.getContainers().get(containerId);
 if (container == null) {
  throw new NotFoundException("container with id, " + id + ", not found");
 }
 return new ContainerInfo(this.nmContext, container, uriInfo.getBaseUri()
   .toString(), webapp.name(), hsr.getRemoteUser());
}

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

@GET
@Path("/containers/{containerid}")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public ContainerInfo getNodeContainer(@PathParam("containerid") String id) {
 ContainerId containerId = null;
 init();
 try {
  containerId = ConverterUtils.toContainerId(id);
 } catch (Exception e) {
  throw new BadRequestException("invalid container id, " + id);
 }
 Container container = nmContext.getContainers().get(containerId);
 if (container == null) {
  throw new NotFoundException("container with id, " + id + ", not found");
 }
 return new ContainerInfo(this.nmContext, container, uriInfo.getBaseUri()
   .toString(), webapp.name());
}

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

@GET
@Path("/containers/{containerid}")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public ContainerInfo getNodeContainer(@PathParam("containerid") String id) {
 ContainerId containerId = null;
 init();
 try {
  containerId = ConverterUtils.toContainerId(id);
 } catch (Exception e) {
  throw new BadRequestException("invalid container id, " + id);
 }
 Container container = nmContext.getContainers().get(containerId);
 if (container == null) {
  throw new NotFoundException("container with id, " + id + ", not found");
 }
 return new ContainerInfo(this.nmContext, container, uriInfo.getBaseUri()
   .toString(), webapp.name());
}

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

@GET
@Path("/containers")
@Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
  MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
public ContainersInfo getNodeContainers(@javax.ws.rs.core.Context
  HttpServletRequest hsr) {
 init();
 ContainersInfo allContainers = new ContainersInfo();
 for (Entry<ContainerId, Container> entry : this.nmContext.getContainers()
   .entrySet()) {
  if (entry.getValue() == null) {
   // just skip it
   continue;
  }
  ContainerInfo info = new ContainerInfo(this.nmContext, entry.getValue(),
    uriInfo.getBaseUri().toString(), webapp.name(), hsr.getRemoteUser());
  ApplicationId appId = entry.getKey().getApplicationAttemptId()
    .getApplicationId();
  // Allow only application-owner/admin for any type of access on the
  // application.
  if (filterAppsByUser
    && !hasAccess(entry.getValue().getUser(), appId, hsr)) {
   continue;
  }
  allContainers.add(info);
 }
 return allContainers;
}

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-hs

@GET
@Path("/mapreduce/jobs/{jobid}/jobattempts")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public AMAttemptsInfo getJobAttempts(@PathParam("jobid") String jid) {
 init();
 Job job = AMWebServices.getJobFromJobIdString(jid, ctx);
 AMAttemptsInfo amAttempts = new AMAttemptsInfo();
 for (AMInfo amInfo : job.getAMInfos()) {
  AMAttemptInfo attempt = new AMAttemptInfo(amInfo, MRApps.toString(job
    .getID()), job.getUserName(), uriInfo.getBaseUri().toString(),
    webapp.name());
  amAttempts.add(attempt);
 }
 return amAttempts;
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-hs

@GET
@Path("/mapreduce/jobs/{jobid}/jobattempts")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public AMAttemptsInfo getJobAttempts(@PathParam("jobid") String jid) {
 init();
 Job job = AMWebServices.getJobFromJobIdString(jid, ctx);
 AMAttemptsInfo amAttempts = new AMAttemptsInfo();
 for (AMInfo amInfo : job.getAMInfos()) {
  AMAttemptInfo attempt = new AMAttemptInfo(amInfo, MRApps.toString(job
    .getID()), job.getUserName(), uriInfo.getBaseUri().toString(),
    webapp.name());
  amAttempts.add(attempt);
 }
 return amAttempts;
}

代码示例来源:origin: io.hops/hadoop-mapreduce-client-hs

@GET
@Path("/mapreduce/jobs/{jobid}/jobattempts")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
public AMAttemptsInfo getJobAttempts(@PathParam("jobid") String jid) {
 init();
 Job job = AMWebServices.getJobFromJobIdString(jid, ctx);
 AMAttemptsInfo amAttempts = new AMAttemptsInfo();
 for (AMInfo amInfo : job.getAMInfos()) {
  AMAttemptInfo attempt = new AMAttemptInfo(amInfo, MRApps.toString(job
    .getID()), job.getUserName(), uriInfo.getBaseUri().toString(),
    webapp.name());
  amAttempts.add(attempt);
 }
 return amAttempts;
}

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

rc.prefix = webApp.name();
Router.Dest dest = null;
try {

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

rc.prefix = webApp.name();
Router.Dest dest = null;
try {

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

rc.prefix = webApp.name();
Router.Dest dest = null;
try {

相关文章