org.apache.nutch.crawl

## Class Injector.InjectMapper

- java.lang.Object
- - org.apache.hadoop.mapreduce.Mapper<Text,Writable,Text,CrawlDatum>
  - - org.apache.nutch.crawl.Injector.InjectMapper

- Enclosing class:
    Injector

      public static class Injector.InjectMapper
      extends Mapper<Text,Writable,Text,CrawlDatum>

  InjectMapper reads
  - the CrawlDb seeds are injected into
  - the plain-text seed files and parses each line into the URL and metadata. Seed URLs are passed to the reducer with STATUS_INJECTED.
  Depending on configuration and command-line parameters the URLs are normalized and filtered using the configured plugins.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper

      `Mapper.Context`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `EQUAL_CHARACTER`
    `static java.lang.String` | `TAB_CHARACTER`
    `static java.lang.String` | `URL_NORMALIZING_SCOPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InjectMapper()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `map(Text key, Writable value, Mapper.Context context)`
    `void` | `setup(Mapper.Context context)`

    - ### Methods inherited from class org.apache.hadoop.mapreduce.Mapper

      `cleanup, run`

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

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

- - ### Field Detail

    - #### URL_NORMALIZING_SCOPE

          public static final java.lang.String URL_NORMALIZING_SCOPE

      See Also:
        Constant Field Values

    - #### TAB_CHARACTER

          public static final java.lang.String TAB_CHARACTER

      See Also:
        Constant Field Values

    - #### EQUAL_CHARACTER

          public static final java.lang.String EQUAL_CHARACTER

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### InjectMapper

          public InjectMapper()

  - ### Method Detail

    - #### setup

          public void setup(Mapper.Context context)

      Overrides:
        `setup` in class `Mapper<Text,Writable,Text,CrawlDatum>`

    - #### map

          public void map(Text key,
                          Writable value,
                          Mapper.Context context)
                   throws java.io.IOException,
                          java.lang.InterruptedException

      Overrides:
        `map` in class `Mapper<Text,Writable,Text,CrawlDatum>`
      Throws:
        `java.io.IOException`
        `java.lang.InterruptedException`

Copyright © 2019 The Apache Software Foundation