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 鈭0
Diff settings

Always

Just for now

Viewing a subset of changes. View all

add score logging

  • Loading branch information...
darcatron committed Apr 5, 2017
commit 9468d2328e376cf0d66c43e88bf47626f5c0d0eb
@@ -126,6 +126,8 @@ public SingularityMesosOfferScheduler(MesosConfiguration mesosConfiguration,
Map<SingularityOfferHolder, Double> scorePerOffer = new HashMap<>();
double minScore = minScore(taskRequestHolder.getTaskRequest());
LOG.info("Minimum score for task {} is {}", taskRequestHolder.getTaskRequest().getPendingTask().getPendingTaskId().getId(), minScore);

This comment has been minimized.

@ssalinas

ssalinas Apr 20, 2017

Member

probably can be lower than info level here

@ssalinas

ssalinas Apr 20, 2017

Member

probably can be lower than info level here

for (SingularityOfferHolder offerHolder : offerHolders) {
if (configuration.getMaxTasksPerOffer() > 0 && offerHolder.getAcceptedTasks().size() >= configuration.getMaxTasksPerOffer()) {
@@ -142,6 +144,7 @@ public SingularityMesosOfferScheduler(MesosConfiguration mesosConfiguration,
offerMatchAttemptsPerTask.compute(taskRequestHolder.getTaskRequest().getPendingTask().getPendingTaskId().getId(),
(k, v) -> (scorePerOffer.isEmpty() ? (v == null ? offerHolders.size() : v + offerHolders.size()) : null));
LOG.debug("Match attempts per task is currently {}", offerMatchAttemptsPerTask);
if (!scorePerOffer.isEmpty()) {
SingularityOfferHolder bestOffer = Collections.max(scorePerOffer.entrySet(), Map.Entry.comparingByValue()).getKey();
ProTip! Use n and p to navigate between commits in a pull request.