map
public void map(org.apache.hadoop.io.LongWritable keyIn,
org.apache.hadoop.io.Text valueIn,
org.apache.hadoop.mapreduce.Mapper.Context context)
throws java.io.IOException,
java.lang.InterruptedException
The map function parses the second and third element of every row as movie-id and genre-id. These two elements must be integers otherwise this mapper will throw NumberFormatException
.
- Overrides:
map
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable>
- Throws:
java.io.IOException
java.lang.InterruptedException