Package org.apache.uima.ducc.common.utils.id

Examples of org.apache.uima.ducc.common.utils.id.DuccId


    int removed = 0;
    try {
      ArrayList<String> qList = getJdQueues();
      Iterator<DuccId> iterator = workMap.getJobKeySet().iterator();
      while( iterator.hasNext() ) {
        DuccId jobId = iterator.next();
        String jqKeep = jd_queue_prefix+jobId.getFriendly();
        if(qList.remove(jqKeep)) {
          logger.debug(location, duccId, "queue keep:"+jqKeep);
        }
        else {
          logger.trace(location, duccId, "queue not found:"+jqKeep);
View Full Code Here


    return published;
  }
 
  public void putIfNotPresent(IDuccWork duccWork) {
    synchronized(this) {
      DuccId duccId = duccWork.getDuccId();
      if(duccWorkMap.findDuccWork(duccId) == null) {
        duccWorkMap.addDuccWork(duccWork);
        updateSortedMaps(duccWork);
      }
    }
View Full Code Here

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

      DuccWorkMap mapCopy = map.deepCopy();
      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;
View Full Code Here

      int count = 0;
      for(JobInfo jobInfo : sortedJobs.keySet()) {
        if(!jobInfo.isOperational()) {
          count++;
          if(count > DuccBoot.maxJobs) {
            DuccId duccId = jobInfo.getJob().getDuccId();
            sortedJobs.remove(jobInfo);
            keyMapJobs.remove(duccId);
            pagingObserver.remove(duccId);
            logger.info(location, duccId, "size: "+sortedJobs.size());
            pruned++;
View Full Code Here

      int count = 0;
      for(ReservationInfo reservationInfo : sortedReservations.keySet()) {
        if(!reservationInfo.isOperational()) {
          count++;
          if(count > DuccBoot.maxReservations) {
            DuccId duccId = reservationInfo.getReservation().getDuccId();
            sortedReservations.remove(reservationInfo);
            keyMapReservations.remove(duccId);
            logger.info(location, duccId, "size: "+sortedReservations.size());
            pruned++;
          }
View Full Code Here

      int count = 0;
      for(JobInfo jobInfo : sortedServices.keySet()) {
        if(!jobInfo.isOperational()) {
          count++;
          if(count > DuccBoot.maxServices) {
            DuccId duccId = jobInfo.getJob().getDuccId();
            sortedServices.remove(jobInfo);
            keyMapServices.remove(duccId);
            logger.info(location, duccId, "size: "+sortedServices.size());
            pruned++;
          }
View Full Code Here

      int count = 0;
      for(Info info : sortedCombinedReservations.keySet()) {
        if(!info.isOperational()) {
          count++;
          if(count > DuccBoot.maxReservations) {
            DuccId duccId = info.getDuccWork().getDuccId();
            sortedCombinedReservations.remove(info);
            keyMapCombinedReservations.remove(duccId);
            logger.info(location, duccId, "size: "+sortedCombinedReservations.size());
            pruned++;
          }
View Full Code Here

    return retVal;
  }
 
  private void updateJobs(IDuccWork duccWork) {
    String location = "updateJobs";
    DuccId duccId = duccWork.getDuccId();
    DuccWorkJob job = (DuccWorkJob)duccWork;
    if(keyMapJobs.containsKey(duccId)) {
      sortedJobs.remove(keyMapJobs.get(duccId));
      keyMapJobs.remove(duccId);
    }
View Full Code Here

    }
  }
 
  private void updateReservations(IDuccWork duccWork) {
    String location = "updateReservations";
    DuccId duccId = duccWork.getDuccId();
    DuccWorkReservation reservation = (DuccWorkReservation)duccWork;
    if(keyMapReservations.containsKey(duccId)) {
      sortedReservations.remove(keyMapReservations.get(duccId));
      keyMapReservations.remove(duccId);
    }
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.common.utils.id.DuccId

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.