an event with timestamp 11:51:34 AM, June 12, 2012 and another event happens as 11:54:34 AM, June 12, 2012 So in which of the path the file will be stored
Explanation: Reducer groups by key within the partition, hence it needs to use Partioner, Key Comparator as well as Group Comparator to implement Secondary Sort. From the all 4 option best fit comparator is 2nd one which compares the first part (year) in the reducer it will be in the same group. And letter on on the secomd part you can make sorting using KeyComprator.
We must now ensure that all the values for the same natural key are passed in one call to the Reducer Achieved by defining a Grouping Comparator class
Determines which keys and values are passed in a single call to the Reducer Looks at just the natural key
Grouping comparators can be used in a secondary sort to ensure that only the natural key is used for partitioning and grouping
Question :
There are two input files as belwo to MapReduce Join job.