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



##########
File path: 
flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/executor/TestExecutorServiceResource.java
##########
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.testutils.executor;
+
+import org.junit.rules.ExternalResource;
+
+import java.util.concurrent.ExecutorService;
+import java.util.function.Supplier;
+
+/**
+ * Resource which starts an {@link ExecutorService} for testing purposes.
+ */
+public class TestExecutorServiceResource extends ExternalResource {

Review comment:
       I wouldn't say that it is a duplicate since one works against the java 
`ExecutorService` while the other against the flink-runtime `ScheduledExecutor`.
   
   They are ultimately similar yes, but this one is usable without depending on 
flink-runtime (in particular, without depending on the flink-runtime test-jar).

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java
##########
@@ -265,10 +265,15 @@ public static TaskManagerServices fromConfiguration(
                // start the I/O manager, it will create some temp directories.
                final IOManager ioManager = new 
IOManagerAsync(taskManagerServicesConfiguration.getTmpDirPaths());
 
+               final ExecutorService ioExecutor = Executors.newFixedThreadPool(

Review comment:
       Well, one reason is uncertainty.
   
   Do you know how many resources the state cleanup currently siphons from the 
[RpcService 
executor](https://github.com/apache/flink/blob/5dededa06592e4b68023bb3a3282849038f18fa2/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunner.java#L373)?
   
   I don't disagree with your take in general, but as is the PR is pretty safe 
to back-port to older versions.
   I'm not so sure about this if we include the taskIOExecutor change; we don't 
have to look back very far for issues when we moved things away from the RPC 
executor (FLINK-17248).
   




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


Reply via email to