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

Examples of org.apache.uima.ducc.transport.event.cli.ReservationRequestProperties


    return result;
  }
   
  public static boolean request(SubmitReservationDuccEvent duccEvent) {
    boolean retVal = true;
    ReservationRequestProperties properties = (ReservationRequestProperties) duccEvent.getProperties();
    String key;
    String value;
    // memory size
    key = ReservationRequestProperties.key_number_of_instances;
    String memorySize = (String) properties.get(key);
    MemorySpecification memorySpecification = new MemorySpecification(memorySize);
    value = memorySpecification.getSize();
    if(value == null) {
      String reason = createReason("invalid", key, value);
      addError(properties,reason);
      retVal = false;
    }
    // number of machines
    key = ReservationRequestProperties.key_number_of_instances;
    value = (String) properties.get(key);
    if(value == null) {
      String reason = createReason("invalid", key, value);
      addError(properties,reason);
      retVal = false;
    }
    // scheduling class
    key = ReservationRequestProperties.key_scheduling_class;
    value = (String) properties.get(key);
    if(value == null) {
      String reason = createReason("invalid", key, value);
      addError(properties,reason);
      retVal = false;
    }
View Full Code Here


    String jdHostClass = dpr.getCachedProperty(DuccPropertiesResolver.ducc_jd_host_class);
    String jdHostDescription = dpr.getCachedProperty(DuccPropertiesResolver.ducc_jd_host_description);
    String jdHostMemorySize = dpr.getCachedProperty(DuccPropertiesResolver.ducc_jd_host_memory_size);
    String jdHostumberOfMachines = dpr.getCachedProperty(DuccPropertiesResolver.ducc_jd_host_number_of_machines);
    String jdHostUser = dpr.getCachedProperty(DuccPropertiesResolver.ducc_jd_host_user);
    ReservationRequestProperties reservationRequestProperties = new ReservationRequestProperties();
    reservationRequestProperties.put(ReservationSpecificationProperties.key_scheduling_class, jdHostClass);
    reservationRequestProperties.put(ReservationSpecificationProperties.key_description, jdHostDescription);     
    reservationRequestProperties.put(ReservationSpecificationProperties.key_instance_memory_size, jdHostMemorySize);
    reservationRequestProperties.put(ReservationSpecificationProperties.key_number_of_instances, jdHostumberOfMachines);
    reservationRequestProperties.put(ReservationSpecificationProperties.key_user, jdHostUser);
    duccWorkReservation = ReservationFactory.getInstance().create(commonConfiguration, reservationRequestProperties);
    DuccWorkMap workMap = orchestratorCommonArea.getWorkMap();
    workMap.addDuccWork(duccWorkReservation);
    // state: Received
    duccWorkReservation.stateChange(ReservationState.Received);
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.event.cli.ReservationRequestProperties

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.