Skip to content

Instantly share code, notes, and snippets.

@byronyi
Created July 28, 2015 02:37
Show Gist options
  • Select an option

  • Save byronyi/0e40193337f212833537 to your computer and use it in GitHub Desktop.

Select an option

Save byronyi/0e40193337f212833537 to your computer and use it in GitHub Desktop.
Spark on Docker
docker run --rm -it -v `pwd`/hadoop:/hadoop -e "HADOOP_HOME=/hadoop" -v `pwd`/java:/java -e "JAVA_HOME=/java" -v `pwd`/spark:/spark -e "SPARK_HOME=/spark" -v `pwd`/conf:/conf -e "HADOOP_CONF_DIR=/conf" --link resource-manager --link name-node ubuntu
/spark/bin/spark-submit --class org.apache.spark.examples.SparkPi --master yarn-cluster --num-executors 3 --driver-memory 4g --executor-memory 2g --executor-cores 1 /spark/lib/spark-examples*.jar 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment