Package org.apache.nutch.util
Class NutchConfiguration
- java.lang.Object
-
- org.apache.nutch.util.NutchConfiguration
-
public class NutchConfiguration extends Object
Utility to create HadoopConfiguration
s that include Nutch-specific resources.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Configuration
create()
Create aConfiguration
for Nutch.static Configuration
create(boolean addNutchResources, Properties nutchProperties)
Create aConfiguration
from supplied properties.static String
getUUID(Configuration conf)
Retrieve a Nutch UUID of this configuration object, or null if the configuration was created elsewhere.
-
-
-
Field Detail
-
UUID_KEY
public static final String UUID_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUUID
public static 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 aConfiguration
for Nutch. This will load the standard Nutch resources,nutch-default.xml
andnutch-site.xml
overrides.- Returns:
- A populated
Configuration
-
create
public static Configuration create(boolean addNutchResources, Properties nutchProperties)
Create aConfiguration
from supplied properties.- Parameters:
addNutchResources
- if true, then firstnutch-default.xml
, and thennutch-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)- Returns:
- A populated
Configuration
-
-