Class CliFrontend

java.lang.Object
org.apache.flink.client.cli.CliFrontend

public class CliFrontend extends Object
Implementation of a simple command line frontend for executing programs.
  • Constructor Details

  • Method Details

    • getConfiguration

      public org.apache.flink.configuration.Configuration getConfiguration()
      Getter which returns a copy of the associated configuration.
      Returns:
      Copy of the associated configuration
    • getCustomCommandLineOptions

      public org.apache.commons.cli.Options getCustomCommandLineOptions()
    • run

      protected void run(String[] args) throws Exception
      Executions the run action.
      Parameters:
      args - Command line arguments for the run action.
      Throws:
      Exception
    • isDeploymentTargetApplication

      protected boolean isDeploymentTargetApplication(CustomCommandLine activeCustomCommandLine, org.apache.commons.cli.CommandLine commandLine) throws org.apache.flink.util.FlinkException
      Throws:
      org.apache.flink.util.FlinkException
    • info

      protected void info(String[] args) throws Exception
      Executes the info action.
      Parameters:
      args - Command line arguments for the info action.
      Throws:
      Exception
    • list

      protected void list(String[] args) throws Exception
      Executes the list action.
      Parameters:
      args - Command line arguments for the list action.
      Throws:
      Exception
    • stop

      protected void stop(String[] args) throws Exception
      Executes the STOP action.
      Parameters:
      args - Command line arguments for the stop action.
      Throws:
      Exception
    • cancel

      protected void cancel(String[] args) throws Exception
      Executes the CANCEL action.
      Parameters:
      args - Command line arguments for the cancel action.
      Throws:
      Exception
    • getCommandLine

      public org.apache.commons.cli.CommandLine getCommandLine(org.apache.commons.cli.Options commandOptions, String[] args, boolean stopAtNonOptions) throws CliArgsException
      Throws:
      CliArgsException
    • savepoint

      protected void savepoint(String[] args) throws Exception
      Executes the SAVEPOINT action.
      Parameters:
      args - Command line arguments for the savepoint action.
      Throws:
      Exception
    • checkpoint

      protected void checkpoint(String[] args) throws Exception
      Executes the CHECKPOINT action.
      Parameters:
      args - Command line arguments for the checkpoint action.
      Throws:
      Exception
    • executeProgram

      protected void executeProgram(org.apache.flink.configuration.Configuration configuration, PackagedProgram program) throws ProgramInvocationException
      Throws:
      ProgramInvocationException
    • parseAndRun

      public int parseAndRun(String[] args)
      Parses the command line arguments and starts the requested action.
      Parameters:
      args - command line arguments of the client.
      Returns:
      The return code of the program
    • main

      public static void main(String[] args)
      Submits the job based on the arguments.
    • getConfigurationDirectoryFromEnv

      public static String getConfigurationDirectoryFromEnv()
    • loadCustomCommandLines

      public static List<CustomCommandLine> loadCustomCommandLines(org.apache.flink.configuration.Configuration configuration, String configurationDirectory)
    • validateAndGetActiveCommandLine

      public CustomCommandLine validateAndGetActiveCommandLine(org.apache.commons.cli.CommandLine commandLine)
      Gets the custom command-line for the arguments.
      Parameters:
      commandLine - The input to the command-line.
      Returns:
      custom command-line which is active (may only be one at a time)