org.apache.uima.ducc.cli
Class DuccReservationSubmit
java.lang.Object
org.apache.uima.ducc.cli.CliBase
org.apache.uima.ducc.cli.DuccReservationSubmit
- All Implemented Interfaces:
- org.apache.uima.ducc.cli.IUiOptions
public class DuccReservationSubmit
- extends CliBase
Submit a DUCC reservation
Nested classes/interfaces inherited from interface org.apache.uima.ducc.cli.IUiOptions |
org.apache.uima.ducc.cli.IUiOptions.ClasspathOrderParms, org.apache.uima.ducc.cli.IUiOptions.UiOption |
Fields inherited from interface org.apache.uima.ducc.cli.IUiOptions |
help_width |
Method Summary |
boolean |
execute()
Execute collects the parameters for the reservation and sends them to the DUCC Orchestrator
to schedule the reservation. |
String[] |
getHosts()
If the reservation is granted, this method returns the set of hosts containing the reservation. |
String |
getHostsAsString()
If the reservation is granted, this method returns the set of hosts containing the reservation as
a single blank-delimeted string. |
static void |
main(String[] args)
Main method, as used by the executable jar or direct java invocation. |
DuccReservationSubmit
public DuccReservationSubmit(String[] args)
throws Exception
- Parameters:
args
- Array of string arguments as described in the
DUCC CLI reference.
- Throws:
Exception
DuccReservationSubmit
public DuccReservationSubmit(ArrayList<String> args)
throws Exception
- Parameters:
args
- List of string arguments as described in the
DUCC CLI reference.
- Throws:
Exception
DuccReservationSubmit
public DuccReservationSubmit(Properties props)
throws Exception
- Parameters:
props
- Properties file of arguments, as described in the
DUCC CLI reference.
- Throws:
Exception
execute
public boolean execute()
- 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 are granted all-or-nothing: you get everything you ask for, or you get nothing.
- Specified by:
execute
in class CliBase
- Returns:
- True if the DUCC grants the reservation.
getHosts
public String[] getHosts()
- 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
public String getHostsAsString()
- If the reservation is granted, this method returns the set of hosts containing the reservation as
a single blank-delimeted string.
- Returns:
- Blank-delimeted 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–2014 The Apache Software Foundation. All rights reserved.