-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
66 lines (62 loc) · 1.94 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Example of how to set up a standalone cluster using the provided image, but
# launching the master and worker separately on different containers. Although
# the expected result is to be the same when both containers run locally, it
# presents a useful example when running multiple workers on different hosts
# to make a real multi-node cluster.
version: "3.8"
services:
master:
image: marcelomendoncasoares/spark-delta-standalone:latest
ports:
- 7077:7077
- 8080:8080
# environment:
# SPARK_DRIVER_CORES: 1
# SPARK_DRIVER_MEMORY: 1G
# EXTRA_CLOUD_JARS: true
volumes:
- spark_storage:/root/data
command:
[
"spark-class",
"org.apache.spark.deploy.master.Master", "--host", "master"
]
worker:
image: marcelomendoncasoares/spark-delta-standalone:latest
ports:
- 8081:8081
# environment:
# SPARK_WORKER_CORES:
# SPARK_WORKER_MEMORY:
# SPARK_EXECUTOR_INSTANCES:
# SPARK_EXECUTOR_CORES:
# SPARK_EXECUTOR_MEMORY:
# EXTRA_CLOUD_JARS: true
volumes:
- spark_storage:/root/data
command:
[
"spark-class",
"org.apache.spark.deploy.worker.Worker", "spark://master:7077"
]
# Example of an application that uses the Spark cluster. Can be replaced by
# a real application. Spark master will be available at spark://master:7077,
# where "master" is the name of the master container. After running the
# docker-compose up command, check the Spark UI at http://localhost:8080.
client:
image: marcelomendoncasoares/spark-delta-standalone:latest
# environment:
# EXTRA_CLOUD_JARS: true
volumes:
- spark_storage:/root/data
command: [
"spark-submit",
"--master", "spark://master:7077",
"--class", "org.apache.spark.examples.SparkPi",
"/opt/spark/examples/jars/spark-examples_2.12.jar"
]
depends_on:
- master
- worker
volumes:
spark_storage: