org.apache.nutch.scoring.webgraph

## Class ScoreUpdater

- java.lang.Object
- - org.apache.hadoop.conf.Configured
  - - org.apache.nutch.scoring.webgraph.ScoreUpdater

- All Implemented Interfaces:
    Configurable, Tool

      public class ScoreUpdater
      extends Configured
      implements Tool

  Updates the score from the WebGraph node database into the crawl database. Any score that is not in the node database is set to the clear score in the crawl database.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ScoreUpdater.ScoreUpdaterMapper` Changes input into ObjectWritables.
    `static class` | `ScoreUpdater.ScoreUpdaterReducer` Creates new CrawlDatum objects with the updated score from the NodeDb or with a cleared score.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScoreUpdater()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(java.lang.String[] args)`
    `int` | `run(java.lang.String[] args)` Runs the ScoreUpdater tool.
    `void` | `update(Path crawlDb, Path webGraphDb)` Updates the inlink score in the web graph node databsae into the crawl database.

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

    - #### ScoreUpdater

          public ScoreUpdater()

  - ### Method Detail

    - #### update

          public void update(Path crawlDb,
                             Path webGraphDb)
                      throws java.io.IOException,
                             java.lang.ClassNotFoundException,
                             java.lang.InterruptedException

      Updates the inlink score in the web graph node databsae into the crawl database.
      Parameters:
        `crawlDb` - The crawl database to update
        `webGraphDb` - The webgraph database to use.
      Throws:
        `java.io.IOException` - If an error occurs while updating the scores.
        `java.lang.ClassNotFoundException`
        `java.lang.InterruptedException`

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

      Runs the ScoreUpdater tool.
      Specified by:
        `run` in interface `Tool`
      Throws:
        `java.lang.Exception`

Copyright © 2019 The Apache Software Foundation