org.apache.nutch.crawl
Class LinkDb
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.nutch.crawl.LinkDb
- All Implemented Interfaces:
- Closeable, org.apache.hadoop.conf.Configurable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.Text,ParseData,org.apache.hadoop.io.Text,Inlinks>, org.apache.hadoop.util.Tool
public class LinkDb
- extends org.apache.hadoop.conf.Configured
- implements org.apache.hadoop.util.Tool, org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.Text,ParseData,org.apache.hadoop.io.Text,Inlinks>
Maintains an inverted link map, listing incoming links for each url.
Constructor Summary |
LinkDb()
|
LinkDb(org.apache.hadoop.conf.Configuration conf)
|
Method Summary |
void |
close()
|
void |
configure(org.apache.hadoop.mapred.JobConf job)
|
static void |
install(org.apache.hadoop.mapred.JobConf job,
org.apache.hadoop.fs.Path linkDb)
|
void |
invert(org.apache.hadoop.fs.Path linkDb,
org.apache.hadoop.fs.Path[] segments,
boolean normalize,
boolean filter,
boolean force)
|
void |
invert(org.apache.hadoop.fs.Path linkDb,
org.apache.hadoop.fs.Path segmentsDir,
boolean normalize,
boolean filter,
boolean force)
|
static void |
main(String[] args)
|
void |
map(org.apache.hadoop.io.Text key,
ParseData parseData,
org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,Inlinks> output,
org.apache.hadoop.mapred.Reporter reporter)
|
int |
run(String[] args)
|
Methods inherited from class org.apache.hadoop.conf.Configured |
getConf, setConf |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.conf.Configurable |
getConf, setConf |
LOG
public static final org.apache.commons.logging.Log LOG
CURRENT_NAME
public static final String CURRENT_NAME
- See Also:
- Constant Field Values
LOCK_NAME
public static final String LOCK_NAME
- See Also:
- Constant Field Values
LinkDb
public LinkDb()
LinkDb
public LinkDb(org.apache.hadoop.conf.Configuration conf)
configure
public void configure(org.apache.hadoop.mapred.JobConf job)
- Specified by:
configure
in interface org.apache.hadoop.mapred.JobConfigurable
close
public void close()
- Specified by:
close
in interface Closeable
map
public void map(org.apache.hadoop.io.Text key,
ParseData parseData,
org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,Inlinks> output,
org.apache.hadoop.mapred.Reporter reporter)
throws IOException
- Specified by:
map
in interface org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.Text,ParseData,org.apache.hadoop.io.Text,Inlinks>
- Throws:
IOException
invert
public void invert(org.apache.hadoop.fs.Path linkDb,
org.apache.hadoop.fs.Path segmentsDir,
boolean normalize,
boolean filter,
boolean force)
throws IOException
- Throws:
IOException
invert
public void invert(org.apache.hadoop.fs.Path linkDb,
org.apache.hadoop.fs.Path[] segments,
boolean normalize,
boolean filter,
boolean force)
throws IOException
- Throws:
IOException
install
public static void install(org.apache.hadoop.mapred.JobConf job,
org.apache.hadoop.fs.Path linkDb)
throws IOException
- Throws:
IOException
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
run
public int run(String[] args)
throws Exception
- Specified by:
run
in interface org.apache.hadoop.util.Tool
- Throws:
Exception
Copyright © 2006 The Apache Software Foundation