tillrohrmann commented on a change in pull request #6406: [FLINK-9159][runtime]
Sanity check default timeout values
URL: https://github.com/apache/flink/pull/6406#discussion_r206500540
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerConfiguration.java
##########
@@ -68,11 +74,24 @@ public static SlotManagerConfiguration
fromConfiguration(Configuration configura
"value " + AkkaOptions.ASK_TIMEOUT + '.', e);
}
- final Time slotRequestTimeout = Time.milliseconds(
-
configuration.getLong(ResourceManagerOptions.SLOT_REQUEST_TIMEOUT));
+ final Time slotRequestTimeout =
getSlotRequestTimeout(configuration);
final Time taskManagerTimeout = Time.milliseconds(
configuration.getLong(ResourceManagerOptions.TASK_MANAGER_TIMEOUT));
return new SlotManagerConfiguration(rpcTimeout,
slotRequestTimeout, taskManagerTimeout);
}
+
+ private static Time getSlotRequestTimeout(final Configuration
configuration) {
+ final long legacySlotRequestTimeoutMs =
configuration.getLong(ResourceManagerOptions.SLOT_REQUEST_TIMEOUT);
+ final long slotRequestTimeoutMs;
+ if (legacySlotRequestTimeoutMs ==
ResourceManagerOptions.SLOT_REQUEST_TIMEOUT.defaultValue()) {
Review comment:
I think
`configuration.contains(ResourceManagerOptions.SLOT_REQUEST_TIMEOUT)` would be
more accurate because one could set this option accidentally to the default
value.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services