zhijiangW commented on a change in pull request #8704: [FLINK-12812][runtime]
Set resource profiles for task slots
URL: https://github.com/apache/flink/pull/8704#discussion_r299396014
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
##########
@@ -1191,8 +1197,32 @@ protected int getNumberRequiredTaskManagerSlots() {
// Helper methods
//
------------------------------------------------------------------------
- protected static Collection<ResourceProfile> createSlotsPerWorker(int
numSlots) {
- return Collections.nCopies(numSlots, ResourceProfile.ANY);
+ @VisibleForTesting
+ public static Collection<ResourceProfile>
createSlotsPerWorker(Configuration config, long totalMemoryMB, int numSlots) {
+ final long cutoffMB =
ContaineredTaskManagerParameters.calculateCutoffMB(config, totalMemoryMB);
+
+ final long networkMB =
NettyShuffleEnvironmentConfiguration.calculateNetworkBufferMemory(
Review comment:
In reality
`NettyShuffleEnvironmentConfiguration.calculateNetworkBufferMemory` should not
be exposed outside based on pluggable shuffle service proposed in
[FLINK-12110](https://issues.apache.org/jira/browse/FLINK-12110), so I suggest
not covering network factor in `ResourceProfile` atm.
----------------------------------------------------------------
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