New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-20864][runtime] Apply exactly matching for fine-rained resource profiles #14612
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit bf9637f (Fri May 28 07:06:50 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
@KarmaGYZ First of all, it complicates the concepts. Currently,
I think we might want to have two separate classes I see how matching unknown requests only to the default slots may help in fine-grained resource management. When there are both fine-grained and unknown requests, the fine-grained requests may create slots with very different resources. Once these slots are reused for the unknown requirements, performance of tasks with unknown requirements could be very unstable, depending on how many resource the reused slot has. However, I would consider having fine-grained and unknown resource requirements together as a follow-up improvement. I'd rather not touching the matching rules for the unknown requirements for a future improvement, at the risk that the existing corse-grained resource management might also be affected. |
Having two separate classes For the matching logic, I agree that we can treat fine-grained and unknown resource requirements together as a follow-up improvement at the moment. I'll prepare an update soon. |
...k-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java
Show resolved
Hide resolved
...k-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTableImpl.java
Show resolved
Hide resolved
...ntime/src/test/java/org/apache/flink/runtime/clusterframework/types/ResourceProfileTest.java
Show resolved
Hide resolved
Thanks for the review, @xintongsong . PR updated. |
…source management
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @KarmaGYZ.
The changes LGTM, expect for the message of the hotfix commit is a bit less descriptive, which I will fix myself while merging.
What is the purpose of the change
This PR proposed to replace the loose matching rules with the following exact matching rules.
ResourceProfile::UNKNOWN
) can only be fulfilled by a TM's default slot resource.Brief change log
ResourceProfile#isMatching
. It's now only used in matching requirements with resources.ResourceProfile#isBiggerThan
, which is used to compare two resource capacities.