public static class Generator.Selector extends java.lang.Object implements Mapper<Text,CrawlDatum,FloatWritable,Generator.SelectorEntry>, Partitioner<FloatWritable,Writable>, Reducer<FloatWritable,Generator.SelectorEntry,FloatWritable,Generator.SelectorEntry>
| Constructor and Description |
|---|
Selector() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(JobConf job) |
int |
getPartition(FloatWritable key,
Writable value,
int numReduceTasks)
Partition by host / domain or IP.
|
void |
map(Text key,
CrawlDatum value,
OutputCollector<FloatWritable,Generator.SelectorEntry> output,
Reporter reporter)
Select and invert subset due for fetch.
|
void |
open() |
void |
reduce(FloatWritable key,
java.util.Iterator<Generator.SelectorEntry> values,
OutputCollector<FloatWritable,Generator.SelectorEntry> output,
Reporter reporter)
Collect until limit is reached.
|
public void configure(JobConf job)
configure in interface JobConfigurablepublic void open()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void map(Text key, CrawlDatum value, OutputCollector<FloatWritable,Generator.SelectorEntry> output, Reporter reporter) throws java.io.IOException
map in interface Mapper<Text,CrawlDatum,FloatWritable,Generator.SelectorEntry>java.io.IOExceptionpublic int getPartition(FloatWritable key, Writable value, int numReduceTasks)
getPartition in interface Partitioner<FloatWritable,Writable>public void reduce(FloatWritable key, java.util.Iterator<Generator.SelectorEntry> values, OutputCollector<FloatWritable,Generator.SelectorEntry> output, Reporter reporter) throws java.io.IOException
reduce in interface Reducer<FloatWritable,Generator.SelectorEntry,FloatWritable,Generator.SelectorEntry>java.io.IOExceptionCopyright © 2017 The Apache Software Foundation