bin/spark-submit -name "My app" -master local -conf = false -conf "=-XX:+PrintGCDetails -XX:+PrintGCTimeStamps" myApp.jar Then, you can supply configuration values at runtime. Spark allows you to simply create an empty conf: val sc = new SparkContext ( new SparkConf ()) Instance, if you’d like to run the same application with different masters or differentĪmounts of memory. In some cases, you may want to avoid hard-coding certain configurations in a SparkConf. See documentation of individual configuration properties. While numbers without units are generally interpreted as bytes, a few are interpreted as KiB or MiB. Properties that specify some time duration should be configured with a unit of time. Note that we can have more than 1 thread in local mode, and in cases like Spark Streaming, we mayĪctually require more than 1 thread to prevent any sort of starvation issues. setAppName ( "CountingSheep" ) val sc = new SparkContext ( conf ) Which can help detect bugs that only exist when we run in a distributed context. Note that we run with local, meaning two threads - which represents “minimal” parallelism, For example, we could initialize an application with two threads as follows: master URL and application name), as well as arbitrary key-value pairs through the SparkConf allows you to configure some of the common properties These properties can be set directly on a Spark properties control most application settings and are configured separately for eachĪpplication.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |