tillrohrmann commented on a change in pull request #18083:
URL: https://github.com/apache/flink/pull/18083#discussion_r785018946



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/ClusterEntrypoint.java
##########
@@ -507,9 +530,15 @@ private Configuration 
generateClusterConfiguration(Configuration configuration)
             final CompletableFuture<Void> rpcSystemClassLoaderCloseFuture =
                     FutureUtils.runAfterwards(serviceShutdownFuture, 
rpcSystem::close);
 
-            final CompletableFuture<Void> cleanupDirectoriesFuture =
-                    FutureUtils.runAfterwards(
-                            rpcSystemClassLoaderCloseFuture, 
this::cleanupDirectories);
+            final CompletableFuture<Void> cleanupDirectoriesFuture;
+
+            if (shutdownBehaviour == ShutdownBehaviour.STOP_APPLICATION) {

Review comment:
       Will do. I agree that the `ShutdownBehaviour` variants are not very 
declarative. I also have to look them up every time. Maybe we should simply 
rename them into `STOP_APPLICATION` --> `GRACEFUL_SHUTDOWN` and `STOP_PROCESS` 
--> `KILL`.




-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

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


Reply via email to