org.apache.nutch.tools.warc

## Class WARCExporter

- java.lang.Object
- - org.apache.hadoop.conf.Configured
  - - org.apache.nutch.tools.warc.WARCExporter

- All Implemented Interfaces:
    Configurable, Tool

      public class WARCExporter
      extends Configured
      implements Tool

  MapReduce job to exports Nutch segments as WARC files. The file format is documented in the [ISO Standard](http://bibnum.bnf.fr/warc/WARC_ISO_28500_version1_latestdraft.pdf). Generates elements of type response if the configuration 'store.http.headers' was set to true during the fetching and the http headers were stored verbatim; generates elements of type 'resource' otherwise.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `WARCExporter.WARCMapReduce`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `generateWARC(java.lang.String output, java.util.List<Path> segments)`
    `static void` | `main(java.lang.String[] args)`
    `int` | `run(java.lang.String[] args)`

    - ### Methods inherited from class org.apache.hadoop.conf.Configured

      `getConf, setConf`

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

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

    - ### Methods inherited from interface org.apache.hadoop.conf.Configurable

      `getConf, setConf`

- - ### Constructor Detail

    - #### WARCExporter

          public WARCExporter()

    - #### WARCExporter

          public WARCExporter(Configuration conf)

  - ### Method Detail

    - #### generateWARC

          public int generateWARC(java.lang.String output,
                                  java.util.List<Path> segments)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

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