Tabnine Logo
ProgramOptions.getJarFilePath
Code IndexAdd Tabnine to your IDE (free)

How to use
getJarFilePath
method
in
org.apache.flink.client.cli.ProgramOptions

Best Java code snippets using org.apache.flink.client.cli.ProgramOptions.getJarFilePath (Showing top 6 results out of 315)

origin: apache/flink

/**
 * Creates a Packaged program from the given command line options.
 *
 * @return A PackagedProgram (upon success)
 */
PackagedProgram buildProgram(ProgramOptions options) throws FileNotFoundException, ProgramInvocationException {
  String[] programArgs = options.getProgramArgs();
  String jarFilePath = options.getJarFilePath();
  List<URL> classpaths = options.getClasspaths();
  if (jarFilePath == null) {
    throw new IllegalArgumentException("The program JAR file was not specified.");
  }
  File jarFile = new File(jarFilePath);
  // Check if JAR file exists
  if (!jarFile.exists()) {
    throw new FileNotFoundException("JAR file does not exist: " + jarFile);
  }
  else if (!jarFile.isFile()) {
    throw new FileNotFoundException("JAR file is not a file: " + jarFile);
  }
  // Get assembler class
  String entryPointClass = options.getEntryPointClassName();
  PackagedProgram program = entryPointClass == null ?
      new PackagedProgram(jarFile, classpaths, programArgs) :
      new PackagedProgram(jarFile, classpaths, entryPointClass, programArgs);
  program.setSavepointRestoreSettings(options.getSavepointRestoreSettings());
  return program;
}
origin: apache/flink

@Test
public void testNonExistingJarFile() throws Exception {
  ProgramOptions options = mock(ProgramOptions.class);
  when(options.getJarFilePath()).thenReturn("/some/none/existing/path");
  try {
    frontend.buildProgram(options);
    fail("should throw an exception");
  }
  catch (FileNotFoundException e) {
    // that's what we want
  }
}
origin: apache/flink

@Test
public void testFileNotJarFile() throws Exception {
  ProgramOptions options = mock(ProgramOptions.class);
  when(options.getJarFilePath()).thenReturn(getNonJarFilePath());
  try {
    frontend.buildProgram(options);
    fail("should throw an exception");
  }
  catch (ProgramInvocationException e) {
    // that's what we want
  }
}
origin: org.apache.flink/flink-clients_2.11

/**
 * Creates a Packaged program from the given command line options.
 *
 * @return A PackagedProgram (upon success)
 */
PackagedProgram buildProgram(ProgramOptions options) throws FileNotFoundException, ProgramInvocationException {
  String[] programArgs = options.getProgramArgs();
  String jarFilePath = options.getJarFilePath();
  List<URL> classpaths = options.getClasspaths();
  if (jarFilePath == null) {
    throw new IllegalArgumentException("The program JAR file was not specified.");
  }
  File jarFile = new File(jarFilePath);
  // Check if JAR file exists
  if (!jarFile.exists()) {
    throw new FileNotFoundException("JAR file does not exist: " + jarFile);
  }
  else if (!jarFile.isFile()) {
    throw new FileNotFoundException("JAR file is not a file: " + jarFile);
  }
  // Get assembler class
  String entryPointClass = options.getEntryPointClassName();
  PackagedProgram program = entryPointClass == null ?
      new PackagedProgram(jarFile, classpaths, programArgs) :
      new PackagedProgram(jarFile, classpaths, entryPointClass, programArgs);
  program.setSavepointRestoreSettings(options.getSavepointRestoreSettings());
  return program;
}
origin: org.apache.flink/flink-clients_2.10

String jarFilePath = options.getJarFilePath();
List<URL> classpaths = options.getClasspaths();
origin: com.alibaba.blink/flink-clients

  throws FileNotFoundException, ProgramInvocationException {
String[] programArgs = options.getProgramArgs();
String jarFilePath = options.getJarFilePath();
List<URL> classpaths = options.getClasspaths();
org.apache.flink.client.cliProgramOptionsgetJarFilePath

Popular methods of ProgramOptions

  • getClasspaths
  • getEntryPointClassName
  • getProgramArgs
  • getSavepointRestoreSettings
  • extractMultipleURIOption
  • getFiles
  • getLibjars

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • JTextField (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now