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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better task balancing #1482

Merged
merged 73 commits into from Jun 8, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+3 鈭3
Diff settings

Always

Just for now

Viewing a subset of changes. View all

refactor method param

  • Loading branch information...
darcatron committed May 10, 2017
commit a3ebc45a34439daf1fdf1cea1666d2171c1d4ca2
@@ -269,7 +269,7 @@ private double score(SingularityOfferHolder offerHolder, SingularitySchedulerSta
final SlaveMatchState slaveMatchState = slaveAndRackManager.doesOfferMatch(offerHolder, taskRequest, stateCache);
if (matchesResources && slaveMatchState.isMatchAllowed()) {
return score(offer, taskRequest, maybeSlaveUsage);
return score(offer.getHostname(), taskRequest, maybeSlaveUsage);
} else {
offerHolder.addRejectedTask(pendingTaskId);
@@ -283,9 +283,9 @@ private double score(SingularityOfferHolder offerHolder, SingularitySchedulerSta
}
@VisibleForTesting
double score(Offer offer, SingularityTaskRequest taskRequest, Optional<SingularitySlaveUsageWithId> maybeSlaveUsage) {
double score(String hostname, SingularityTaskRequest taskRequest, Optional<SingularitySlaveUsageWithId> maybeSlaveUsage) {
if (isMissingUsageData(maybeSlaveUsage)) {
LOG.info("Slave {} has missing usage data ({}). Will default to {}", offer.getSlaveId().getValue(), maybeSlaveUsage, configuration.getDefaultOfferScoreForMissingUsage());
LOG.info("Slave {} has missing usage data ({}). Will default to {}", hostname, maybeSlaveUsage, configuration.getDefaultOfferScoreForMissingUsage());
return configuration.getDefaultOfferScoreForMissingUsage();
}
ProTip! Use n and p to navigate between commits in a pull request.