List of usage examples for org.apache.hadoop.yarn.api.protocolrecords StopContainersRequest getContainerIds
@Public @Stable public abstract List<ContainerId> getContainerIds();
ContainerIds of the containers to be stopped. From source file:org.apache.hama.bsp.BSPTaskLauncher.java
License:Apache License
public void stopAndCleanup() throws YarnException, IOException { StopContainersRequest stopRequest = Records.newRecord(StopContainersRequest.class); List<ContainerId> containerIds = new ArrayList<ContainerId>(); containerIds.add(allocatedContainer.getId()); LOG.info("getId : " + allocatedContainer.getId()); stopRequest.setContainerIds(containerIds); LOG.info("StopContainer : " + stopRequest.getContainerIds()); cm.stopContainers(stopRequest);/*from ww w . j a va2 s. c o m*/ }