org.apache.nutch.util

## Class AbstractChecker

- java.lang.Object
- - org.apache.hadoop.conf.Configured
  - - org.apache.nutch.util.AbstractChecker

- All Implemented Interfaces:
    Configurable, Tool
  Direct Known Subclasses:
    CrawlDbReader, IndexingFiltersChecker, LinkDbReader, ParserChecker, URLFilterChecker, URLNormalizerChecker

      public abstract class AbstractChecker
      extends Configured
      implements Tool

  Scaffolding class for the various Checker implementations. Can process cmdline input, stdin and TCP connections.
  Author:
    Jurian Broertjes

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `keepClientCnxOpen`
    `protected boolean` | `stdin`
    `protected int` | `tcpPort`
    `protected java.lang.String` | `usage`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractChecker()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected ProtocolOutput` | `getProtocolOutput(java.lang.String url, CrawlDatum datum)`
    `protected int` | `parseArgs(java.lang.String[] args, int i)`
    `protected abstract int` | `process(java.lang.String line, java.lang.StringBuilder output)`
    `protected int` | `processSingle(java.lang.String input)`
    `protected int` | `processStdin()`
    `protected void` | `processTCP(int tcpPort)`
    `protected int` | `run()`

    - ### 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.util.Tool

      `run`

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

      `getConf, setConf`

- - ### Field Detail

    - #### keepClientCnxOpen

          protected boolean keepClientCnxOpen

    - #### tcpPort

          protected int tcpPort

    - #### stdin

          protected boolean stdin

    - #### usage

          protected java.lang.String usage

  - ### Constructor Detail

    - #### AbstractChecker

          public AbstractChecker()

  - ### Method Detail

    - #### process

          protected abstract int process(java.lang.String line,
                                         java.lang.StringBuilder output)
                                  throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### parseArgs

          protected int parseArgs(java.lang.String[] args,
                                  int i)

    - #### run

          protected int run()
                     throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### processSingle

          protected int processSingle(java.lang.String input)
                               throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### processStdin

          protected int processStdin()
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### processTCP

          protected void processTCP(int tcpPort)
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getProtocolOutput

          protected ProtocolOutput getProtocolOutput(java.lang.String url,
                                                     CrawlDatum datum)
                                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

Copyright © 2019 The Apache Software Foundation