-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-27369][CORE] Setup resources when Standalone Worker starts up
## What changes were proposed in this pull request? To support GPU-aware scheduling in Standalone (cluster mode), Worker should have ability to setup resources(e.g. GPU/FPGA) when it starts up. Similar as driver/executor do, Worker has two ways(resourceFile & resourceDiscoveryScript) to setup resources when it starts up. User could use `SPARK_WORKER_OPTS` to apply resource configs on Worker in the form of "-Dx=y". For example, ``` SPARK_WORKER_OPTS="-Dspark.worker.resource.gpu.amount=2 \ -Dspark.worker.resource.fpga.amount=1 \ -Dspark.worker.resource.fpga.discoveryScript=/Users/wuyi/tmp/getFPGAResources.sh \ -Dspark.worker.resourcesFile=/Users/wuyi/tmp/worker-resource-file" ``` ## How was this patch tested? Tested manually in Standalone locally: - Worker could start up normally when no resources are configured - Worker should fail to start up when exception threw during setup resources(e.g. unknown directory, parse fail) - Worker could setup resources from resource file - Worker could setup resources from discovery scripts - Worker should setup resources from resource file & discovery scripts when both are configure. Closes #24841 from Ngone51/dev-worker-resources-setup. Authored-by: wuyi <[email protected]> Signed-off-by: Xingbo Jiang <[email protected]>
- Loading branch information
1 parent
c277afb
commit 7cbe01e
Showing
3 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters