Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.37 KB

README.md

File metadata and controls

52 lines (40 loc) · 1.37 KB

Spark Docker for Mesos (DCOS)

Docker image for running spark with mesos (DCOS). Build with

How to use

Build Image

make docker-build

Pull Image

make docker-pull

Start spark driver inside docker container

MESOS_IP=mesos://<ip>:<port>
EXECUTOR_IMAGE=dmitryb/mesos-spark:2.1.1
CORES=2
RAM=2g

docker run -it --rm --net=host dmitryb/mesos-spark:2.1.1 bash /opt/spark/bin/spark-shell \
    --conf spark.master=${MESOS_IP} \
    --conf spark.driver.host=${DRIVER_IP} \
    --conf spark.mesos.coarse=true \
    --conf spark.mesos.executor.docker.image=${EXECUTOR_IMAGE} \
    --conf spark.mesos.executor.home=/opt/spark \
    --conf spark.task.maxFailures=10 \
    --conf spark.sql.parquet.compression.codec=gzip \
    --conf spark.sql.warehouse.dir=file:///tmp \
    --conf spark.serializer=org.apache.spark.serializer.KryoSerializer \
    --conf spark.kryoserializer.buffer.max=1g \
    --conf spark.task.cpus=1 \
    --conf spark.executor.memory=${RAM} \
    --conf spark.cores.max=${CORES} \
    --conf spark.sql.shuffle.partitions=2000 \
    --conf spark.shuffle.spill=true \
    --conf spark.executor.heartbeatInterval=10

TODO

Integrate with pyspark