azagrebin commented on a change in pull request #10161: [FLINK-13986][runtime]
Clean up legacy code for FLIP-49.
URL: https://github.com/apache/flink/pull/10161#discussion_r347428693
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/ContaineredTaskManagerParameters.java
##########
@@ -33,47 +31,36 @@
private static final long serialVersionUID = -3096987654278064670L;
- /** Total container memory, in bytes. */
- private final long totalContainerMemoryMB;
-
- /** Heap size to be used for the Java process. */
- private final long taskManagerHeapSizeMB;
-
- /** Direct memory limit for the Java process. */
- private final long taskManagerDirectMemoryLimitMB;
-
/** The number of slots per TaskManager. */
private final int numSlots;
/** Environment variables to add to the Java process. */
private final HashMap<String, String> taskManagerEnv;
+ private final TaskExecutorResourceSpec taskExecutorResourceSpec;
+
public ContaineredTaskManagerParameters(
- long totalContainerMemoryMB,
- long taskManagerHeapSizeMB,
- long taskManagerDirectMemoryLimitMB,
+ TaskExecutorResourceSpec taskExecutorResourceSpec,
int numSlots,
HashMap<String, String> taskManagerEnv) {
- this.totalContainerMemoryMB = totalContainerMemoryMB;
- this.taskManagerHeapSizeMB = taskManagerHeapSizeMB;
- this.taskManagerDirectMemoryLimitMB =
taskManagerDirectMemoryLimitMB;
+ this.taskExecutorResourceSpec = taskExecutorResourceSpec;
this.numSlots = numSlots;
this.taskManagerEnv = taskManagerEnv;
}
//
------------------------------------------------------------------------
- public long taskManagerTotalMemoryMB() {
- return totalContainerMemoryMB;
+ public TaskExecutorResourceSpec getTaskExecutorResourceSpec() {
+ return taskExecutorResourceSpec;
}
public long taskManagerHeapSizeMB() {
- return taskManagerHeapSizeMB;
+ return
taskExecutorResourceSpec.getJvmHeapMemorySize().getMebiBytes();
Review comment:
do we still need `taskManagerHeapSizeMB` and
`taskManagerDirectMemoryLimitMB`?
we should probably remove them and adjust or remove tests using them.
----------------------------------------------------------------
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