Re: How can I get one plugin's root dir

2007-01-17 Thread Dennis Kubes
Scott, I should have read your original post in more detail. I was assuming you were just trying to get the root directory of the plugin, not loading resources during a MR job. I would have to agree with Andrzej approach if this were to be used during a MR job. Sorry for the confusion.

Re: How can I get one plugin's root dir

2007-01-16 Thread Sami Siren
Scott Green wrote: Thanks Dennis! Your methond should work. And I really hope there is one directly method say getPluginRootDir() in the plugin implementation. I'd recommend taking path shown by Andrzej because IMO it's bad design to depend on plugin system from a plugin. -- Sami Siren

Re: How can I get one plugin's root dir

2007-01-16 Thread Scott Green
Hi Sami On 1/16/07, Sami Siren [EMAIL PROTECTED] wrote: Scott Green wrote: Thanks Dennis! Your methond should work. And I really hope there is one directly method say getPluginRootDir() in the plugin implementation. I'd recommend taking path shown by Andrzej because IMO it's bad design to

Re: How can I get one plugin's root dir

2007-01-16 Thread Andrzej Bialecki
Scott Green wrote: Hi Sami On 1/16/07, Sami Siren [EMAIL PROTECTED] wrote: Scott Green wrote: Thanks Dennis! Your methond should work. And I really hope there is one directly method say getPluginRootDir() in the plugin implementation. I'd recommend taking path shown by Andrzej because IMO

Re: How can I get one plugin's root dir

2007-01-16 Thread Scott Green
On 1/16/07, Andrzej Bialecki [EMAIL PROTECTED] wrote: Scott Green wrote: Hi Sami On 1/16/07, Sami Siren [EMAIL PROTECTED] wrote: Scott Green wrote: Thanks Dennis! Your methond should work. And I really hope there is one directly method say getPluginRootDir() in the plugin

Re: How can I get one plugin's root dir

2007-01-16 Thread Andrzej Bialecki
Scott Green wrote: Well, why should all resources needed to be packed? Because when you run Nutch on a Hadoop cluster, Hadoop requires that all job resources be packed into a job JAR, which is then submitted to each tasktracker as a part of the job. So, if you want to run in non-local mode

Re: How can I get one plugin's root dir

2007-01-16 Thread Doug Cutting
Andrzej Bialecki wrote: The reason is that if you pack this file into your job JAR, the job jar would become very large (presumably this 40MB is already compressed?). Job jar needs to be copied to each tasktracker for each task, so you will experience performance hit just because of the size

Re: How can I get one plugin's root dir

2007-01-16 Thread Scott Green
Thanks Andrzej and Doug! I will try both in my later work and evaluate them. On 1/17/07, Doug Cutting [EMAIL PROTECTED] wrote: Andrzej Bialecki wrote: The reason is that if you pack this file into your job JAR, the job jar would become very large (presumably this 40MB is already

Re: How can I get one plugin's root dir

2007-01-15 Thread Scott Green
Can someone give a answer? I dont think it is good idea we put all configuration/resources under conf dir. On 1/15/07, Scott Green [EMAIL PROTECTED] wrote: Hi, I need to load some resources from mine plugin's sub-directory. Any avaiable method to get the specified plugin's root directory now?

Re: How can I get one plugin's root dir

2007-01-15 Thread Andrzej Bialecki
Scott Green wrote: Can someone give a answer? I dont think it is good idea we put all configuration/resources under conf dir. On 1/15/07, Scott Green [EMAIL PROTECTED] wrote: Hi, I need to load some resources from mine plugin's sub-directory. Any avaiable method to get the specified plugin's

Re: How can I get one plugin's root dir

2007-01-15 Thread Dennis Kubes
You can get the PluginRepository and then from there get the plugin descriptor and its path. From there resources inside the plugin folder. Change out parse-html with your plugin id. Configuration conf = NutchConfiguration.create(); PluginRepository rep =

Re: How can I get one plugin's root dir

2007-01-15 Thread Scott Green
Hi, I want to propose a bit clean plugin directory structure: xxx-plugin `-- lib `-- conf `-- src `-- web (only for web plugin) `-- plugin.xml `-- build.xml Take urlfilter-regex plugin as example, the

Re: How can I get one plugin's root dir

2007-01-15 Thread Scott Green
Thanks Dennis! Your methond should work. And I really hope there is one directly method say getPluginRootDir() in the plugin implementation. On 1/16/07, Dennis Kubes [EMAIL PROTECTED] wrote: You can get the PluginRepository and then from there get the plugin descriptor and its path. From

How can I get one plugin's root dir

2007-01-14 Thread Scott Green
Hi, I need to load some resources from mine plugin's sub-directory. Any avaiable method to get the specified plugin's root directory now? thanks - scott