-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-6287][MESOS] Add dynamic allocation to the coarse-grained Mesos scheduler #4984
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
Conversation
|
See #4990 for the second part of the original PR (external shuffle service) |
|
One thing to watch out for here is that, |
93b4fcc to
88f2b35
Compare
|
@dragos is this still targeted for 1.4? |
|
Yes, I'd love to get this in in 1.4. I'll push a rebased version. |
|
Thanks, but it still has conflicts |
|
Sorry, I didn't get to it. |
88f2b35 to
b2b51ad
Compare
|
Unfortunately conflicts were really non-trivial and it took me quite a bit of time to bring this up to date. I guess it's too late for 1.4, but I'd like to push this forward as soon as possible. I don't want to go through another round fixing conflicts. :) /cc @tnachen |
|
@dragos is this rebased now? seems like 1.4 branch is cut at this point, let me ask @andrewor14 |
b2b51ad to
a68c3bf
Compare
|
It's rebased. It can (still) be merged without conflicts :) |
|
ok to test |
|
Test build #32052 has finished for PR 4984 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be after scala imports
|
Thanks @tnachen for your comments. I'll look into them ASAP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this make the limit negative now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot to push my latest changes. Yes, it's max now, as you suggested
4053462 to
4e831e2
Compare
|
Test build #32397 has finished for PR 4984 at commit
|
|
Hm, the test fails because it can't find the mesos native lib in the classpath. Note that the call is triggered when trying to mock |
|
Interesting, we shouldn't actually try to load the library since it might not be present in their machine for everyone. I wonder how come no one reported this before though, I doubt everyone installed Mesos library already. Let me take a deeper look to see if we can do something about it |
|
Oh nothing should have changed too. |
|
Test build #32400 has finished for PR 4984 at commit
|
|
@dragos Thanks for all your work and patience! I took a pass over it and I think the high level approach is reasonable. Most of my comments are relatively minor, but I have two bigger comments which I will describe here:
By the way, if you prefer, I'm completely open to separating the clean up shuffle files logic to a separate patch. This might allow us to merge the dynamic allocation part, which I think is mostly ready, sooner. :) |
|
@andrewor14 thanks for you thorough review. I'll address your comments tomorrow (my timezone). |
d50249a to
1673c8b
Compare
|
I rebased on master and implemented the latest round of reviews. Please let me know what you think, @andrewor14 /cc @tnachen. I'm not sure how much more time I can pour into this, so it'd be great if we can get to some sort of closure. I'm diving in SPARK-7398 and my time in the following weeks will be limited. I can probably spend a couple hours more on this PR, and I'm happy to jump on a call to iron out the latest issues (sometimes it's so much faster to look at the code together!). |
|
Test build #36411 has finished for PR 4984 at commit
|
|
@dragos I think this is pretty close. The one outstanding issue is still who cleans up the shuffle files. This patch proposes to have the driver send clean up requests to all shuffle services when the application exits. As I mentioned earlier, there are no guarantees here even if we install shutdown hooks. I understand that the external shuffle service is started independently of Mesos. I believe the difficulty you are referring to is the following: even though the Mesos master knows when the framework exits, we still have to pass this information on to the shuffle service. There are two potential ways to make this work:
|
|
Lastly, I suggested this before but I would actually recommend that we split this patch into two separate issues. The first, which is Mesos dynamic allocation (SPARK-6287), is ready for merge. The second, which is cleaning up shuffle files in Mesos when the shuffle service is used (no JIRA yet), is still being discussed. For the latter, since you have other obligations and we still can't agree on a solution yet, it's worthwhile to address it separately without blocking the first one. @dragos How does that sound? |
|
@andrewor14 the part about cleaning up files is indeed the part that deserves some discussion. I'm very open to alternative solutions, and you summarised the challenges very well. I agree that ideally, Mesos should perform the cleanup when the framework exists, but let's wait for @tnachen for opinions. |
|
Test build #36496 has finished for PR 4984 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9d88756 to
cf97666
Compare
|
I made the changes we agreed. I still have to rebase, that will take some time. Conflicts are not trivial, I hope to have it tomorrow. |
|
But you can still have a look and give it a go in the meantime. |
|
Test build #36802 has finished for PR 4984 at commit
|
|
In case others are following, @dragos @tnachen and I discussed offline about a way forward. To merge this feature sooner, we decided to split this patch into two separate issues: (1) mesos dynamic allocation, and (2) ensure shuffle files are cleaned up in mesos over time. This patch only tackles (1), and @tnachen will file a new JIRA for (2) and maybe fix it. Once this is rebased and passes tests, I'll merge it into master. |
cf97666 to
4f30803
Compare
Call “applicationRemoved” when the application ends and delete external shuffle files.
|
SPARK-8873 created for cleaning up shuffle files |
4f30803 to
39df8cd
Compare
|
Test build #36914 has finished for PR 4984 at commit
|
|
I've tested this on a small Mesos cluster, things work as before. I uploaded a pre-packaged binary here to make it easier to test. |
|
Test build #36921 has finished for PR 4984 at commit
|
|
As discussed, this implementation currently doesn't clean up shuffle files, but this will be addressed separately by @tnachen in SPARK-8873. The dynamic allocation side LGTM so I'm merging this into master. Congratulations @dragos! |
|
✌️ |
This is largely based on extracting the dynamic allocation parts from @tnachen's #3861.