zentol commented on a change in pull request #14821:
URL: https://github.com/apache/flink/pull/14821#discussion_r570235182



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/ClusterEntrypoint.java
##########
@@ -506,7 +506,7 @@ private Configuration 
generateClusterConfiguration(Configuration configuration)
      *
      * @throws IOException if the temporary directories could not be cleaned up
      */
-    private void cleanupDirectories() throws IOException {
+    public void cleanupDirectories() throws IOException {

Review comment:
       why not protected?

##########
File path: 
flink-clients/src/main/java/org/apache/flink/client/deployment/application/ApplicationClusterEntryPoint.java
##########
@@ -114,4 +115,16 @@ protected static void configureExecution(
         return Collections.unmodifiableList(
                 classpath.stream().distinct().collect(Collectors.toList()));
     }
+
+    @Override
+    public void cleanupDirectories() throws IOException {
+        try {
+            // Close the packaged program explicitly to clean up temporary 
jars.
+            program.close();

Review comment:
       this will never throw an exception, and even if then we wouldn't want to 
rethrow it because it would skip `super.cleanupDirectories`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to