Examples of IDuccWorkExecutable


Examples of org.apache.uima.ducc.transport.event.common.IDuccWorkExecutable

        if(processToJobMap.containsKey(processId)) {
          DuccId jobId = getJobId(processId);
          IDuccWork duccWork = workMap.findDuccWork(jobId);
          if(duccWork != null) {
            if(duccWork instanceof IDuccWorkExecutable) {
              IDuccWorkExecutable duccWorkExecutable = (IDuccWorkExecutable) duccWork;
              IDuccWorkJob job = null;
              if(duccWork instanceof IDuccWorkJob) {
                job = (IDuccWorkJob)duccWork;
              }
              IDuccProcessMap processMap = duccWorkExecutable.getProcessMap();
              IDuccProcess process = processMap.get(processId);
              if(process == null) {
                if(job != null) {
                  process = job.getDriver().getProcessMap().get(processId);
                }
View Full Code Here

Examples of org.apache.uima.ducc.transport.event.common.IDuccWorkExecutable

     * NOTE: If this returns false, it maust also refuse().
     */
    private boolean receiveExecutable(IRmJob j, IDuccWork job)
    {
      String methodName = "receiveExecutable";
        IDuccWorkExecutable de = (IDuccWorkExecutable) job;
        IDuccProcessMap     pm = de.getProcessMap();

        if ( (pm.size() > 0) && !job.isCompleted() ) {          // need to recover, apparently RM crashed. hmph.
            for ( IDuccProcess proc : pm.values() ) {          // build up Shares from the incoming state

                ProcessState state = proc.getProcessState();               
View Full Code Here

Examples of org.apache.uima.ducc.transport.event.common.IDuccWorkExecutable

        Map<Share, Share> ret = new HashMap<Share, Share>();
        switch ( w.getDuccType() ) {
            case Job:
            case Service:
                {
                    IDuccWorkExecutable de = (IDuccWorkExecutable) w;
                    IDuccProcessMap pm = de.getProcessMap();
                   
                    for ( Share s : shares.values() ) {
                        IDuccProcess p = pm.get(s.getId());
                        if ( p == null ) {
                            if ( (expanded == null) || (!expanded.containsKey(s)) ) {
                                logger.warn(methodName, j.getId(), "Redrive share assignment: ", s);
                                ret.put(s, s);
                            }
                        }
                    }
                }
                break;

            case Reservation:
                {
                    IDuccWorkReservation de = (IDuccWorkReservation) w;
                    IDuccReservationMap  rm = de.getReservationMap();
                   
                    for ( Share s : shares.values() ) {
                        IDuccReservation r = rm.get(s.getId());
                        if ( r == null ) {
                            if ( (expanded == null) || (!expanded.containsKey(s)) ) {
View Full Code Here

Examples of org.apache.uima.ducc.transport.event.common.IDuccWorkExecutable

                           
            switch ( w.getDuccType() ) {
                case Job:
                case Service:
                    {
                        IDuccWorkExecutable de = (IDuccWorkExecutable) w;
                        IDuccProcessMap pm = de.getProcessMap();
                        logger.info(methodName, w.getDuccId(), "Receive:", prefix, w.getDuccType(), w.getStateObject(), "processes[", pm.size(), "] Completed:", w.isCompleted());

                        for ( IDuccProcess proc : pm.values() ) {
                            String pid = proc.getPID();
                            ProcessState state = proc.getProcessState();
                            Node n = proc.getNode();
                            if ( n == null ) {
                                logger.info(methodName, w.getDuccId(), "   Process[", pid, "] state [", state, "] is complete[", proc.isComplete(), "] Node [N/A] mem[N/A");
                            } else {
                                long mem = n .getNodeMetrics().getNodeMemory().getMemTotal();
                                logger.info(methodName, w.getDuccId(),
                                            "   Process[", pid,
                                            "] state [", state,
                                            "] is complete [", proc.isComplete(),
                                            "] Node [", n.getNodeIdentity().getName() + "." + proc.getDuccId(),                                           
                                            "] mem [", mem, "]");                   
                                logger.info(methodName, w.getDuccId(), "      Recover node[", n.getNodeIdentity().getName());
                                //
                                // Note, not ignoring dead processes belonging to live jobs.  Is this best or should we be
                                // more conservative and not use nodes that we don't know 100% for sure are ok?
                                //
                                nodes.put(n, n);
                            }
                        }
                    }
                    break;

                // case Service:
                //     {
                //         IDuccWorkExecutable de = (IDuccWorkExecutable) w;
                //         IDuccProcessMap pm = de.getProcessMap();
                //         logger.info(methodName, w.getDuccId(), prefix, w.getDuccType(), "processes[", pm.size(), "].");
                //     }
                //     break;
                   
                case Reservation:
                    {
                        IDuccWorkReservation de = (IDuccWorkReservation) w;
                        IDuccReservationMap  rm = de.getReservationMap();

                        logger.info(methodName, w.getDuccId(), "Receive:", prefix, w.getDuccType(), w.getStateObject(), "processes[", rm.size(), "] Completed:", w.isCompleted());
                       
                        for ( IDuccReservation r: rm.values()) {
                            Node n = r.getNode();                       
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.