I have JavaRDD, i want to save that into hdfs. am using fallowing code:
its creating folfer in hdfs but not writing anything into hdfs system and its not throwing any error too.
If you use Spark Streaming and the event RDD is empty then Spark will write a folder and not add any content.
see e.g. Deleting Directory in HDFS using Spark for how to avoid this.
If it is not Streaming, verify the JavaRDD is not empty
@vnandigam , are you running literally this code?
Because, the saveAsTextFile expects one argument to be passed, a path to the file, if you pass an empty string as path, you should not expect your rdd data to be saved into any file.