tillrohrmann commented on a change in pull request #10608:
[FLINK-15300][Runtime] Fix sanity check to not fail if shuffle memory fraction
is out of min/max range
URL: https://github.com/apache/flink/pull/10608#discussion_r358904067
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/TaskExecutorResourceUtils.java
##########
@@ -551,10 +551,16 @@ private static void sanityCheckShuffleMemory(final
Configuration config, final M
+
shuffleRangeFraction.maxSize.toString() + "].");
}
if (isShuffleMemoryFractionExplicitlyConfigured(config)
&&
-
!derivedShuffleMemorySize.equals(totalFlinkMemorySize.multiply(shuffleRangeFraction.fraction)))
{
- throw new
IllegalConfigurationException("Derived Shuffle Memory size("
- + derivedShuffleMemorySize.toString() +
") does not match configured Shuffle Memory fraction ("
- + shuffleRangeFraction.fraction + ").");
+
!derivedShuffleMemorySize.equals(totalFlinkMemorySize.multiply(shuffleRangeFraction.fraction))
&&
+ derivedShuffleMemorySize.getBytes() <
shuffleRangeFraction.maxSize.getBytes() &&
+ derivedShuffleMemorySize.getBytes() >
shuffleRangeFraction.minSize.getBytes()) {
Review comment:
I would factor the range checks out into `isContainedInRange(memory, min,
max)`. Maybe this can be reused somewhere else.
----------------------------------------------------------------
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