azagrebin commented on a change in pull request #9801: [FLINK-13983][runtime]
Launch task executor with new memory calculation logics
URL: https://github.com/apache/flink/pull/9801#discussion_r334596612
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NettyShuffleEnvironmentConfiguration.java
##########
@@ -450,12 +452,16 @@ private static int getDataport(Configuration
configuration) {
*
* @param configuration configuration object
* @param maxJvmHeapMemory the maximum JVM heap size (in bytes)
+ * @param shuffleMemorySize the size of memory reserved for shuffle
environment, null if flip49 is disabled
+ * @param pageSize size of memory segment
* @return the number of network buffers
*/
@SuppressWarnings("deprecation")
- private static int calculateNumberOfNetworkBuffers(Configuration
configuration, long maxJvmHeapMemory) {
+ private static int calculateNumberOfNetworkBuffers(Configuration
configuration, long maxJvmHeapMemory, MemorySize shuffleMemorySize, int
pageSize) {
final int numberOfNetworkBuffers;
- if (!hasNewNetworkConfig(configuration)) {
+ if (shuffleMemorySize != null) { // flip49 enbaled
+ numberOfNetworkBuffers =
calculateNumberOfNetworkBuffers(shuffleMemorySize.getBytes(), pageSize);
Review comment:
Here we could also output an info log that we ignore any present
old/deprecated config options
----------------------------------------------------------------
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