org.apache.nutch.crawl

## Class LinkDbReader

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

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Configurable, Tool

      public class LinkDbReader
      extends AbstractChecker
      implements java.io.Closeable

  Read utility for the LinkDb.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LinkDbReader.LinkDBDumpMapper`

  - ### Field Summary

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

      `keepClientCnxOpen, stdin, tcpPort, usage`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LinkDbReader()`
    `LinkDbReader(Configuration conf, Path directory)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `java.lang.String[]` | `getAnchors(Text url)`
    `Inlinks` | `getInlinks(Text url)`
    `void` | `init(Path directory)`
    `static void` | `main(java.lang.String[] args)`
    `protected int` | `process(java.lang.String line, java.lang.StringBuilder output)`
    `void` | `processDumpJob(java.lang.String linkdb, java.lang.String output, java.lang.String regex)`
    `int` | `run(java.lang.String[] args)`

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

      `getProtocolOutput, parseArgs, processSingle, processStdin, processTCP, 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.conf.Configurable

      `getConf, setConf`

- - ### Constructor Detail

    - #### LinkDbReader

          public LinkDbReader()

    - #### LinkDbReader

          public LinkDbReader(Configuration conf,
                              Path directory)
                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

  - ### Method Detail

    - #### init

          public void init(Path directory)
                    throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getAnchors

          public java.lang.String[] getAnchors(Text url)
                                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getInlinks

          public Inlinks getInlinks(Text url)
                             throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Throws:
        `java.io.IOException`

    - #### processDumpJob

          public void processDumpJob(java.lang.String linkdb,
                                     java.lang.String output,
                                     java.lang.String regex)
                              throws java.io.IOException,
                                     java.lang.InterruptedException,
                                     java.lang.ClassNotFoundException

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

    - #### process

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

      Specified by:
        `process` in class `AbstractChecker`
      Throws:
        `java.lang.Exception`

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

Copyright © 2019 The Apache Software Foundation