ICP3 - gracesyl/big-data-hadoop GitHub Wiki

Lesson 3:Advanced map reduce Algorithm

Using this map reduce technique we use the advanced complex algorithm of how to do matrix multiplication in Java eclipse with hadoop.

I used the hashmaps technique by creating 3 individual class programs where as for mapper,reducer,matrix multiplication class, in eclipse and running the technique in Hdfs command prompt the following screenshots will explain better.

Mapper:

Mapper class

Reducer:

Main Algorithm Matrix Multiplication:

Running the Algorithm :

The Logical explanation :

The Mapper gives the logic of Mij Indices and Values Nij by segregating the input file in Commoa separated Value; and the reducer does the Multiplication Part Mij*Nij by creating a config in the main to run consolidatedly.

Thus the Input is given by hadoop command and the output is displayed as follows in hue:

Reference


: auth.geeksforgeeks.org