I'm using coalesce(1) for writing the set of records in s3 bucket in csv process. which is taking too much time for 505 records.
dataset.coalesce(1).write().csv("s3a://bucketname/path");
And I want to mention that before this writing process, I'm having a encryption process which is changing value of some fields of the row of dataset. there i'm using repartion(200). As
dataset.javaRDD().repartition(200).map(r -> func());
if I'm skipping the encyption process, the writing process is not even taking single minute.
What is issue which is causing the process to slow down?
How can I increase the performance?