Tuesday 12 September 2017

MapReduce Programming info:

MapReduce Programming info:

Methods of Mapper Class:

Below are the methods, which will play inside the mapper class 

Modifier and Type
Method and Description
protected void
(org.apache.hadoop.mapreduce.Mapper.Context context)
Called once at the end of the task.
protected void
(KEYIN key, VALUEIN value,
org.apache.hadoop.mapreduce.Mapper.Context context)
Called once for each key/value pair in the input split.
void
(org.apache.hadoop.mapreduce.Mapper.Context context)
Expert users can override this method for more complete control over the execution of the Mapper.
protected void
setup(org.apache.hadoop.mapreduce.Mapper.Context context)
Called once at the beginning of the task.

Methods of Reducer Class:

Below are the methods, which will play inside the reducer class 

Modifier and Type
Method and Description
protected void
cleanup(org.apache.hadoop.mapreduce.Reducer.Context context)
Called once at the end of the task.
protected void
reduce(KEYIN key, Iterable<VALUEIN> values, org.apache.hadoop.mapreduce.Reducer.Context context)
This method is called once for each key.
void
run(org.apache.hadoop.mapreduce.Reducer.Context context)
Advanced application writers can use the run(org.apache.hadoop.mapreduce.Reducer.Context) method to control how the reduce task works.
protected void
setup(org.apache.hadoop.mapreduce.Reducer.Context context)
Called once at the start of the task.




No comments:

Post a Comment

Fundamentals of Python programming

Fundamentals of Python programming: Following below are the fundamental constructs of Python programming: Python Data types Python...