parser plugin lifecycle

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

parser plugin lifecycle

Erik Hatcher
How could a Parser implementation do some cleanup at the end of the  
process?  I'm new to the plugin lifecycle - is this currently possible?

I have an RDF parser plugin that needs to open a connection to an  
external RDF engine and I need to do that only one time and then  
close that connection when all documents are parsed.

Thanks,
     Erik

Reply | Threaded
Open this post in threaded view
|

Re: parser plugin lifecycle

Stefan Groschupf-2
Hi Erik,

Check: Introduction to the nutch plug-in architecture
http://www.media-style.com/index.jsp?folderPK=422
It gives some basic understanding of the plugin life cycle.

In short each plugin can have a plugin class you can define in the  
plugin deployment descriptor.
This plugin class has life cycle methods that will be invoked until  
start up to create a db connection and until shutdown to close a db  
connection for example

HTH
Stefan

Am 21.07.2005 um 17:36 schrieb Erik Hatcher:

> How could a Parser implementation do some cleanup at the end of the  
> process?  I'm new to the plugin lifecycle - is this currently  
> possible?
>
> I have an RDF parser plugin that needs to open a connection to an  
> external RDF engine and I need to do that only one time and then  
> close that connection when all documents are parsed.
>
> Thanks,
>     Erik
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: parser plugin lifecycle

Erik Hatcher

On Jul 21, 2005, at 11:46 AM, Stefan Groschupf wrote:

> Hi Erik,
>
> Check: Introduction to the nutch plug-in architecture
> http://www.media-style.com/index.jsp?folderPK=422
> It gives some basic understanding of the plugin life cycle.
>
> In short each plugin can have a plugin class you can define in the  
> plugin deployment descriptor.
> This plugin class has life cycle methods that will be invoked until  
> start up to create a db connection and until shutdown to close a db  
> connection for example

Is there an example of this with one of the plugins that come with  
Nutch that I could follow along with?   Where are there more details  
about plugin.xml?

Thanks,
     Erik


Reply | Threaded
Open this post in threaded view
|

Re: parser plugin lifecycle

Erik Hatcher
In reply to this post by Stefan Groschupf-2

On Jul 21, 2005, at 11:46 AM, Stefan Groschupf wrote:
> In short each plugin can have a plugin class you can define in the  
> plugin deployment descriptor.
> This plugin class has life cycle methods that will be invoked until  
> start up to create a db connection and until shutdown to close a db  
> connection for example

I took a look at the plugin descriptor parsing code and figured out  
how to register a class="..." and have gotten that working.  Thanks  
for the pointer.

     Erik