Professional Documents
Culture Documents
The MapReduce program is used to find the shortest path from one page to another.
The two page numbers are fed into the program as command line arguments which
finally gives the shortest path from a->b.
The page identifier(page number) and shortest distance, partial path and list of
currently identified neighbors are sent to the Mapper. The Reducer then makes this
into a key value pair.
The Reducer finds the path with minimun distance out of all the outputs from Mapper
and gives it as the output.
The psuedocode for Mapper and Reducer function are as shown below
The ss for the iterations are as follows: