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

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


 
  private void mergeHistory(DuccWorkMap map) {
    Iterator<DuccId> iterator = duccWorkLive.keySet().iterator();
    while(iterator.hasNext()) {
      DuccId duccId = iterator.next();
      IDuccWork duccWork = duccWorkLive.findDuccWork(duccId);
      IDuccWork history = null;
      switch(duccWork.getDuccType()) {
      case Job:
        history = hpm.jobRestore(duccId);
        break;
      case Reservation:
View Full Code Here


      mergeHistory(map);
      duccWorkLive = mapCopy;
      Iterator<DuccId> iterator = map.keySet().iterator();
      while(iterator.hasNext()) {
        DuccId duccId = iterator.next();
        IDuccWork duccWork = map.findDuccWork(duccId);
        duccWorkMap.addDuccWork(duccWork);
        updateSortedMaps(duccWork);
        pagingObserver.put(duccWork);
        PagingInfo pi;
        long dataTotal = 0;
View Full Code Here

      try {
        HashMap<String,WorkItemStateManager> updatedWisMap = new HashMap<String,WorkItemStateManager>();
        Iterator<DuccId> iterator = map.keySet().iterator();
        while(iterator.hasNext()) {
          jobid = iterator.next();
          IDuccWork duccWork = map.findDuccWork(jobid);
          switch(duccWork.getDuccType()) {
          case Job:
            IDuccWorkJob job = (IDuccWorkJob)duccWork;
            String jobNo = job.getId();
            String userId = job.getStandardInfo().getUser();
            String jobDir = job.getLogDirectory()+jobNo;
View Full Code Here

  private void dumpState(ConcurrentHashMap<DuccId, IDuccWork> workMap) {
    String methodName="dumpState";
    try {
      StringBuffer sb = new StringBuffer();
      for( Entry<DuccId,IDuccWork> job : workMap.entrySet()) {
        IDuccWork duccWork = job.getValue();
        if ( duccWork instanceof DuccWorkJob ) {
          DuccWorkJob duccWorkJob = (DuccWorkJob)duccWork;
          //  Below should never be null
          IDuccProcess driverProcess =
              duccWorkJob.getDriver().getProcessMap().entrySet().iterator().next().getValue();
View Full Code Here

      String jdHostClass = dpr.getCachedProperty(DuccPropertiesResolver.ducc_jd_host_class);
      long t0 = System.currentTimeMillis();
      synchronized(workMap) {
        Iterator<IDuccWork> iterator = workMap.values().iterator();
        while(iterator.hasNext()) {
          IDuccWork duccWork = iterator.next();
          switch(duccWork.getDuccType()) {
          case Job:
          case Service:
            IDuccWorkJob job = (IDuccWorkJob) duccWork;
            switch(startType) {
            case cold:
View Full Code Here

    logger.trace(methodName, null, messages.fetch("enter"));
    long t0 = System.currentTimeMillis();
    Iterator<DuccId> workMapIterator = workMap.keySet().iterator();
    while(workMapIterator.hasNext()) {
      DuccId duccId = workMapIterator.next();
      IDuccWork duccWork = workMap.findDuccWork(duccId);
      switch(duccWork.getDuccType()) {
      case Job:
      case Service:
        DuccWorkJob duccWorkJob = (DuccWorkJob)duccWork;
        if(duccWorkJob != null) {
          if(duccWorkJob.isCompleting() && allProcessesTerminated(duccWorkJob)) {
View Full Code Here

          logger.debug(methodName, duccId, messages.fetchLabel("pending additions")+rmResourceState.getPendingAdditions().size());
        }
        if(rmResourceState.getPendingRemovals() != null) {
          logger.debug(methodName, duccId, messages.fetchLabel("pending removals")+rmResourceState.getPendingRemovals().size());
        }
        IDuccWork duccWork = workMap.findDuccWork(duccId);
        if(duccWork== null) {
          logger.debug(methodName, duccId, messages.fetch("not found"));
        }
        else {
          logger.debug(methodName, duccId, messages.fetchLabel("type")+duccWork.getDuccType());
          switch(duccWork.getDuccType()) {
          case Job:
            logger.debug(methodName, duccId, messages.fetch("processing job..."));
            DuccWorkJob duccWorkJob = (DuccWorkJob) duccWork;
            processPurger(duccWorkJob,rmResourceState.getResources());
            changes += processMapResourcesAdd(duccWorkJob,rmResourceState.getPendingAdditions());
View Full Code Here

        }
        ProcessType processType = inventoryProcess.getProcessType();
        if(processType != null) {
          DuccId jobId = OrchestratorCommonArea.getInstance().getProcessAccounting().getJobId(processId);
          if(jobId != null) {
            IDuccWork duccWork = workMap.findDuccWork(jobId);
            if(duccWork != null) {
              DuccType jobType = duccWork.getDuccType();
              switch(jobType) {
              case Job:
                switch(processType) {
                case Pop:
                  OrchestratorCommonArea.getInstance().getProcessAccounting().setStatus(inventoryProcess);
View Full Code Here

      logger.debug(methodName, null, processId, messages.fetchLabel("node")+inventoryProcess.getNodeIdentity().getName()+" "+messages.fetchLabel("PID")+inventoryProcess.getPID());
      long t0 = System.currentTimeMillis();
      synchronized(workMap) {
        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) {
View Full Code Here

  }
 
 
  public int compareTo(Info info) {
    int retVal = 0;
    IDuccWork dw1 = this._dw;
    IDuccWork dw2 = info._dw;
    long f1 = dw1.getDuccId().getFriendly();
    long f2 = dw2.getDuccId().getFriendly();
    if(f1 != f2) {
      if(!dw1.isOperational() && dw2.isOperational()) {
        retVal = 1;
      }
      else if(dw1.isOperational() && !dw2.isOperational()) {
        retVal = -1;
      }
      else if(f1 > f2) {
        retVal = -1;
      }
View Full Code Here

TOP

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

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.