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