May 2017
Intermediate to advanced
294 pages
7h 33m
English
Specify the number of partitions when loading a file into RDD with the following steps:
$ spark-shell
scala> sc.textFile("hdfs://localhost:9000/user/hduser/words",10)
Another approach is to change the default parallelism by performing the following steps:
$ spark-shell --conf spark.default.parallelism=10
scala> sc.defaultParallelism
Read now
Unlock full access