Re: svn commit: r359822 - in /lucene/nutch/trunk: bin/ conf/ src/java/org/apache/nutch/crawl/ src/java/org/apache/nutch/fetcher/ src/java/org/apache/nutch/indexer/ src/java/org/apache/nutch/parse/ src/java/org/apache/nutch/segment/ src/java/org/apache/nut

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

Re: svn commit: r359822 - in /lucene/nutch/trunk: bin/ conf/ src/java/org/apache/nutch/crawl/ src/java/org/apache/nutch/fetcher/ src/java/org/apache/nutch/indexer/ src/java/org/apache/nutch/parse/ src/java/org/apache/nutch/segment/ src/java/org/apache/nut

Sami Siren
[hidden email] wrote:
> Added: lucene/nutch/trunk/src/java/org/apache/nutch/crawl/SignatureFactory.java
> URL: http://svn.apache.org/viewcvs/lucene/nutch/trunk/src/java/org/apache/nutch/crawl/SignatureFactory.java?rev=359822&view=auto
> ==============================================================================
> --- lucene/nutch/trunk/src/java/org/apache/nutch/crawl/SignatureFactory.java (added)
> +++ lucene/nutch/trunk/src/java/org/apache/nutch/crawl/SignatureFactory.java Thu Dec 29 07:28:30 2005
...

> +  public static Signature getSignature(NutchConf conf) {
> +    String clazz = conf.get("db.signature.class", MD5Signature.class.getName());
> +    Signature impl = (Signature)conf.getObject(clazz);
> +    if (impl == null) {
> +      try {
> +        LOG.info("Using Signature impl: " + clazz);
> +        Class implClass = Class.forName(clazz);
> +        impl = (Signature)implClass.newInstance();
> +        impl.setConf(conf);
> +      } catch (Exception e) {

should there be a

conf.setObject(clazz,impl);

inside that try ?

--
  Sami Siren
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r359822 - in /lucene/nutch/trunk: bin/ conf/ src/java/org/apache/nutch/crawl/ src/java/org/apache/nutch/fetcher/ src/java/org/apache/nutch/indexer/ src/java/org/apache/nutch/parse/ src/java/org/apache/nutch/segment/ src/java/org/apache/nut

Andrzej Białecki-2
Sami Siren wrote:
>
> should there be a
>
> conf.setObject(clazz,impl);
>
> inside that try ?

Yes, of course, thanks for catching it!

--
Best regards,
Andrzej Bialecki     <><
 ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com