Posts

big data 8

                                                                             PRACTICAL NO – 8 Aim: Implementing Clustering Algorithm Using Map-Reduce   Algorithm for Mapper Input: A set of objects X = {x1, x2… xn}, A Set ofinitial Centroids C = {c1, c2, ,ck} Output: An output list which contains pairs of (Ci, xj)where 1 ≤ i≤ n and 1 ≤j ≤ k Procedure M1←{x1, x2… xm} current_centroids←C Distance (p, q) =√Σd i=1 (pi– qi) 2 (where pi (or qi)is the coordinate of p (or q) in dimension i) for all xi ϵ M1 such that 1≤i≤m do bestCentroid←null minDist←∞ for all c ϵ current_centroids do       emit (bestCentroid, xi) i+=1   dist← distance (xi, c) if (bestCentroid = null || dist<minDist) then minDist...

big data 7

                                                                   PRACTICAL NO – 7 Aim: Implementing Frequent Item Set Algorithm Using Map-Reduce. import java.io.BufferedReader; import java.io.*; import java.io.IOException; import java.net.*; import java.util.ArrayList; import java.util.*;                      importmodel.HashTreeNode;                          import model.ItemSet; import model.Transaction; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configured; import org.apache.hadoop.filecache.DistributedCache; ...

big data 6

                                                          PRACTICAL NO – 6 Aim: Implementing Bloom Filter using Map-Reduce. 1.                  import java.io.DataOutputStream; 2.                  import java.io.FileOutputStream; 3.                  import java.io.IOException; 4.                  import org.apache.hadoop.util.bloom.BloomFilter; 5.                  import org.apache.hadoop.util.bloom.Key; 6.    ...