Package org.apache.uima.ducc.transport.event.rm

Examples of org.apache.uima.ducc.transport.event.rm.IResource


    if(job != null) {
      if(map != null) {
        Iterator<DuccId> iterator = map.keySet().iterator();
        while(iterator.hasNext()) {
          DuccId duccId = iterator.next();
          IResource resource = map.get(duccId);
          if(resource.isPurged()) {
            IDuccProcess process = job.getProcessMap().get(duccId);
            if(!process.isDefunct()) {
              String rState = process.getResourceState().toString();
              String pState = process.getProcessState().toString();
              logger.info(methodName, job.getDuccId(), duccId, "rState:"+rState+" "+"pState"+pState);
View Full Code Here


    else {
      IDuccProcessMap processMap = duccWorkJob.getProcessMap();
      Iterator<DuccId> resourceMapIterator = resourceMap.keySet().iterator();
      while(resourceMapIterator.hasNext()) {
        DuccId duccId = resourceMapIterator.next();
        IResource resource = resourceMap.get(duccId);
        Node node = resourceMap.get(duccId).getNode();
        NodeIdentity nodeId = node.getNodeIdentity();
        if(!processMap.containsKey(duccId)) {
          ProcessType processType = null;
          switch(duccWorkJob.getServiceDeploymentType()) {
          case custom:
          case other:
            processType = ProcessType.Pop;
            break;
          case uima:
          case unspecified:
            processType = ProcessType.Job_Uima_AS_Process;
            break;
          }
          DuccProcess process = new DuccProcess(duccId, node, processType);
          long process_max_size_in_bytes = quantum_size_in_bytes * resource.countShares();
          CGroupManager.assign(duccWorkJob.getDuccId(), process, process_max_size_in_bytes);
          orchestratorCommonArea.getProcessAccounting().addProcess(duccId, duccWorkJob.getDuccId());
          processMap.addProcess(process);
          process.setResourceState(ResourceState.Allocated);
          logger.info(methodName, duccWorkJob.getDuccId(), messages.fetch("resource added")
View Full Code Here

    IDuccReservationMap reservationMap = duccWorkReservation.getReservationMap();
    if(resourceMap != null) {
      Iterator<DuccId> resourceMapIterator = resourceMap.keySet().iterator();
      while(resourceMapIterator.hasNext()) {
        DuccId duccId = resourceMapIterator.next();
        IResource resource = resourceMap.get(duccId);
        Node node = resource.getNode();
        NodeIdentity nodeId = node.getNodeIdentity();
        int shares = resource.countShares();
        if(!reservationMap.containsKey(duccId)) {
          DuccReservation reservation = new DuccReservation(duccId, node, shares);
          reservationMap.addReservation(reservation);
          logger.info(methodName, duccId, messages.fetch("add resource")+" "+messages.fetchLabel("name")+nodeId.getName()+" "+messages.fetchLabel("ip")+nodeId.getIp());
          changes++;
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.event.rm.IResource

Copyright © 2018 www.massapicom. 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.