gaoyunhaii commented on a change in pull request #8740: [FLINK-12763][runtime] 
Fail job immediately if tasks’ resource needs can not be satisfied.
URL: https://github.com/apache/flink/pull/8740#discussion_r294182644
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/StandaloneResourceManagerFactory.java
 ##########
 @@ -54,6 +57,14 @@
                        highAvailabilityServices,
                        rpcService.getScheduledExecutor());
 
+               final Time clusterInitTime;
+               if 
(configuration.contains(ResourceManagerOptions.CLUSTER_INITIALIZATION_TIME) &&
+                       
configuration.getLong(ResourceManagerOptions.CLUSTER_INITIALIZATION_TIME) > 0) {
+                       clusterInitTime = 
Time.milliseconds(configuration.getLong(ResourceManagerOptions.CLUSTER_INITIALIZATION_TIME));
+               } else {
+                       clusterInitTime = 
Time.milliseconds(configuration.getLong(JobManagerOptions.SLOT_REQUEST_TIMEOUT));
+               }
+
 
 Review comment:
   Paring of clusterInitTime occurs in both `StandaloneResourceManagerFactory` 
and `StandaloneResourceManagerWithUUIDFactory`, I think it can be moved to 
somewhere in common and here we can get the parsed value directly.

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

Reply via email to