-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-4286] Integrate external shuffle service to coarse grained Mesos mode #3861
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
Test build #24969 has started for PR 3861 at commit
|
Test build #24969 has finished for PR 3861 at commit
|
Test FAILed. |
Test build #24976 has started for PR 3861 at commit
|
Test build #24976 has finished for PR 3861 at commit
|
Test FAILed. |
I don't think the test failure is related, and the test passes locally too. |
@@ -998,7 +998,7 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli | |||
*/ | |||
@DeveloperApi | |||
override def requestExecutors(numAdditionalExecutors: Int): Boolean = { | |||
assert(master.contains("yarn") || dynamicAllocationTesting, | |||
assert(master.contains("mesos") || master.contains("yarn") || dynamicAllocationTesting, | |||
"Requesting executors is currently only supported in YARN mode") |
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.
Change this message to be "... only supported in YARN or Mesos modes", and the message below
@ash211 Thanks for the review, updated the PR. |
Test build #25002 has started for PR 3861 at commit
|
Test build #25002 has finished for PR 3861 at commit
|
Test PASSed. |
Test build #25082 has started for PR 3861 at commit
|
Test build #25083 has started for PR 3861 at commit
|
Test build #25082 has finished for PR 3861 at commit
|
Test PASSed. |
Test build #25083 has finished for PR 3861 at commit
|
Test PASSed. |
Test build #25119 has started for PR 3861 at commit
|
Test build #25119 has finished for PR 3861 at commit
|
Test PASSed. |
@@ -54,6 +53,8 @@ class StandaloneWorkerShuffleService(sparkConf: SparkConf, securityManager: Secu | |||
require(server == null, "Shuffle server already started") | |||
logInfo(s"Starting shuffle service on port $port with useSasl = $useSasl") | |||
server = transportContext.createServer(port) | |||
} else { | |||
logInfo(s"Skip launching shuffle service as it's not enabled.") |
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 message doesn't seem particularly useful
Hi @tnachen thanks for your work. I will do a closer review within the next few days, but first I have a high level question. IIUC, the changes in this PR basically enable the dynamic allocation feature to be used with Mesos coarse-grained mode. However, in Mesos I believe we express the amount of resources an application wants in terms of cores, not the number of executors. Is the concern raised in SPARK-4751 for standalone mode relevant here? |
driver.sendStatusUpdate(TaskStatus.newBuilder() | ||
.setState(TaskState.TASK_RUNNING) | ||
.setTaskId(taskInfo.getTaskId) | ||
.build) |
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.
For readability I would prefer that you put the builder in a val
first, and then calling driver.sendStatusUpdate
on it. Also, please use parentheses for build()
here because it's not a getter without side-effects.
@tnachen Thanks for working on this. Before I dive deeper into the implementation there's a main open question that I'd like to address. The external shuffle service is intended to live across the executor lifetime and so launched independently of any Spark application. The service enables dynamic allocation of resources because it can continue to serve an executor's shuffle files after the executor has been killed. However, in this patch the service seems to be started inside the executor backend itself and its fate necessarily tied with the application. If I understand correctly, the Mesos slave is equivalent to the standalone Worker in that it is long running and lives beyond the lifetime of a particular application. If this is the case, the appropriate place to start the shuffle service would be there instead. Another issue is that this patch in its current state seems to conflate two issues (1) dynamic allocation and (2) external shuffle service. (1) is what you refer to as auto-scaling on the JIRA, and depends on (2) to work. However, since we already check whether shuffle service is enabled in |
@andrewor14 Mesos slave doesn't have the concept of Auxilary service as YARN, that launches a service as part of the Slave. It requires a task to be running to launch anything. Therefore to have a long running service that lives longer than the task lifetime, I went the route to create a custom Mesos executor that launches the Coarse grained spark executor, and continue to run when the spark executor finishes. The custom executor also launches the external shuffle service. I agree I didn't really like the diverging path, but I felt like the original method is much simpler as it directly launches the coarse grain executor, and don't want to increase the complexity by making it also have to launch this custom executor. |
We spoke a bit offline about this, but my feeling was that the best thing here might be to add a way to launch the shuffle service as a standalone application (initially, not one managed by Mesos) so that it can be shared across Spark applications. That would involve writing some simple launching scripts for it in a similar way to existing daemons we launch, and you'd ask users to launch the shuffle service similar to other storage systems like HDFS. That's very simple and would avoid diverging a lot between Mesos and the other modes. And longer term we could actually have a single shared shuffle service that is scheduled by mesos. |
Agree and it's currently being worked on. We can close this PR too. |
I'd like to take a shot at making the external shuffle service a "daemon". Just to make sure I understand the requirements:
/cc @tnachen |
…mon. This allows Mesos deployments to use the shuffle service (and implicitly dynamic allocation). It does so by adding a new "main" class and two corresponding scripts in `sbin`: - `sbin/start-shuffle-service.sh` - `sbin/stop-shuffle-service.sh` Specific options can be passed in `SPARK_SHUFFLE_OPTS`. This is picking up work from #3861 /cc tnachen Author: Iulian Dragos <jaguarul@gmail.com> Closes #4990 from dragos/feature/external-shuffle-service and squashes the following commits: 6c2b148 [Iulian Dragos] Import order and wrong name fixup. 07804ad [Iulian Dragos] Moved ExternalShuffleService to the `deploy` package + other minor tweaks. 4dc1f91 [Iulian Dragos] Reviewer’s comments: 8145429 [Iulian Dragos] Add an external shuffle service that can be run as a daemon.
…mon. This allows Mesos deployments to use the shuffle service (and implicitly dynamic allocation). It does so by adding a new "main" class and two corresponding scripts in `sbin`: - `sbin/start-shuffle-service.sh` - `sbin/stop-shuffle-service.sh` Specific options can be passed in `SPARK_SHUFFLE_OPTS`. This is picking up work from apache#3861 /cc tnachen Author: Iulian Dragos <jaguarul@gmail.com> Closes apache#4990 from dragos/feature/external-shuffle-service and squashes the following commits: 6c2b148 [Iulian Dragos] Import order and wrong name fixup. 07804ad [Iulian Dragos] Moved ExternalShuffleService to the `deploy` package + other minor tweaks. 4dc1f91 [Iulian Dragos] Reviewer’s comments: 8145429 [Iulian Dragos] Add an external shuffle service that can be run as a daemon.
…mon. This allows Mesos deployments to use the shuffle service (and implicitly dynamic allocation). It does so by adding a new "main" class and two corresponding scripts in `sbin`: - `sbin/start-shuffle-service.sh` - `sbin/stop-shuffle-service.sh` Specific options can be passed in `SPARK_SHUFFLE_OPTS`. This is picking up work from apache#3861 /cc tnachen Author: Iulian Dragos <jaguarul@gmail.com> Closes apache#4990 from dragos/feature/external-shuffle-service and squashes the following commits: 6c2b148 [Iulian Dragos] Import order and wrong name fixup. 07804ad [Iulian Dragos] Moved ExternalShuffleService to the `deploy` package + other minor tweaks. 4dc1f91 [Iulian Dragos] Reviewer’s comments: 8145429 [Iulian Dragos] Add an external shuffle service that can be run as a daemon.
…os scheduler This is largely based on extracting the dynamic allocation parts from tnachen's #3861. Author: Iulian Dragos <jaguarul@gmail.com> Closes #4984 from dragos/issue/mesos-coarse-dynamicAllocation and squashes the following commits: 39df8cd [Iulian Dragos] Update tests to latest changes in core. 9d2c9fa [Iulian Dragos] Remove adjustment of executorLimitOption in doKillExecutors. 8b00f52 [Iulian Dragos] Latest round of reviews. 0cd00e0 [Iulian Dragos] Add persistent shuffle directory 15c45c1 [Iulian Dragos] Add dynamic allocation to the Spark coarse-grained scheduler.
No description provided.