org.apache.nutch.segment

## Class SegmentChecker

- java.lang.Object
- - org.apache.nutch.segment.SegmentChecker

-     public class SegmentChecker
      extends java.lang.Object

  Checks whether a segment is valid, or has a certain status (generated, fetched, parsed), or can be used safely for a certain processing step (e.g., indexing).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SegmentChecker()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `checkSegmentDir(Path segmentPath, FileSystem fs)` Check the segment to see if it is valid based on the sub directories.
    `static boolean` | `isIndexable(Path segmentPath, FileSystem fs)` Check if the segment is indexable.
    `static boolean` | `isParsed(Path segment, FileSystem fs)` Check the segment to see if it is has been parsed before.

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

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

- - ### Constructor Detail

    - #### SegmentChecker

          public SegmentChecker()

  - ### Method Detail

    - #### isIndexable

          public static boolean isIndexable(Path segmentPath,
                                            FileSystem fs)
                                     throws java.io.IOException

      Check if the segment is indexable. May add new check methods here.
      Throws:
        `java.io.IOException`

    - #### checkSegmentDir

          public static boolean checkSegmentDir(Path segmentPath,
                                                FileSystem fs)
                                         throws java.io.IOException

      Check the segment to see if it is valid based on the sub directories.
      Throws:
        `java.io.IOException`

    - #### isParsed

          public static boolean isParsed(Path segment,
                                         FileSystem fs)
                                  throws java.io.IOException

      Check the segment to see if it is has been parsed before.
      Throws:
        `java.io.IOException`

Copyright © 2019 The Apache Software Foundation