I'm learning Spark these days, but I'm a little confused by Spark configurations. AFAIK, there are at least 3 ways to config:
- Environment variables, http://spark.apache.org/docs/latest/spark-standalone.html
- Command line arguments, like
./bin/spark-submit --class <main-class> --master xxx --deploy-mode xxx --conf key=value - Code, like in Scala/Java code.
Why are there so many ways to do it, what are the differences? Is there a best practice for this?