Hadoop Jars Link Get link Facebook X Pinterest Email Other Apps February 13, 2021 https://drive.google.com/file/d/1Fc8k625z5Y4KbG3VYUIAuNrsgwvubD8o/view?usp=sharing Get link Facebook X Pinterest Email Other Apps Comments Grace Mia29 August 2021 at 00:06Thanks for Sharing...Keep Update…Web Hosting is the process of buying space for a website on the World Wide Web. What is Web HostingWeb Hosting for BeginnersReplyDeleteRepliesReplyAdd commentLoad more... Post a Comment
MapReduce Matrix Multiplication Code January 05, 2021 Mapper Logic : import java.io.IOException; import org.apache.hadoop.conf.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapreduce.*; public class MatrixMapper extends Mapper<LongWritable, Text, Text, Text> { public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); int m = Integer.parseInt(conf.get("m")); int p = Integer.parseInt(conf.get("p")); String line = value.toString(); String[] indicesAndValue = line.split(","); Text outputKey = new Text(); Text outputValue = new Text(); if (indicesAndValue[0].equals("M")) { for (int k = 0; k < p; k++) { outputKey.set(indicesAndValue[1] + "," + k); outputValue.set("M," + indicesAndValue[2] + "," + indicesAndValue[3]); context.write(outputKey, outputValue); } } else { for (int i = 0; i < m; i++) { outputKey.set(i + "," + indicesAnd... Read more
Word Count MapReduce Code January 04, 2021 Mapper Logic: import java.io.IOException; import java.util.StringTokenizer; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Mapper; public class WordCountMapper extends Mapper<LongWritable, Text, Text, IntWritable> { @Override public void map (LongWritable key, Text value, Context con) throws IOException, InterruptedException { String line = value.toString(); String[] words = line.split("\\s"); for(String s:words) { con.write(new Text(s), new IntWritable(1)); } } } Reducer Logic: import java.io.IOException; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.... Read more
Data Structures Previous Question Papers April 29, 2025 Data Structures Previous Question Papers Read more
Thanks for Sharing...Keep Update…
ReplyDeleteWeb Hosting is the process of buying space for a website on the World Wide Web.
What is Web Hosting
Web Hosting for Beginners