yanghua commented on a change in pull request #6266: [FLINK-9682] Add 
setDescription to execution environment and provide description field for the 
rest api
URL: https://github.com/apache/flink/pull/6266#discussion_r223569543
 
 

 ##########
 File path: 
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
 ##########
 @@ -823,12 +823,29 @@ public JobExecutionResult execute() throws Exception {
         * {@link 
DataSet#write(org.apache.flink.api.common.io.FileOutputFormat, String)}, or 
other generic
         * data sinks created with {@link 
DataSet#output(org.apache.flink.api.common.io.OutputFormat)}.
         *
-        * <p>The program execution will be logged and displayed with the given 
job name.
+        * <p>The program execution will be logged and displayed with the given 
job name and a generated
+        * default description.
         *
         * @return The result of the job execution, containing elapsed time and 
accumulators.
         * @throws Exception Thrown, if the program executions fails.
         */
-       public abstract JobExecutionResult execute(String jobName) throws 
Exception;
+       public JobExecutionResult execute(String jobName) throws Exception {
+               return execute(jobName, "");
+       }
+
+       /**
+        * Triggers the program execution. The environment will execute all 
parts of the program that have
+        * resulted in a "sink" operation. Sink operations are for example 
printing results ({@link DataSet#print()},
+        * writing results (e.g. {@link DataSet#writeAsText(String)},
+        * {@link 
DataSet#write(org.apache.flink.api.common.io.FileOutputFormat, String)}, or 
other generic
+        * data sinks created with {@link 
DataSet#output(org.apache.flink.api.common.io.OutputFormat)}.
+        *
+        * <p>The program execution will be logged and displayed with the given 
job name and description.
+        *
+        * @return The result of the job execution, containing elapsed time and 
accumulators.
+        * @throws Exception Thrown, if the program executions fails.
+        */
+       public abstract JobExecutionResult execute(String jobName, String 
jobDescription) throws Exception;
 
 Review comment:
   Solved some compatibility issues, and now only this fundamental problem 
remains. cc @dawidwys and @tillrohrmann @aljoscha 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to