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

Two patches to scheduler #682

Closed
wants to merge 2 commits into from
Closed

Conversation

herberteuler
Copy link
Contributor

There are two patches here:

  1. There seems to be an erroneous structure in default-schedule: invoking to schedule-topologies-evenly should only be done after freeing all bad-slots for topologies that needs re-scheduling.
  2. SchedulerAssignmentImpl currently uses HashMap, which does not preserve entries order. This can cause unnecessary and unexpected re-scheduling when nimbus converts executor->node+port between its internal Clojure maps and SchedulerAssignmentImpl's Java maps back and forth.

(.freeSlots cluster bad-slots)
(EvenScheduler/schedule-topologies-evenly (Topologies. {topology-id topology}) cluster))))
(.freeSlots cluster bad-slots))
(EvenScheduler/schedule-topologies-evenly (Topologies. {topology-id topology}) cluster)))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

topology-id is declared in doseq, while you are referencing topology-id out of doseq

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I see.

@xumingming
Copy link
Collaborator

@herberteuler any update on this PR?

@herberteuler
Copy link
Contributor Author

The LinkedHashMap change has been in the branch for our testing cluster for a while, and it has fixed the unexpected rescheduling issue there. We are planning to incorporate it into our next installation on the production cluster.

@xumingming
Copy link
Collaborator

@herberteuler can you describe a case which have issues with current implementation, while is fixed by your patch?

@herberteuler
Copy link
Contributor Author

I'll make a new PR later, with more detailed descriptions. Sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants