Skip to content
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

Evenly-spread task placement #1576

Merged
merged 7 commits into from Jul 14, 2017
Merged

Evenly-spread task placement #1576

merged 7 commits into from Jul 14, 2017

Conversation

@baconmania
Copy link
Contributor

@baconmania baconmania commented Jun 28, 2017

No description provided.

@ssalinas ssalinas modified the milestone: 0.17.0 Jun 29, 2017
@@ -333,7 +333,8 @@ public void testFrozenSlaveCanBeDecommissioned() {

saveAndSchedule(request.toBuilder().setSlavePlacement(Optional.of(SlavePlacement.OPTIMISTIC)).setInstances(Optional.of(2)));

This comment has been minimized.

@ssalinas

ssalinas Jul 5, 2017
Member

feel free to change this to GREEDY or SEPARATE so that the frozen slave test isn't relying on calculations from optimistic


final boolean isSlaveOk = numOnSlave < numPerSlave;
// If no tasks are active for this request yet, we can fall back to greedy.
if (currentlyActiveTasksForRequestClusterwide.size() > 0) {

This comment has been minimized.

@ssalinas

ssalinas Jul 5, 2017
Member

would it make sense to make this more explicit with a == 0 check + early return rather than having to add a comment?

This comment has been minimized.

@baconmania

baconmania Jul 5, 2017
Author Contributor

Hmm, so the general pattern in this method is to return only if the SlaveMatchState is determined to be something other than OK. Otherwise, flow is allowed to trickle down to that final return SlaveMatchState.OK statement.

final boolean isSlaveOk = numOnSlave <= numPerSlave;

if (!isSlaveOk) {
LOG.trace("Rejecting OPTIMISTIC task {} from slave {} ({}) due to numOnSlave {}", taskRequest.getRequest().getId(), slaveId, host, numOnSlave);

This comment has been minimized.

@ssalinas

ssalinas Jul 5, 2017
Member

might want to add the other values you're using in he calculation in here for debugging purposes

baconmania added 2 commits Jul 5, 2017
…lacement strategy logic for this test.
@baconmania baconmania changed the title (WIP) Evenly-spread task placement Evenly-spread task placement Jul 6, 2017
@baconmania baconmania added hs_qa and removed hs_staging labels Jul 6, 2017
@ssalinas ssalinas merged commit 7ad28fd into master Jul 14, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@ssalinas ssalinas deleted the evenly-spread-task-placement branch Jul 14, 2017
@baconmania baconmania modified the milestones: 0.18.0, 0.17.0 Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.