Add checks to repartitionAndSortWithinPartitions method.
Add warnings in the PairRDDFunctions constructor.