public static class NodeDumper.Sorter extends Configured implements Mapper<Text,Node,FloatWritable,Text>, Reducer<FloatWritable,Text,Text,FloatWritable>
Constructor and Description |
---|
NodeDumper.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,
Iterator<Text> values,
OutputCollector<Text,FloatWritable> output,
Reporter reporter)
Flips and collects the url and numeric sort value.
|
getConf, setConf
public void configure(JobConf conf)
configure
in interface JobConfigurable
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void map(Text key, Node node, OutputCollector<FloatWritable,Text> output, Reporter reporter) throws IOException
map
in interface Mapper<Text,Node,FloatWritable,Text>
IOException
public void reduce(FloatWritable key, Iterator<Text> values, OutputCollector<Text,FloatWritable> output, Reporter reporter) throws IOException
reduce
in interface Reducer<FloatWritable,Text,Text,FloatWritable>
IOException
Copyright © 2015 The Apache Software Foundation