org.apache.nutch.parse

## Class ParseSegment

- java.lang.Object
- - org.apache.hadoop.conf.Configured
  - - org.apache.nutch.util.NutchTool
    - - org.apache.nutch.parse.ParseSegment

- All Implemented Interfaces:
    Configurable, Tool

      public class ParseSegment
      extends NutchTool
      implements Tool

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ParseSegment.ParseSegmentMapper`
    `static class` | `ParseSegment.ParseSegmentReducer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `SKIP_TRUNCATED`

    - ### Fields inherited from class org.apache.nutch.util.NutchTool

      `currentJob, currentJobNum, numJobs, results, status`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isTruncated(Content content)` Checks if the page's content is truncated.
    `static void` | `main(java.lang.String[] args)`
    `void` | `parse(Path segment)`
    `java.util.Map<java.lang.String,java.lang.Object>` | `run(java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String crawlId)` Runs the tool, using a map of arguments.
    `int` | `run(java.lang.String[] args)`

    - ### Methods inherited from class org.apache.nutch.util.NutchTool

      `getProgress, getStatus, killJob, stopJob`

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

- - ### Field Detail

    - #### SKIP_TRUNCATED

          public static final java.lang.String SKIP_TRUNCATED

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ParseSegment

          public ParseSegment()

    - #### ParseSegment

          public ParseSegment(Configuration conf)

  - ### Method Detail

    - #### isTruncated

          public static boolean isTruncated(Content content)

      Checks if the page's content is truncated.
      Parameters:
        `content` -
      Returns:
        If the page is truncated `true`. When it is not, or when it could be determined, `false`.

    - #### parse

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

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

    - #### main

          public static void main(java.lang.String[] args)
                           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`

    - #### run

          public java.util.Map<java.lang.String,java.lang.Object> run(java.util.Map<java.lang.String,java.lang.Object> args,
                                                                      java.lang.String crawlId)
                                                               throws java.lang.Exception

      Description copied from class: `NutchTool`
      Runs the tool, using a map of arguments. May return results, or null.
      Specified by:
        `run` in class `NutchTool`
      Throws:
        `java.lang.Exception`

Copyright © 2019 The Apache Software Foundation