org.apache.nutch.crawl

## Class GeneratorReducer

- java.lang.Object
- - org.apache.hadoop.mapreduce.Reducer<K1,V1,K2,V2>
  - - org.apache.gora.mapreduce.GoraReducer<GeneratorJob.SelectorEntry,WebPage,String,WebPage>
    - - org.apache.nutch.crawl.GeneratorReducer

-     public class GeneratorReducer
      extends org.apache.gora.mapreduce.GoraReducer<GeneratorJob.SelectorEntry,WebPage,String,WebPage>

  Reduce class for generate The #reduce() method write a random integer to all generated URLs. This random number is then used by `FetcherJob.FetcherMapper`.

- - ### Nested Class Summary

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

      `Reducer.Context`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static long` | `count`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GeneratorReducer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `reduce(GeneratorJob.SelectorEntry key, Iterable<WebPage> values, Reducer.Context context)`
    `protected void` | `setup(Reducer.Context context)`

    - ### Methods inherited from class org.apache.gora.mapreduce.GoraReducer

      `initReducerJob, initReducerJob, initReducerJob`

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

      `cleanup, run`

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

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

- - ### Field Detail

    - #### count

          protected static long count

  - ### Constructor Detail

    - #### GeneratorReducer

          public GeneratorReducer()

  - ### Method Detail

    - #### reduce

          protected void reduce(GeneratorJob.SelectorEntry key,
                    Iterable<WebPage> values,
                    Reducer.Context context)
                         throws IOException,
                                InterruptedException

      Overrides:
        `reduce` in class `Reducer<GeneratorJob.SelectorEntry,WebPage,String,WebPage>`
      Throws:
        `IOException`
        `InterruptedException`

    - #### setup

          protected void setup(Reducer.Context context)
                        throws IOException,
                               InterruptedException

      Overrides:
        `setup` in class `Reducer<GeneratorJob.SelectorEntry,WebPage,String,WebPage>`
      Throws:
        `IOException`
        `InterruptedException`

Copyright © 2015 The Apache Software Foundation