org.apache.nutch.segment

## Class SegmentReader

- java.lang.Object
- - org.apache.hadoop.conf.Configured
  - - org.apache.nutch.segment.SegmentReader

- All Implemented Interfaces:
    Configurable, Tool

      public class SegmentReader
      extends Configured
      implements Tool

  Dump the content of a segment.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SegmentReader.InputCompatMapper`
    `static class` | `SegmentReader.InputCompatReducer`
    `static class` | `SegmentReader.SegmentReaderStats`
    `static class` | `SegmentReader.TextOutputFormat` Implements a text output format

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SegmentReader()`
    `SegmentReader(Configuration conf, boolean co, boolean fe, boolean ge, boolean pa, boolean pd, boolean pt)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `dump(Path segment, Path output)`
    `void` | `get(Path segment, Text key, java.io.Writer writer, java.util.Map<java.lang.String,java.util.List<Writable>> results)`
    `void` | `getStats(Path segment, SegmentReader.SegmentReaderStats stats)`
    `void` | `list(java.util.List<Path> dirs, java.io.Writer writer)`
    `static void` | `main(java.lang.String[] args)`
    `int` | `run(java.lang.String[] args)`
    `void` | `setup(Job job)`

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

    - #### SegmentReader

          public SegmentReader()

    - #### SegmentReader

          public SegmentReader(Configuration conf,
                               boolean co,
                               boolean fe,
                               boolean ge,
                               boolean pa,
                               boolean pd,
                               boolean pt)

  - ### Method Detail

    - #### setup

          public void setup(Job job)

    - #### close

          public void close()

    - #### dump

          public void dump(Path segment,
                           Path output)
                    throws java.io.IOException,
                           java.lang.InterruptedException,
                           java.lang.ClassNotFoundException

      Throws:
        `java.io.IOException`
        `java.lang.InterruptedException`
        `java.lang.ClassNotFoundException`

    - #### get

          public void get(Path segment,
                          Text key,
                          java.io.Writer writer,
                          java.util.Map<java.lang.String,java.util.List<Writable>> results)
                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### list

          public void list(java.util.List<Path> dirs,
                           java.io.Writer writer)
                    throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getStats

          public void getStats(Path segment,
                               SegmentReader.SegmentReaderStats stats)
                        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