zhijiangW commented on a change in pull request #10736: [FLINK-15010][Network]
Add shutdown hook to ensure cleanup netty shuffle directories
URL: https://github.com/apache/flink/pull/10736#discussion_r368787114
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/FileChannelManagerImpl.java
##########
@@ -51,12 +54,27 @@
/** The number of the next path to use. */
private volatile int nextPath;
+ /** Prefix of the temporary directories to create */
+ private final String prefix;
+
+ /** Flag to signify that the file channel manager has been shut down
already. */
+ private final AtomicBoolean isShutdown = new AtomicBoolean();
Review comment:
I think we should give some comments for the reason of atomic here, which is
for the case of multiple shutdown hooks.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services