FLINK-13980) calculates memory setup to start TM process. Atm, we reuse this logic to get necessary resource configuration options in running TM, although we do not need the full TaskExecutorResourceSpec which can be renamed to TaskExecutorProcessSpec.
In case of local execution in mini cluster, the TM process is started outside of Flink framework and nothing is pre-calculated. It means that any configured process or Flink memory size can make no sense and can be ignored then to make things simpler and more explicit. Also the result of FLIP-49 calculation can contradict to the default values and other derived FLIP-49 memory components are not used by TM internally anyways. If some necessary options are not set, we can set them to reasonable defaults.
The configuration options required for running TM, which are expected to be calculated and set before its start, are the following (with defaults for local execution):
- cpu cores (potentially for FLIP-56, FLINK-14187, default: Double.MAX_VALUE)
- task heap memory (potentially for FLIP-56, FLINK-14187, default: MemorySize.MAX_VALUE)
- task off-heap memory (potentially for FLIP-56, FLINK-14187, default: MemorySize.MAX_VALUE)
- network memory (default: 64Mb)
- managed memory (default: 128Mb)
Additionally, we can refactor TM runner to not reuse current FLIP-49 computation but just check that the necessary options are set and create TaskExecutorResourceSpec which contains only them.