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

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


        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);
                            }
View Full Code Here


            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");
View Full Code Here

  }
 
  public ArrayList<String> getSwappingMachines(IDuccWorkJob job) {
    ArrayList<String> retVal = new ArrayList<String>();
    DuccMachinesData.getInstance();
    IDuccProcessMap map = job.getProcessMap();
    for(DuccId duccId : map.keySet()) {
      IDuccProcess jp = map.get(duccId);
      switch(jp.getProcessState()) {
      case Starting:
      case Initializing:
      case Running:
        NodeIdentity nodeId = jp.getNodeIdentity();
View Full Code Here

    return retVal;
  }
 
  public String buildInitializeFailuresLink(IDuccWorkJob job) {
    StringBuffer sb = new StringBuffer();
    IDuccProcessMap processMap = job.getProcessMap();
    ArrayList<DuccId> list = processMap.getFailedInitialization();
    int count = list.size();
    if(count > 0) {
      String href = "/ducc-servlet/job-initialization-fail-data?id="+job.getDuccId();
      String anchor = "<a class=\"logfileLink\" title=\""+job.getDuccId()+" init fails"+"\" href=\""+href+"\" rel=\""+href+"\">"+count+"</a>";
      sb.append(anchor);
View Full Code Here

    return retVal;
  }

  public String buildRuntimeFailuresLink(IDuccWorkJob job) {
    StringBuffer sb = new StringBuffer();
    IDuccProcessMap processMap = job.getProcessMap();
    ArrayList<DuccId> list = processMap.getFailedNotInitialization();
    int count = list.size();
    if(count > 0) {
      String href = "/ducc-servlet/job-runtime-fail-data?id="+job.getDuccId();
      String anchor = "<a class=\"logfileLink\" title=\""+job.getDuccId()+" run fails"+"\" href=\""+href+"\" rel=\""+href+"\">"+count+"</a>";
      sb.append(anchor);
View Full Code Here

    protected void formatProcesses(String job)
    {
        try {
      IDuccWorkJob dwj = readJob(job);
      IDuccProcessMap pmap = dwj.getProcessMap();
            String headerFmt =    "%25s %8s %12s %12s %12s %12s %12s %12s %10s %8s %8s %8s %8s %8s %8s %8s %s";
            String underline =    dup("-", 25) + " -------- ------------ ------------ ------------ ------------ ------------ ------------ ---------- -------- -------- -------- -------- -------- -------- -------- -----------------";
            String dataFmt = null;

            if ( csv ) {
                dataFmt   = "%s\t%s\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%s";
            } else {
                dataFmt   = "%25.25s %8s %12d %12d %12d %12d %12d %12d %10d %8d %8d %8d %8d %8d %8d %8d %s";
                System.out.println(String.format(headerFmt, "Node", "Pid", "Init Time",
                                                 "Mem", "MemMax", "Faults", "Swap", "MaxSwap", "CPU",
                                                 "gcCount", "gcTime",
                                                 "wiDisp", "wiDone", "wiError", "wiRetry", "wiPrmpt",
                                                 "Exit Reason"));           
                System.out.println(underline);
            }

      for (DuccId id : pmap.keySet() ) {
        IDuccProcess idp = pmap.getProcess(id);
        String node = idp.getNodeIdentity().getName();
        String pid = idp.getPID();
                String exit_reason = idp.getReasonForStoppingProcess();

                long mem = idp.getResidentMemory();
View Full Code Here

    DuccId pDuccId = casTuple.getDuccId();
    if(pDuccId == null) {
      duccOut.warn(location, getJobId(), casTuple.getDuccId(), "process ID null");
    }
    else {
      IDuccProcessMap processMap = getProcessMap();
      IDuccProcess process = processMap.getProcess(pDuccId);
      if(process == null) {
        duccOut.warn(location, getJobId(), casTuple.getDuccId(), "process is null");
      }
      else {
        if(process.isPreempted()) {
View Full Code Here

    if(pDuccId == null) {
      retVal = true;
      duccOut.warn(location, getJobId(), casTuple.getDuccId(), "process ID is null");
    }
    else {
      IDuccProcessMap processMap = getProcessMap();
      IDuccProcess process = processMap.getProcess(pDuccId);
      if(process == null) {
        retVal = true;
        duccOut.warn(location, getJobId(), casTuple.getDuccId(), "process is null");
      }
      else
View Full Code Here

        while(iterator.hasNext()) {
          DuccId serviceId = iterator.next();
          String fid = ""+serviceId.getFriendly();
          if(implementors.contains(fid)) {
            service = (DuccWorkJob) duccWorkMap.findDuccWork(serviceId);
            IDuccProcessMap map = service.getProcessMap();
            for(DuccId key : map.keySet()) {
              IDuccProcess process = map.get(key);
              buildServiceFilesListEntry(baseRequest,request,sb, service, process, type, ++counter);
            }
          }
        }
      }
View Full Code Here

    DuccWorkJob job = getJob(jobNo);
    StringBuffer data = new StringBuffer();
    data.append("no data");
    if(job != null) {
      try {
        IDuccProcessMap processMap = job.getProcessMap();
        ArrayList<DuccId> list = processMap.getFailedInitialization();
        int count = list.size();
        if(count > 0) {
          data = new StringBuffer();
          data.append("<table>");
          Iterator<DuccId> processIterator = list.iterator();
          switch(DuccCookies.getDisplayStyle(request)) {
          case Textual:
            break;
          case Visual:
            if(job.getSchedulingInfo().getLongSharesMax() < 0) {
              data.append("<tr>");
              data.append("<td>");
              sb.append("<span title=\"capped at current number of running processes due to excessive initialization failures\">");
              sb.append("<img src=\"/opensources/images/propeller_hat_large.svg.png\">");
              sb.append("</span>");
            }
            break;
          default:
            break;
          }
          while(processIterator.hasNext()) {
            data.append("<tr>");
            data.append("<td>");
            DuccId processId = processIterator.next();
            IDuccProcess process = processMap.get(processId);
            String logsjobdir = job.getUserLogsDir()+job.getDuccId().getFriendly()+File.separator;
            String logfile = buildLogFileName(job, process, ShareType.UIMA);
            String link = logfile;
            String reason = process.getReasonForStoppingProcess();
            if(reason != null) {
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.event.common.IDuccProcessMap

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.