public enum ClientUtils extends Enum<ClientUtils>
Modifier and Type | Method and Description |
---|---|
static URLClassLoader |
buildUserCodeClassLoader(List<URL> jars,
List<URL> classpaths,
ClassLoader parent,
Configuration configuration) |
static void |
executeProgram(PipelineExecutorServiceLoader executorServiceLoader,
Configuration configuration,
PackagedProgram program,
boolean enforceSingleJobExecution,
boolean suppressSysout) |
static ClientUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ClientUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static void |
waitUntilJobInitializationFinished(SupplierWithException<JobStatus,Exception> jobStatusSupplier,
SupplierWithException<JobResult,Exception> jobResultSupplier,
ClassLoader userCodeClassloader)
This method blocks until the job status is not INITIALIZING anymore.
|
public static ClientUtils[] values()
for (ClientUtils c : ClientUtils.values()) System.out.println(c);
public static ClientUtils valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static URLClassLoader buildUserCodeClassLoader(List<URL> jars, List<URL> classpaths, ClassLoader parent, Configuration configuration)
public static void executeProgram(PipelineExecutorServiceLoader executorServiceLoader, Configuration configuration, PackagedProgram program, boolean enforceSingleJobExecution, boolean suppressSysout) throws ProgramInvocationException
ProgramInvocationException
public static void waitUntilJobInitializationFinished(SupplierWithException<JobStatus,Exception> jobStatusSupplier, SupplierWithException<JobResult,Exception> jobResultSupplier, ClassLoader userCodeClassloader) throws JobInitializationException
jobStatusSupplier
- supplier returning the job status.jobResultSupplier
- supplier returning the job result. This will only be called if the
job reaches the FAILED state.JobInitializationException
- If the initialization failedCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.