[ 
https://issues.apache.org/jira/browse/FLINK-10292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16635468#comment-16635468
 ] 

ASF GitHub Bot commented on FLINK-10292:
----------------------------------------

tillrohrmann commented on a change in pull request #6786: [FLINK-10292][rest] 
Separate REST and Dispatcher RPC thread pools
URL: https://github.com/apache/flink/pull/6786#discussion_r221944785
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/WebMonitorEndpoint.java
 ##########
 @@ -180,7 +183,7 @@ public WebMonitorEndpoint(
                this.restConfiguration = 
Preconditions.checkNotNull(restConfiguration);
                this.resourceManagerRetriever = 
Preconditions.checkNotNull(resourceManagerRetriever);
                this.transientBlobService = 
Preconditions.checkNotNull(transientBlobService);
-               this.executor = Preconditions.checkNotNull(executor);
+               this.executor = 
Executors.newFixedThreadPool(endpointConfiguration.getNumThreads(), new 
ExecutorThreadFactory("Flink-" + getClass().getSimpleName()));
 
 Review comment:
   Could we still keep it like before that we pass in an `executor`? This makes 
testing much easier because you have control over the actual `ExecutorService` 
which you can pass in. What we would need is a kind of factory which is used by 
the `ClusterEntrypoint` to create the `ExecutorService` and the 
`WebMonitorEndpoint`. What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Generate JobGraph in StandaloneJobClusterEntrypoint only once
> -------------------------------------------------------------
>
>                 Key: FLINK-10292
>                 URL: https://issues.apache.org/jira/browse/FLINK-10292
>             Project: Flink
>          Issue Type: Improvement
>          Components: Distributed Coordination
>    Affects Versions: 1.6.0, 1.7.0
>            Reporter: Till Rohrmann
>            Assignee: vinoyang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0, 1.6.2
>
>
> Currently the {{StandaloneJobClusterEntrypoint}} generates the {{JobGraph}} 
> from the given user code every time it starts/is restarted. This can be 
> problematic if the the {{JobGraph}} generation has side effects. Therefore, 
> it would be better to generate the {{JobGraph}} only once and store it in HA 
> storage instead from where to retrieve.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to