Explanation: MyPartitioner is the class based on which it decides in which reducer the data should go. Hence there are 12 reducers based on each months it will send the output to the reducer and create a corresponding files.
Question :
From the below given code snippet please select the correct one which is able to create Compressed Sequence file.
Explanation: Correct code snippet uses the OutputFile format as a SequenceFileOutputFormat and for compression it uses the SnappyCodec And this is the Map only job,
There is no need to call setInputFormatClass, because the input file is a text file. However, the output file is a SequenceFile. Therefore, we must call setOutputFormatClass. Snappy compression as well as block level compression.
Question :
Select the correct code snippet which is able to read the compressed sequence file
Explanation: We are using a SequenceFile as the input file. Therefore, we must call setInputFormatClass. There is no need to call setOutputFormatClass, because the application uses a text file on output. There is no need to set compression options for the input file. The compression implementation details are encoded within the input SequenceFile. This is a map-only job, so we do not call setReducerClass, and we set the number of reducers to 0.