This is an automated email from the ASF dual-hosted git repository.

huweihua pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 22028753985 [FLINK-33643][runtime] Allow StreamExecutionEnvironment's 
executeAsync API to use default JobName (#23794)
22028753985 is described below

commit 220287539854c8f32f9d85541026f2b018bd5ef3
Author: Matt Wang <wang...@163.com>
AuthorDate: Tue Nov 28 11:06:59 2023 +0800

    [FLINK-33643][runtime] Allow StreamExecutionEnvironment's executeAsync API 
to use default JobName (#23794)
---
 .../flink/streaming/api/environment/StreamExecutionEnvironment.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
index f4865edade5..4ecb9763f49 100644
--- 
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
+++ 
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
@@ -2347,9 +2347,10 @@ public class StreamExecutionEnvironment implements 
AutoCloseable {
      */
     @PublicEvolving
     public JobClient executeAsync(String jobName) throws Exception {
-        Preconditions.checkNotNull(jobName, "Streaming Job name should not be 
null.");
         final StreamGraph streamGraph = getStreamGraph();
-        streamGraph.setJobName(jobName);
+        if (jobName != null) {
+            streamGraph.setJobName(jobName);
+        }
         return executeAsync(streamGraph);
     }
 

Reply via email to