-
Notifications
You must be signed in to change notification settings - Fork 228
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
Enable computation of evenness score based on a preferred scoring key [Testing Purporses] #2699
Enable computation of evenness score based on a preferred scoring key [Testing Purporses] #2699
Conversation
helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java
Outdated
Show resolved
Hide resolved
82c9121
to
46bea93
Compare
8d9a2e6
to
7fee710
Compare
return computeUtilizationScore(estimatedMaxUtilization, projectedHighestUtilization); | ||
node.getGeneralProjectedHighestUtilization(replica.getCapacity(), clusterContext.getPreferredScoringKey()); | ||
double utilizationScore = computeUtilizationScore(estimatedMaxUtilization, projectedHighestUtilization); | ||
LOG.info("[DEPEND-29018] clusterName: {}, estimatedMaxUtilization: {}, projectedHighestUtilization: {}, utilizationScore: {}, preferredScoringKey: {}", |
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.
Please consider avoiding include user specific ticket here. We want Helix to be a generic service.
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.
+1. Also let's not have this at info level, debug level should be better. Otherwise, it will be per replica per partition per resource log. That's too much.
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.
this PR was used to test these changes in ei and get some numbers, will not be merged. I will shortly put up a PR cleaning up the logs.
return computeUtilizationScore(estimatedMaxUtilization, projectedHighestUtilization); | ||
node.getGeneralProjectedHighestUtilization(replica.getCapacity(), clusterContext.getPreferredScoringKey()); | ||
double utilizationScore = computeUtilizationScore(estimatedMaxUtilization, projectedHighestUtilization); | ||
LOG.info("[DEPEND-29018] clusterName: {}, estimatedMaxUtilization: {}, projectedHighestUtilization: {}, utilizationScore: {}, preferredScoringKey: {}", |
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.
+1. Also let's not have this at info level, debug level should be better. Otherwise, it will be per replica per partition per resource log. That's too much.
...elix/controller/rebalancer/waged/constraints/TopStateMaxCapacityUsageInstanceConstraint.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/model/AssignableNode.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/model/ClusterContext.java
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/model/ClusterContext.java
Show resolved
Hide resolved
Map<String, Integer> remainingCapacity, String preferredScoringKey) { | ||
Set<String> capacityKeySet = _maxAllowedCapacity.keySet(); | ||
if (preferredScoringKey != null && capacityKeySet.contains(preferredScoringKey)) { | ||
capacityKeySet = ImmutableSet.of(preferredScoringKey); |
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.
I don't get this. Does this mean the preferred score will override all others? Then why we just setup one dimension instead of having other dimension for computation? That would be easier?
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.
let me know if my understanding of the question is not right. I believe by dimensions you mean the capacity keys.
preferredScoringKey will override others if present. but it has to be set up at cluster configs explicitly. if not set, we will need all the dimensions for computation.
7fee710
to
97479b1
Compare
Would suggest to schedule a follow up section so let everybody on the same page. @csudharsanan |
Close this PR. feel free to have a new one as current version is outdated. |
Note : This PR is used for testing purposes, won't be merged.
Issues
Enable compute of evenness score based on a specified (prioritized) capacity key #2674
Description
Currently, WAGED consider many capacity categories/dimensions such as CPU, Disk, etc for the placement decision evenness scores. In some use case, only one dimension is relevant because the clusters are provisioned based on that category. And, if evenness scores are not based on that then it introduces more shuffle/movements.
So, we would like to provide a way for users to specify a prioritized evennessScoringKey that will help computing scores based on that category only.
Tests
mvn test -o -Dtest=TestClusterContext -pl=helix-core
mvn test -o -Dtest=TestMaxCapacityUsageInstanceConstraint -pl=helix-core
mvn test -o -Dtest=TestTopStateMaxCapacityUsageInstanceConstraint -pl=helix-core
Changes that Break Backward Compatibility (Optional)
(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)
Documentation (Optional)
(Link the GitHub wiki you added)
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)