Package org.apache.nutch.tools.warc

# Class WARCExporter.WARCMapReduce.WARCReducer

java.lang.Object
org.apache.hadoop.mapreduce.Reducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>
org.apache.nutch.tools.warc.WARCExporter.WARCMapReduce.WARCReducer

Enclosing class:
  WARCExporter.WARCMapReduce

public static class WARCExporter.WARCMapReduce.WARCReducer extends Reducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>

- ## Nested Class Summary

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

  `Reducer.Context`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WARCReducer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected com.google.gson.JsonObject`
  `metadataToJson(Metadata meta)`
  Adds keys/values of a Nuta metadata container to a JsonObject.
  `void`
  `reduce(Text key, Iterable<NutchWritable> values, Reducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>.Context context)`
  `void`
  `setup(Reducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>.Context context)`

  ### 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`

- ## Constructor Details

  - ### WARCReducer

    public WARCReducer()

- ## Method Details

  - ### setup

    public void setup(Reducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>.Context context)
    Overrides:
      `setup` in class `Reducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>`

  - ### reduce

    public void reduce(Text key, Iterable<NutchWritable> values, Reducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>.Context context) throws IOException, InterruptedException
    Overrides:
      `reduce` in class `Reducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>`
    Throws:
      `IOException`
      `InterruptedException`

  - ### metadataToJson

    protected com.google.gson.JsonObject metadataToJson(Metadata meta)
    Adds keys/values of a Nuta metadata container to a JsonObject.
    Parameters:
      `meta` - Nutch metadata container
    Returns:
      json object