Question - Can we write the output of MapReduce in different formats?
Answer -
Yes. Hadoop supports various input and output File formats, such as:
- TextOutputFormat - This is the default output format and it writes records as lines of text.
- SequenceFileOutputFormat - This is used to write sequence files when the output files need to be fed into another MapReduce job as input files.
- MapFileOutputFormat - This is used to write the output as map files.
- SequenceFileAsBinaryOutputFormat - This is another variant of SequenceFileInputFormat. It writes keys and values to a sequence file in binary format.
- DBOutputFormat - This is used for writing to relational databases and HBase. This format also sends the reduce output to a SQL table.