Package org.apache.uima.ducc.transport.agent

Examples of org.apache.uima.ducc.transport.agent.IUimaPipelineAEComponent


        IDuccProcess inventoryProcess = inventoryProcessMap.get(processId);
        List<IUimaPipelineAEComponent> upcList = inventoryProcess.getUimaPipelineComponents();
        if(upcList != null) {
          Iterator<IUimaPipelineAEComponent> upcIterator = upcList.iterator();
          while(upcIterator.hasNext()) {
            IUimaPipelineAEComponent upc = upcIterator.next();
            logger.debug(methodName, null, processId, "pipelineInfo: "+inventoryProcess.getNodeIdentity()+" "+inventoryProcess.getPID()+" "+upc.getAeName()+" "+upc.getAeState()+" "+upc.getInitializationTime());
          }
        }
        ProcessType processType = inventoryProcess.getProcessType();
        if(processType != null) {
          DuccId jobId = OrchestratorCommonArea.getInstance().getProcessAccounting().getJobId(processId);
View Full Code Here


            // AE stats
            AnalysisEngineManagement proxy = JMX.newMBeanProxy(
                server, instance.getObjectName(),
                AnalysisEngineManagement.class);

            IUimaPipelineAEComponent aeState = null;
            // if ((aeState = getUimaAeByName(aeStateList,
            // sb.toString())) == null) {
            if ((aeState = getUimaAeByName(sb.toString())) == null) {
              // Not interested in AEs that are in a Ready State
              if (AnalysisEngineManagement.State.valueOf(
                  proxy.getState()).equals(
                  AnalysisEngineManagement.State.Ready)) {
                continue;
              }
              aeState = new UimaPipelineAEComponent(
                  sb.toString(), proxy.getThreadId(),
                  AnalysisEngineManagement.State
                      .valueOf(proxy.getState()));
              aeStateList.add(aeState);
              ((UimaPipelineAEComponent) aeState).startInitialization = System
                  .currentTimeMillis();
              aeState.setAeState(AnalysisEngineManagement.State.Initializing);
              updateAgent = true;
            } else {
              // continue publishing AE state while the AE is
              // initializing
              if (AnalysisEngineManagement.State
                  .valueOf(proxy.getState())
                  .equals(AnalysisEngineManagement.State.Initializing)) {
                updateAgent = true;
                aeState.setInitializationTime(System
                    .currentTimeMillis()
                    - ((UimaPipelineAEComponent) aeState).startInitialization);
                // publish state if the AE just finished
                // initializing and is now in Ready state
              } else if (aeState
                  .getAeState()
                  .equals(AnalysisEngineManagement.State.Initializing)
                  && AnalysisEngineManagement.State
                      .valueOf(proxy.getState())
                      .equals(AnalysisEngineManagement.State.Ready)) {
                aeState.setAeState(AnalysisEngineManagement.State.Ready);
                updateAgent = true;
                synchronized (this) {
                  try {
                    wait(5);
                  } catch (InterruptedException ex) {
                  }
                }
                aeState.setInitializationTime(proxy
                    .getInitializationTime());
                // AE reached ready state we no longer need to
                // publish its state
                componentsToDelete.add(aeState);
              }
            }
            service.logger.debug(
                "UimaAEJmxMonitor.run()",
                null,
                "---- AE Name:" + proxy.getName()
                    + " AE State:" + proxy.getState()
                    + " AE init time="
                    + aeState.getInitializationTime()
                    + " Proxy Init time="
                    + proxy.getInitializationTime()
                    + " Proxy Thread ID:"
                    + proxy.getThreadId());
          }
View Full Code Here

                loadme.append("<td>"+"<b>"+ch1+"</b>");
                loadme.append("<td>"+"<b>"+ch2+"</b>");
                loadme.append("<td>"+"<b>"+ch3+"</b>");
                Iterator<IUimaPipelineAEComponent> upcIterator = upcList.iterator();
                while(upcIterator.hasNext()) {
                  IUimaPipelineAEComponent upc = upcIterator.next();
                  String iName = upc.getAeName();
                  String iState = upc.getAeState().toString();
                  String iTime = FormatHelper.duration(upc.getInitializationTime());
                  loadme.append("<tr>");
                  loadme.append("<td>"+iName);
                  loadme.append("<td>"+iState);
                  loadme.append("<td>"+iTime);
                }
View Full Code Here

        List<IUimaPipelineAEComponent> upcList = process.getUimaPipelineComponents();
        if(upcList != null) {
          if(!upcList.isEmpty()) {
            Iterator<IUimaPipelineAEComponent> upcIterator = upcList.iterator();
            while(upcIterator.hasNext()) {
              IUimaPipelineAEComponent upc = upcIterator.next();
              String iName = upc.getAeName();
              String iState = upc.getAeState().toString();
              String iTime = FormatHelper.duration(upc.getInitializationTime());
              sb.append("<tr>");
              sb.append("<td>"+iName);
              sb.append("<td>"+iState);
              sb.append("<td align=\"right\">"+iTime);
            }
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.agent.IUimaPipelineAEComponent

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.