Project

General

Profile

1
package eu.dnetlib.data.mapreduce.hbase.broker;
2

    
3
import java.io.IOException;
4

    
5
import org.apache.hadoop.io.Text;
6
import org.apache.hadoop.mapreduce.Mapper;
7

    
8
/**
9
 * Created by michele on 12/10/15.
10
 */
11
public class CalculatePersonDistributionStep2Mapper extends Mapper<Text, Text, Text, Text> {
12

    
13
	@Override
14
	protected void setup(final Mapper.Context context) throws IOException, InterruptedException {
15
		super.setup(context);
16
	}
17

    
18
	@Override
19
	protected void map(final Text key, final Text value, final Context context) throws IOException, InterruptedException {
20
		// key: person fullname
21
		// value: dsId
22
		context.write(
23
				CalculatePersonDistributionUtils.getNameFromHdfsValue(value),
24
				CalculatePersonDistributionUtils.getDsIdFromHdfsValue(value)
25
		);
26
	}
27
}
(3-3/11)