'Is there any way to write a listBuffer to HDFS in CSV format using Scala/Java?

I am having a listBuffer with some records. I need to write it into HDFS in CSV format.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source