org.apache.uima.ducc.cli

Class DuccReservationSubmit

  • All Implemented Interfaces:
    org.apache.uima.ducc.cli.IUiOptions


    public class DuccReservationSubmit
    extends CliBase
    Submit a DUCC reservation
    • Field Detail

      • requestProperties

        org.apache.uima.ducc.transport.event.cli.ReservationRequestProperties requestProperties
      • opts

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] opts
    • Constructor Detail

      • DuccReservationSubmit

        public DuccReservationSubmit(String[] args)
                              throws Exception
        Parameters:
        args - Array of string arguments as described in the Command Line Interface section of the DuccBook
        Throws:
        Exception - if request fails
      • DuccReservationSubmit

        public DuccReservationSubmit(ArrayList<String> args)
                              throws Exception
        Parameters:
        args - List of string arguments as described in the Command Line Interface section of the DuccBook
        Throws:
        Exception - if request fails
      • DuccReservationSubmit

        public DuccReservationSubmit(Properties props)
                              throws Exception
        Parameters:
        props - Properties file of arguments, as described in the Command Line Interface section of the DuccBook
        Throws:
        Exception - if request fails
    • Method Detail

      • execute

        public boolean execute()
                        throws Exception
        Execute collects the parameters for the reservation and sends them to the DUCC Orchestrator to schedule the reservation. This method blocks until either the reservation is granted, or it fails. Failure is always do to lack of resources, in some form or another. Reservations must be from one of the 'reserve' classes i.e for a whole machine.
        Specified by:
        execute in class CliBase
        Returns:
        True if the DUCC grants the reservation.
        Throws:
        Exception - if request fails
      • getHost

        public String getHost()
        If the reservation is granted, this method returns the reserved host
        Returns:
        Name of host where the reservation is granted.
      • getHosts

        @Deprecated
        public String[] getHosts()
        Deprecated. 
        If the reservation is granted, this method returns the set of hosts containing the reservation.
        Returns:
        String array of hosts where the reservation is granted.
      • getHostsAsString

        @Deprecated
        public String getHostsAsString()
        Deprecated. 
        If the reservation is granted, this method returns the set of hosts containing the reservation as a single blank-delimited string.
        Returns:
        Blank-delimited string of hosts where the reservation is granted.
      • main

        public static void main(String[] args)
        Main method, as used by the executable jar or direct java invocation.
        Parameters:
        args - arguments as described in the DUCC CLI reference.

Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.