ICP3 - neerajpadarthi/Big-Data-Programming GitHub Wiki

Name : Neeraj Padarthi

Class ID: 22

ICP : 3

Matrix Multiplication in Map Reduce

Map Code

  • The whole program of matrix multiplication is divided into map and reduce phase.
  • In map phase we will take 2 matrices that need to be multiplied.
  • Figure out which variable needs to be multiplied with what in number according to that row column formula of matrix multiplication.
  • Keep these numbers ready and pass it to the reduce phase

Reduce Code

  • Reduce will take in the list of numbers that need to be multiplied and added to get the result of i * k matrix.
  • Reduce phase will do the computation and result will be the matrix multiplication result

Main

  • This main method will call the mp and reduce phase function calls as shown below

Input

Output