Bill Farner created AURORA-119:
----------------------------------
Summary: Job counts are incorrect on new scheduler home page
Key: AURORA-119
URL: https://issues.apache.org/jira/browse/AURORA-119
Project: Aurora
Issue Type: Bug
Components: Scheduler, UI
Reporter: Bill Farner
Assignee: Suman Karumuri
Priority: Blocker
The code to handle the {{getJobSummary}} RPC is at fault, it's counting tasks
rather than jobs:
{code}
Multimap<String, IJobKey> jobsByRole = Multimaps.index(
FluentIterable.from(tasks).transform(Tasks.SCHEDULED_TO_JOB_KEY),
JobKeys.TO_ROLE);
Multimap<String, IJobKey> cronJobsByRole = Multimaps.index(
FluentIterable.from(cronJobManager.getJobs()).transform(JobKeys.FROM_CONFIG),
JobKeys.TO_ROLE);
List<JobSummary> jobSummaries = Lists.newLinkedList();
for (String role : Sets.union(jobsByRole.keySet(),
cronJobsByRole.keySet())) {
JobSummary summary = new JobSummary();
summary.setRole(role);
summary.setJobCount(jobsByRole.get(role).size());
summary.setCronJobCount(cronJobsByRole.get(role).size());
jobSummaries.add(summary);
}
{code}
{{jobCount}} should only reflect the unique values in {{jobsByRole}}.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)