You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Danicela nutch <Da...@mail.com> on 2011/09/14 12:03:20 UTC

Using nutch-site.xml to give parameters to plugins

Hi,

 I want to set properties in nutch-site.xml that I can use in a plugin after.

 For exemple, I would want to have var = 10 in this file, and then retrieve this value in the java code of a plugin.

 But I don't know the syntax in the xml and what class & method to use in the plugin for that.

 Can someone give me the rules / redirect me to a tutorial ?

 Thanks.

Re: Using nutch-site.xml to give parameters to plugins

Posted by Markus Jelsma <ma...@openindex.io>.
All parameters in the configuration can be read in Hadoop using the 
Configuration object:
http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/conf/Configuration.html

There's no scope (that i know of) all settings are global and readable.

> Hi,
> 
>  I want to set properties in nutch-site.xml that I can use in a plugin
> after.
> 
>  For exemple, I would want to have var = 10 in this file, and then retrieve
> this value in the java code of a plugin.
> 
>  But I don't know the syntax in the xml and what class & method to use in
> the plugin for that.
> 
>  Can someone give me the rules / redirect me to a tutorial ?
> 
>  Thanks.