public class DownloadMapper extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable>
Mapper
for downloading files.Modifier and Type | Class and Description |
---|---|
protected static class |
DownloadMapper.Counters |
Constructor and Description |
---|
DownloadMapper() |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup(org.apache.hadoop.mapreduce.Mapper.Context context) |
void |
map(org.apache.hadoop.io.LongWritable index,
org.apache.hadoop.io.Text urlLine,
org.apache.hadoop.mapreduce.Mapper.Context context) |
protected void |
setup(org.apache.hadoop.mapreduce.Mapper.Context context) |
public DownloadMapper()
protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
setup
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable>
IOException
InterruptedException
protected void cleanup(org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
cleanup
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable>
IOException
InterruptedException
public void map(org.apache.hadoop.io.LongWritable index, org.apache.hadoop.io.Text urlLine, org.apache.hadoop.mapreduce.Mapper.Context context)
map
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.BytesWritable>