org.apache.nutch.util

## Class NutchConfiguration

- java.lang.Object
- - org.apache.nutch.util.NutchConfiguration

-     public class NutchConfiguration
      extends java.lang.Object

  Utility to create Hadoop `Configuration`s that include Nutch-specific resources.

- - ### Field Summary

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

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Configuration` | `create()` Create a `Configuration` for Nutch.
    `static Configuration` | `create(boolean addNutchResources, java.util.Properties nutchProperties)` Create a `Configuration` from supplied properties.
    `static java.lang.String` | `getUUID(Configuration conf)` Retrieve a Nutch UUID of this configuration object, or null if the configuration was created elsewhere.

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

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

- - ### Field Detail

    - #### UUID_KEY

          public static final java.lang.String UUID_KEY

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getUUID

          public static java.lang.String getUUID(Configuration conf)

      Retrieve a Nutch UUID of this configuration object, or null if the configuration was created elsewhere.
      Parameters:
        `conf` - configuration instance
      Returns:
        uuid or null

    - #### create

          public static Configuration create()

      Create a `Configuration` for Nutch. This will load the standard Nutch resources, `nutch-default.xml` and `nutch-site.xml` overrides.

    - #### create

          public static Configuration create(boolean addNutchResources,
                                             java.util.Properties nutchProperties)

      Create a `Configuration` from supplied properties.
      Parameters:
        `addNutchResources` - if true, then first `nutch-default.xml`, and then `nutch-site.xml` will be loaded prior to applying the properties. Otherwise these resources won't be used.
        `nutchProperties` - a set of properties to define (or override)

Copyright © 2019 The Apache Software Foundation