curcur commented on a change in pull request #17701:
URL: https://github.com/apache/flink/pull/17701#discussion_r747263950
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -238,6 +241,8 @@
/** The currently active background materialization threads. */
private final CloseableRegistry cancelables = new CloseableRegistry();
+ private final Closer allCloseableResources;
Review comment:
`allCloseableResources` -> `resourceCloser`
I guess the name is a bit confusing. This is a closer not resource :-)
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -978,6 +998,18 @@ private void shutdownAsyncThreads() throws Exception {
}
}
+ private static Closeable toCloseable(AutoCloseable autoCloseable) {
+ return () -> {
+ try {
+ autoCloseable.close();
+ } catch (IOException ex) {
+ throw ex;
+ } catch (Exception exception) {
+ rethrow(exception);
+ }
+ };
+ }
+
Review comment:
Just a quick sum-up on this based on the offline discussion:
it is better not to wrap to RuntimeException because it changes the
footprint of StreamTask
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]