org.apache.nutch.host

## Class HostInjectorJob

- java.lang.Object
- - org.apache.nutch.host.HostInjectorJob

- All Implemented Interfaces:
    Configurable, Tool

      public class HostInjectorJob
      extends java.lang.Object
      implements 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

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `HostInjectorJob.UrlMapper`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HostInjectorJob()`
    `HostInjectorJob(Configuration conf)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Configuration` | `getConf()`
    `boolean` | `inject(Path hostDir)`
    `static void` | `main(java.lang.String[] args)`
    `int` | `run(java.lang.String[] args)`
    `void` | `setConf(Configuration conf)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HostInjectorJob

          public HostInjectorJob()

    - #### HostInjectorJob

          public HostInjectorJob(Configuration conf)

  - ### Method Detail

    - #### getConf

          public Configuration getConf()

      Specified by:
        `getConf` in interface `Configurable`

    - #### setConf

          public void setConf(Configuration conf)

      Specified by:
        `setConf` in interface `Configurable`

    - #### inject

          public boolean inject(Path hostDir)
                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### run

          public int run(java.lang.String[] args)
                  throws java.lang.Exception

      Specified by:
        `run` in interface `Tool`
      Throws:
        `java.lang.Exception`

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

Copyright © 2019 The Apache Software Foundation