concept repartition() in category spark

appears as: repartition()
Spark in Action, Second Edition

This is an excerpt from Manning's book Spark in Action, Second Edition.

You can repartition the dataframe to use four partitions by using the repartition() method. Repartitioning can increase performance:

Lab #100 uses repartition() , but you may see in documentation and source code the coalesce() method, which does the same thing. Other signatures for the repartition() method allow you to fine-tune the repartition operation, using column expressions, ranges, and more. More information is available at http://mng.bz/9wZa .