public static class NodeDumper.Sorter extends Configured implements Mapper<Text,Node,FloatWritable,Text>, Reducer<FloatWritable,Text,Text,FloatWritable>
| Constructor and Description |
|---|
Sorter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(JobConf conf)
Configures the job, sets the flag for type of content and the topN number
if any.
|
void |
map(Text key,
Node node,
OutputCollector<FloatWritable,Text> output,
Reporter reporter)
Outputs the url with the appropriate number of inlinks, outlinks, or for
score.
|
void |
reduce(FloatWritable key,
java.util.Iterator<Text> values,
OutputCollector<Text,FloatWritable> output,
Reporter reporter)
Flips and collects the url and numeric sort value.
|
getConf, setConfpublic void configure(JobConf conf)
configure in interface JobConfigurablepublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void map(Text key, Node node, OutputCollector<FloatWritable,Text> output, Reporter reporter) throws java.io.IOException
public void reduce(FloatWritable key, java.util.Iterator<Text> values, OutputCollector<Text,FloatWritable> output, Reporter reporter) throws java.io.IOException
reduce in interface Reducer<FloatWritable,Text,Text,FloatWritable>java.io.IOExceptionCopyright © 2017 The Apache Software Foundation