47304/map-reduce-code-for-finding-average-salary
I have a file with below details emp_id,salary a,1000 b,3000 If I want to write a map-reduce code for finding average salary among all the employees, What will my key-value pair for mapper and reducer as input and output?
You can choose your mapper output key to be a string such as
Mapper <key,value> = "average salary ",1000
"average salary ",3000
Reducer input <key,value> = "average salary ",(1000,3000)
Reducer output <key,value> = "average salary ",4000
Please try the below code and it ...READ MORE
The map tasks created for a job ...READ MORE
It's preferable and generally, it is recommended ...READ MORE
The command that you are running is ...READ MORE
Firstly you need to understand the concept ...READ MORE
org.apache.hadoop.mapred is the Old API org.apache.hadoop.mapreduce is the ...READ MORE
Hi, You can create one directory in HDFS ...READ MORE
In your case there is no difference ...READ MORE
MapReduce is a programming model to perform ...READ MORE
Hi. This is the code I used ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.