Professional Documents
Culture Documents
Semester: VII
Subject: Big Data Analytics
Matrix Multiplication using Hadoop MapReduce Framework
to p: emit((i, k),
(A, j, a_ij)) else:
j = value[1] k
= value[2] b_jk =
value[3] for i = 1 to
m: emit((i, k),
(B, j, b_jk))
reduce(key, values):
// key is (i, k)
// values is a list of ("A", j, a_ij) and ("B", j, b_jk)
hash_A = {j: a_ij for (x, j, a_ij) in values if x == A}
hash_B = {j: b_jk for (x, j, b_jk) in values if x == B}
result = 0 for j = 1 to n:
result += hash_A[j] * hash_B[j]
emit(key, result)
Result:
Creating new directory and JAR files. Also checking the list of files.
Creating a Hadoop directory and putting the file in it. Also printing the content in it.
Name: Krittika Roy SAP: 60002190056 BE E21
Conclusion:
In this experiment we learnt how to implement matrix multiplication using Map Reduce using
commands.