You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Dennis Kubes <ku...@apache.org> on 2008/04/17 23:55:26 UTC

Allow certain components to be created through dependency injection

We are starting to look at building a new architecture for Nutch.  One 
of the key pieces is removing the current plugin architecture in favor 
of a dependency injection framework (i.e. spring).

The problem with this is certain hadoop components (mapper, reducer, 
maprunnable) would need to be able to be created by the IoC container 
and have their dependencies injected.  I put up a basic patch that 
allows mappers and reducers to be created using spring, HADOOP-3261, but 
it feels cludgy.  I think a better solution would be to have some type 
of interface or factory that allows changing out how new instances of 
mapper, reducer, maprunnables, and possibly other components are 
created.  Then specific implementations could be configured in the xml 
configuration files.  I was wondering if anybody has worked on something 
like this or has any thoughts on the subject?

Dennis