Examples of ContainerManager


Examples of org.apache.hadoop.yarn.api.ContainerManager

      if(this.state == ContainerState.PREP) {
        this.state = ContainerState.KILLED_BEFORE_LAUNCH;
      } else if (!isCompletelyDone()) {
        LOG.info("KILLING " + taskAttemptID);

        ContainerManager proxy = null;
        try {
          proxy = getCMProxy(this.containerID, this.containerMgrAddress,
              this.containerToken);

            // kill the remote container if already launched
            StopContainerRequest stopRequest = Records
              .newRecord(StopContainerRequest.class);
            stopRequest.setContainerId(this.containerID);
            proxy.stopContainer(stopRequest);

        } catch (Throwable t) {

          // ignore the cleanup failure
          String message = "cleanup failed for container "
View Full Code Here

Examples of org.freerealm.unit.ContainerManager

        xml.append("</ContainerManager>\n");
        return xml.toString();
    }

    public ContainerManager initializeFromNode(Realm realm, Node node) {
        ContainerManager containerManager = new ContainerManager(realm, containerUnit);
        Node resourceStorageNode = XMLConverterUtility.findNode(node, "ResourceStorage");
        ResourceStorageManager resourceStorageManager = new ResourceStorageManagerXMLConverter().initializeFromNode(realm, resourceStorageNode);
        containerManager.setResourceStorageManager(resourceStorageManager);
        Node unitContainerManagerNode = XMLConverterUtility.findNode(node, "UnitContainerManager");
        if (unitContainerManagerNode != null) {
            UnitContainerManager unitContainerManager = new UnitContainerManagerXMLConverter(containerUnit).initializeFromNode(realm, unitContainerManagerNode);
            containerManager.setUnitContainerManager(unitContainerManager);
        }
        Node populationNode = XMLConverterUtility.findNode(node, "containedPopulation");
        if (populationNode != null) {
            int population = Integer.parseInt(populationNode.getFirstChild().getNodeValue());
            containerManager.setContainedPopulation(population);
        }
        return containerManager;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.