Package org.apache.flink.runtime.client
Enum ClientUtils
- java.lang.Object
-
- java.lang.Enum<ClientUtils>
-
- org.apache.flink.runtime.client.ClientUtils
-
- All Implemented Interfaces:
Serializable
,Comparable<ClientUtils>
public enum ClientUtils extends Enum<ClientUtils>
Contains utility methods for clients.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
extractAndUploadJobGraphFiles(JobGraph jobGraph, org.apache.flink.util.function.SupplierWithException<BlobClient,IOException> clientSupplier)
Extracts all files required for the execution from the givenJobGraph
and uploads them using theBlobClient
from the givenSupplier
.static void
uploadJobGraphFiles(JobGraph jobGraph, Collection<org.apache.flink.core.fs.Path> userJars, Collection<org.apache.flink.api.java.tuple.Tuple2<String,org.apache.flink.core.fs.Path>> userArtifacts, org.apache.flink.util.function.SupplierWithException<BlobClient,IOException> clientSupplier)
Uploads the given jars and artifacts required for the execution of the givenJobGraph
using theBlobClient
from the givenSupplier
.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.
-
-
-
Method Detail
-
values
public static ClientUtils[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ClientUtils c : ClientUtils.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClientUtils valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
extractAndUploadJobGraphFiles
public static void extractAndUploadJobGraphFiles(JobGraph jobGraph, org.apache.flink.util.function.SupplierWithException<BlobClient,IOException> clientSupplier) throws org.apache.flink.util.FlinkException
Extracts all files required for the execution from the givenJobGraph
and uploads them using theBlobClient
from the givenSupplier
.- Parameters:
jobGraph
- jobgraph requiring filesclientSupplier
- supplier of blob client to upload files with- Throws:
org.apache.flink.util.FlinkException
- if the upload fails
-
uploadJobGraphFiles
public static void uploadJobGraphFiles(JobGraph jobGraph, Collection<org.apache.flink.core.fs.Path> userJars, Collection<org.apache.flink.api.java.tuple.Tuple2<String,org.apache.flink.core.fs.Path>> userArtifacts, org.apache.flink.util.function.SupplierWithException<BlobClient,IOException> clientSupplier) throws org.apache.flink.util.FlinkException
Uploads the given jars and artifacts required for the execution of the givenJobGraph
using theBlobClient
from the givenSupplier
.- Parameters:
jobGraph
- jobgraph requiring filesuserJars
- jars to uploaduserArtifacts
- artifacts to uploadclientSupplier
- supplier of blob client to upload files with- Throws:
org.apache.flink.util.FlinkException
- if the upload fails
-
-