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

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


        if(reservation.isOperational()) {
          IDuccReservationMap reservationMap = reservation.getReservationMap();
          Iterator<DuccId> iteratorS = reservationMap.keySet().iterator();
          while(iteratorS.hasNext()) {
            DuccId spid = iteratorS.next();
            IDuccReservation rs = reservationMap.get(spid);
            NodeIdentity nodeIdentity = rs.getNodeIdentity();
            String key = nodeIdentity.getIp().trim();
            Integer value = new Integer(0);
            if(!properties.containsKey(key)) {
              properties.put(key, value);
            }
            int shares = rs.getShares();
            value = (Integer)properties.get(key) + shares;
            properties.put(key,value);
          }
        }
      }
View Full Code Here


        properties.put(ReservationRequestProperties.key_node_list, "");
        if(!duccWorkReservation.getReservationMap().isEmpty()) {
          StringBuffer sb = new StringBuffer();
          IDuccReservationMap map = duccWorkReservation.getReservationMap();
          for (DuccId key : map.keySet()) {
            IDuccReservation value = duccWorkReservation.getReservationMap().get(key);
            String node = value.getNodeIdentity().getName();
            sb.append(node);
            sb.append(" ");
          }
          properties.put(ReservationRequestProperties.key_node_list,sb.toString().trim());
        }
View Full Code Here

                {
                    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)) ) {
                                logger.warn(methodName, j.getId(), "Redrive share assignment:", s);
                                ret.put(s, s);
                            }
View Full Code Here

      DuccId id1 = new DuccId(100);
      DuccId id2 = new DuccId(101);
      DuccId id3 = new DuccId(102);
      DuccId id4 = new DuccId(103);

      IDuccReservation reservation1 = new DuccReservation(id1, ni1, 1);
      reserveMap.addReservation(reservation1);
      IDuccReservation reservation2 = new DuccReservation(id2, ni2, 1);
      reserveMap.addReservation(reservation2);
      IDuccReservation reservation4 = new DuccReservation(id4, ni4, 1);
      reserveMap.addReservation(reservation4);

      IDuccReservation reservation3 = new DuccReservation(id3, ni3, 1);
      reserveMap2.addReservation(reservation3);

      DuccUserReservation reserve = new DuccUserReservation("joe", new DuccId(500), reserveMap);
      DuccUserReservation reserve2 = new DuccUserReservation("jane", new DuccId(500), reserveMap2);
      reserves.add(reserve);
View Full Code Here

            IDuccReservationMap map = duccWorkReservation.getReservationMap();
            if(!map.isEmpty()) {
              keyList = new ArrayList<String>();
              nodeMap = new TreeMap<String,NodeIdentity>();
              for (DuccId key : map.keySet()) {
                IDuccReservation value = duccWorkReservation.getReservationMap().get(key);
                NodeIdentity node = value.getNodeIdentity();
                addNode(node);
                logger.info(methodName, null, messages.fetchLabel("assigned")+node.getName()+" "+node.getIp());
              }
            }
          }
View Full Code Here

    if(duccwork instanceof DuccWorkReservation) {
      DuccWorkReservation reservation = (DuccWorkReservation) duccwork;
      if(!reservation.getReservationMap().isEmpty()) {
        IDuccReservationMap map = reservation.getReservationMap();
        for (DuccId key : map.keySet()) {
          IDuccReservation value = reservation.getReservationMap().get(key);
          String node = value.getNodeIdentity().getName();
          if(!nodeMap.containsKey(node)) {
            nodeMap.put(node,new Integer(0));
          }
          Integer count = nodeMap.get(node);
          count++;
View Full Code Here

    if(duccwork instanceof DuccWorkReservation) {
      DuccWorkReservation reservation = (DuccWorkReservation) duccwork;
      if(!reservation.getReservationMap().isEmpty()) {
        IDuccReservationMap map = reservation.getReservationMap();
        for (DuccId key : map.keySet()) {
          IDuccReservation value = reservation.getReservationMap().get(key);
          String node = value.getNodeIdentity().getName();
          if(!nodeMap.containsKey(node)) {
            nodeMap.put(node,new Integer(0));
          }
          Integer count = nodeMap.get(node);
          count++;
View Full Code Here

TOP

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

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.