Package org.apache.flink.runtime.client
Enum ClientUtils
- All Implemented Interfaces:
Serializable,Comparable<ClientUtils>
Contains utility methods for clients.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidextractAndUploadExecutionPlanFiles(ExecutionPlan executionPlan, org.apache.flink.util.function.SupplierWithException<BlobClient, IOException> clientSupplier) Extracts all files required for the execution from the givenExecutionPlanand uploads them using theBlobClientfrom the givenSupplier.static voiduploadExecutionPlanFiles(ExecutionPlan executionPlan, 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 givenExecutionPlanusing theBlobClientfrom the givenSupplier.static ClientUtilsReturns 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 Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
extractAndUploadExecutionPlanFiles
public static void extractAndUploadExecutionPlanFiles(ExecutionPlan executionPlan, org.apache.flink.util.function.SupplierWithException<BlobClient, IOException> clientSupplier) throws org.apache.flink.util.FlinkExceptionExtracts all files required for the execution from the givenExecutionPlanand uploads them using theBlobClientfrom the givenSupplier.- Parameters:
executionPlan- executionPlan requiring filesclientSupplier- supplier of blob client to upload files with- Throws:
org.apache.flink.util.FlinkException- if the upload fails
-
uploadExecutionPlanFiles
public static void uploadExecutionPlanFiles(ExecutionPlan executionPlan, 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, throws org.apache.flink.util.FlinkExceptionIOException> clientSupplier) Uploads the given jars and artifacts required for the execution of the givenExecutionPlanusing theBlobClientfrom the givenSupplier.- Parameters:
executionPlan- executionPlan 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
-