public class FromClasspathEntryClassInformationProvider extends Object implements EntryClassInformationProvider
FromClasspathEntryClassInformationProvider assumes the passed job class being available
on some classpath.| Modifier and Type | Method and Description |
|---|---|
static FromClasspathEntryClassInformationProvider |
create(String jobClassName,
Iterable<URL> classpath)
Creates a
FromClasspathEntryClassInformationProvider based on the passed job class
and classpath. |
static FromClasspathEntryClassInformationProvider |
createFromClasspath(Iterable<URL> classpath)
Creates a
FromClasspathEntryClassInformationProvider looking for the entry class
providing the main method on the passed classpath. |
static FromClasspathEntryClassInformationProvider |
createFromSystemClasspath()
Creates a
FromClasspathEntryClassInformationProvider looking for the entry class
providing the main method on the system classpath. |
static FromClasspathEntryClassInformationProvider |
createWithJobClassAssumingOnSystemClasspath(String jobClassName)
Creates a
FromClasspathEntryClassInformationProvider assuming that the passed job
class is available on the system classpath. |
Optional<File> |
getJarFile()
Always returns an empty
Optional because this implementation relies on the JAR
archive being available on either the user or the system classpath. |
Optional<String> |
getJobClassName()
Returns the job class name if it could be derived from the specified classpath or was
explicitly specified.
|
public static FromClasspathEntryClassInformationProvider create(String jobClassName, Iterable<URL> classpath) throws IOException, org.apache.flink.util.FlinkException
FromClasspathEntryClassInformationProvider based on the passed job class
and classpath.jobClassName - The job's class name.classpath - The classpath the job class should be part of.FromClasspathEntryClassInformationProvider instances collecting the
necessary information.IOException - If some Jar listed on the classpath wasn't accessible.org.apache.flink.util.FlinkException - If the passed job class is not present on the passed classpath.public static FromClasspathEntryClassInformationProvider createFromClasspath(Iterable<URL> classpath) throws IOException, org.apache.flink.util.FlinkException
FromClasspathEntryClassInformationProvider looking for the entry class
providing the main method on the passed classpath.classpath - The classpath the job class is expected to be part of.FromClasspathEntryClassInformationProvider providing the job class found
on the passed classpath.IOException - If some Jar listed on the classpath wasn't accessible.org.apache.flink.util.FlinkException - Either no or too many main methods were found on the classpath.public static FromClasspathEntryClassInformationProvider createFromSystemClasspath() throws IOException, org.apache.flink.util.FlinkException
FromClasspathEntryClassInformationProvider looking for the entry class
providing the main method on the system classpath.FromClasspathEntryClassInformationProvider providing the job class found
on the system classpath.IOException - If some Jar listed on the system classpath wasn't accessible.org.apache.flink.util.FlinkException - Either no or too many main methods were found on the system classpath.public static FromClasspathEntryClassInformationProvider createWithJobClassAssumingOnSystemClasspath(String jobClassName)
FromClasspathEntryClassInformationProvider assuming that the passed job
class is available on the system classpath.jobClassName - The job class name working as the entry point.FromClasspathEntryClassInformationProvider providing the job class found.public Optional<File> getJarFile()
Optional because this implementation relies on the JAR
archive being available on either the user or the system classpath.getJarFile in interface EntryClassInformationProviderOptional.public Optional<String> getJobClassName()
getJobClassName in interface EntryClassInformationProviderOptional if none was specified and it couldn't
be derived from the classpath.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.