Cognizant interview question

what are the optimization techniques on spark and provide example