Skip to content

Commit

Permalink
refactor method param
Browse files Browse the repository at this point in the history
  • Loading branch information
matush-v committed May 10, 2017
1 parent 59047bc commit a3ebc45
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -269,7 +269,7 @@ private double score(SingularityOfferHolder offerHolder, SingularitySchedulerSta
final SlaveMatchState slaveMatchState = slaveAndRackManager.doesOfferMatch(offerHolder, taskRequest, stateCache); final SlaveMatchState slaveMatchState = slaveAndRackManager.doesOfferMatch(offerHolder, taskRequest, stateCache);


if (matchesResources && slaveMatchState.isMatchAllowed()) { if (matchesResources && slaveMatchState.isMatchAllowed()) {
return score(offer, taskRequest, maybeSlaveUsage); return score(offer.getHostname(), taskRequest, maybeSlaveUsage);
} else { } else {
offerHolder.addRejectedTask(pendingTaskId); offerHolder.addRejectedTask(pendingTaskId);


Expand All @@ -283,9 +283,9 @@ private double score(SingularityOfferHolder offerHolder, SingularitySchedulerSta
} }


@VisibleForTesting @VisibleForTesting
double score(Offer offer, SingularityTaskRequest taskRequest, Optional<SingularitySlaveUsageWithId> maybeSlaveUsage) { double score(String hostname, SingularityTaskRequest taskRequest, Optional<SingularitySlaveUsageWithId> maybeSlaveUsage) {
if (isMissingUsageData(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(); return configuration.getDefaultOfferScoreForMissingUsage();
} }


Expand Down

0 comments on commit a3ebc45

Please sign in to comment.