org.apache.uima.ducc.cli

Class DuccJobSubmit

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


    public class DuccJobSubmit
    extends CliBase
    Submit a DUCC job
    • Field Detail

      • opts

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

      • DuccJobSubmit

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

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

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

        public DuccJobSubmit(ArrayList<String> args,
                             IDuccCallback consoleCb)
                      throws Exception
        This form of the constructor allows the API user to capture messages, rather than directing them to stdout.
        Parameters:
        args - List of string arguments as described in the DUCC CLI reference.
        consoleCb - If provided, messages are directed to it instead of stdout.
        Throws:
        Exception - if request fails
      • DuccJobSubmit

        public DuccJobSubmit(String[] args,
                             IDuccCallback consoleCb)
                      throws Exception
        This form of the constructor allows the API user to capture messages, rather than directing them to stdout.
        Parameters:
        args - Array of string arguments as described in the DUCC CLI reference.
        consoleCb - If provided, messages are directed to it instead of stdout.
        Throws:
        Exception - if request fails
      • DuccJobSubmit

        public DuccJobSubmit(Properties props,
                             IDuccCallback consoleCb)
                      throws Exception
        This form of the constructor allows the API user to capture messages, rather than directing them to stdout.
        Parameters:
        props - Properties file containing string arguments as described in the DUCC CLI reference.
        consoleCb - If provided, messages are directed to it instead of stdout.
        Throws:
        Exception - if request fails
    • Method Detail

      • execute

        public boolean execute()
                        throws Exception
        Execute collects the job parameters, does basic error and correctness checking, and sends the job properties to the DUCC orchestrator for execution.
        Specified by:
        execute in class CliBase
        Returns:
        True if the orchestrator accepts the job; false otherwise.
        Throws:
        Exception - The specific exception is a function of the implementor.
      • getReturnCode

        public int getReturnCode()
        Return appropriate rc when job has completed.
        Overrides:
        getReturnCode in class CliBase
        Returns:
        The exit code from the job.
      • getDuccId

        public long getDuccId()
        Description copied from class: CliBase
        This returns the unique numeric id for the requested work. For submissions (job, reservation, etc) this is the newly assigned id.
        Overrides:
        getDuccId in class CliBase
        Returns:
        The unique numeric id of the job, reservation, etc.
      • 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.