Sure, no problem,

Is not specifically for Nutch 2.x but on master you can take a look at the
scoring-similarity [1] plugin, this is just a text file but it's used
internally by the plugin. Usually, a lot of plugins define their own
additional conf files this way, so it's not uncommon or very different from
your use case, I think.

[1]
https://github.com/apache/nutch/blob/master/src/plugin/scoring-similarity/src/java/org/apache/nutch/scoring/similarity/cosine/Model.java#L65-L71


On Thu, Jun 29, 2017 at 5:48 PM SJC Multimedia <[email protected]>
wrote:

> Okay makes sense.
>
> If you dont mind can you point me to a specific plugin that does something
> similar?
>
> On Thu, Jun 29, 2017 at 8:39 AM, Jorge Betancourt <
> [email protected]> wrote:
>
> > Hi Dave,
> >
> > My advice would be to leave your resources out of the plugins, if there
> is
> > a configuration file (or additional files), just load what you need from
> > the conf directory if the files dictionary can change just make it
> > configurable on the nutch-site.xml.
> >
> > Best Regards,
> > Jorge
> >
> > PS: You can take a look at how additional files are loaded on the
> different
> > Nutch plugins.
> >
> > On Thu, Jun 29, 2017 at 5:36 PM SJC Multimedia <[email protected]>
> > wrote:
> >
> > > Thing I have already tried is to bundle these resources in the job jar
> > > and load them from the
> > > classpath but that didn't work. I also tried copying them to HDFS and
> > > loading them from there but that too failed.
> > >
> > >
> > > What is the best way to bundle such static resources and reference
> > > them in the custom plugin?
> > >
> > >
> > > Thanks
> > >
> > > Akshar
> > >
> > >
> > >
> > > On Thu, Jun 29, 2017 at 8:28 AM, SJC Multimedia <
> [email protected]
> > >
> > > wrote:
> > >
> > > > I am building a custom plugin in Nutch 2.3.1 on Hadoop/HBase. In the
> > > > plugin code, I need to pull in a dictionary of files and run some
> > > > comparisons while parsing the document.
> > > >
> > > > Is there a way to include directory of files through the custom
> plugin
> > > ant
> > > > build framework that will work on both local and cluster(hadoop MR)
> > mode?
> > > >
> > > > Any pointers will be helpful.
> > > >
> > > > Thanks
> > > > Dave
> > > >
> > >
> >
>

Reply via email to