tillrohrmann commented on issue #9760: [FLINK-13982][runtime] Implement memory 
calculation logics
URL: https://github.com/apache/flink/pull/9760#issuecomment-538377296
 
 
   Ok, I think you are right that producing a meaningful error message can be 
hard based on the linear program's solvability result @xintongsong.
   
   If I understood the configuration options correctly, then we need at least 
one of the following options to be configured: `TOTAL_PROCESS_MEMORY`, 
`TOTAL_FLINK_MEMORY` or `TASK_HEAP_MEMORY`. If none is set, then we can fail 
and tell the user about it.
   
   If at least one of these options is set, one could theoretically compute all 
the remaining values (either based on fraction or concrete size value). 
However, it is not guaranteed that the result given other explicitly configured 
values is actually valid. I guess this actually only affects the above 
mentioned options. Hence, it could be enough to simply check at the end whether 
the explicit values of `TOTAL_PROCESS_MEMORY`, `TOTAL_FLINK_MEMORY` or 
`TASK_HEAP_MEMORY` match the result.
   
   Long story short, I'm ok with using the if-else approach since it allows to 
give better error messages. For me, the important bit is that we use all 
explicitly configured values and that we do a sanity check.

----------------------------------------------------------------
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

Reply via email to