org.apache.nutch.host
Class HostInjectorJob
java.lang.Object
org.apache.nutch.host.HostInjectorJob
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool
public class HostInjectorJob
- extends Object
- implements org.apache.hadoop.util.Tool
Creates or updates an existing host table from a text file.
The files contain one host name per line, optionally followed by custom
metadata separated by tabs with the metadata key is separated from the
corresponding value by '='.
The URLs can contain the protocol. It will be stripped if present
e.g. http://www.nutch.org \t nutch.score=10 \t nutch.fetchInterval=2592000 \t
userType=open_source
Field Summary |
static org.slf4j.Logger |
LOG
|
Method Summary |
org.apache.hadoop.conf.Configuration |
getConf()
|
boolean |
inject(org.apache.hadoop.fs.Path hostDir)
|
static void |
main(String[] args)
|
int |
run(String[] args)
|
void |
setConf(org.apache.hadoop.conf.Configuration conf)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.slf4j.Logger LOG
HostInjectorJob
public HostInjectorJob()
HostInjectorJob
public HostInjectorJob(org.apache.hadoop.conf.Configuration conf)
getConf
public org.apache.hadoop.conf.Configuration getConf()
- Specified by:
getConf
in interface org.apache.hadoop.conf.Configurable
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- Specified by:
setConf
in interface org.apache.hadoop.conf.Configurable
inject
public boolean inject(org.apache.hadoop.fs.Path hostDir)
throws Exception
- Throws:
Exception
run
public int run(String[] args)
throws Exception
- Specified by:
run
in interface org.apache.hadoop.util.Tool
- Throws:
Exception
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2013 The Apache Software Foundation