Hello @vivek_rol
Thanks for posting your query!
From your query I could see, you would like to write the outputs of Hive query, RDDs (after transformations), Dataframes and SparkSQL (after transformations) to HDFS
Basically for Spark's RDD,Dataframes,SparkSQL you can use inbuilt functions like "saveAsTextFile
Example:
<Writing DataFrames in to HDFS >
val mydf=sc.textFile("/tmp/input");
mydf.saveAsTextFile("/tmp/output");
Similarly, you can perform for D
Please refer spark documentation URL [http://spark.apache.org/docs/latest/programming-guide.html]
For Hive queries, please refer below community thread and once the output is on file, you can place it to HDFS
[ https://community.cloudera.com/t5/Batch-SQL-Apache-Hive/how-to-download-hive-data-into-csv-format/m-... ]
If you are using Hue for running your Hive queries, you have direct option of exporting your out put to HDFS paths
Thanks,
Satz