nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Groschupf>
Subject no static NutchConf
Date Wed, 04 Jan 2006 14:39:38 GMT
to move forward in the direction of having a nutch gui, I would love  
to start removing the static access of NutchConf.
Based on experience first I would love to get a kind of general  
agreement and a 'go' before wasting to much time for an unaccented  

I suggest:

+ removing NutchConf.get().
+ in case a lower level object use only one, two but not more than 3  
parameters from the nutch configuration, we add this parameter to the  
constructor of this object.
(e.g. MapFile.Reader needs only the parameter INDEX_SKIP)
+ for higher level objects like fetcher tool- that need more than 3  
parameters for the lower level object -  we add a instance of  
NutchConf to the Constructor
+ for all dynamic used object that implements a specific interface  
(interface > no control over the object constructor) we use the  
Configurable interface to set the NutchConf in a inversion of control  
like style.
(e.g. Plugin Extension Implementations like Parser or Protocols)
+ PluginRegestry will not longer a singleton but will get an  
constructor with a NutchConf instance.
+ Getting a Extension, require also a NutchConf that is injected in  
case the Extension Object (e.g. a Parser) implements a Configurable  

Any comments, improvement suggestions, more use-cases?
I would love to do this job, can I get a go from the other developers?
 From my point of view NutchConf is actually a showblocker since a  
lot of people run in trouble integrating nutch in other projects,  
also my suggestions are require to write a nutch gui.


View raw message